LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-11-2008, 09:15 AM   #1
RaelOM
Member
 
Registered: Dec 2004
Posts: 110

Rep: Reputation: 16
Stumped. PHP & Parsing


So I'm stumped.

I have two php files. One is parsed when ran on the command line and displayed from a browser (info.php)

The other is not parsed or at least I don't believe it's being parsed (index.php)

/usr/local/bin/php

PHP 5.2.6 (cli) (built: Sep 5 2008 09:37:16)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies


Can anyone help walk me through some troubleshooting here?

Goal? I'm trying to install CACTI and get the index.php of cacti to work and right now it's showing nothing.
 
Old 09-11-2008, 09:45 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 12,901

Rep: Reputation: 1885Reputation: 1885Reputation: 1885Reputation: 1885Reputation: 1885Reputation: 1885Reputation: 1885Reputation: 1885Reputation: 1885Reputation: 1885Reputation: 1885
My guess is that the 1st file starts with "<?php", while the other starts with "<?". If that's the case, then edit php.ini and change:
Code:
short_open_tag = On
Don't forget to restart apache after editing php.ini.

Regards
 
Old 09-11-2008, 10:00 AM   #3
RaelOM
Member
 
Registered: Dec 2004
Posts: 110

Original Poster
Rep: Reputation: 16
No, both files begin with:

"<?php"
 
Old 09-11-2008, 10:17 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 12,901

Rep: Reputation: 1885Reputation: 1885Reputation: 1885Reputation: 1885Reputation: 1885Reputation: 1885Reputation: 1885Reputation: 1885Reputation: 1885Reputation: 1885Reputation: 1885
Try the change to php.ini to see if it helps. Maybe there is a short tag in the file somewhere else.
 
Old 09-11-2008, 10:35 AM   #5
RaelOM
Member
 
Registered: Dec 2004
Posts: 110

Original Poster
Rep: Reputation: 16
That option was already defined in php.ini, however when running "php --ini" to see which config files it's loading I see nothing.

So I symlinked my /etc/php.ini to /usr/local/lib/php.ini and it's now loading that ini file, however it's still not working.

I ran strace and saw a bunch of "Not found" errors which leads me to believe I may have php installed incorrectly?

Anyway I remove the 5.1.6 rpm from my system and am now running a re-install of the 5.2.6 source
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP Parsing ToothlessRebel Programming 20 10-25-2006 08:35 PM
PHP not parsing code... libertyboy Linux - Software 3 08-24-2004 12:09 PM
php parsing some includes. others are not. toadeny Linux - Newbie 4 09-18-2003 10:50 AM
I need help with this PHP code. I'm stumped lostboy Programming 1 08-22-2003 06:49 AM
php not parsing chens_83 Linux - General 9 02-19-2003 05:53 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:40 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration