LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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, 08: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, 08:45 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
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, 09: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, 09:17 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
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, 09: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



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 07:35 PM
PHP not parsing code... libertyboy Linux - Software 3 08-24-2004 11:09 AM
php parsing some includes. others are not. toadeny Linux - Newbie 4 09-18-2003 09:50 AM
I need help with this PHP code. I'm stumped lostboy Programming 1 08-22-2003 05:49 AM
php not parsing chens_83 Linux - General 9 02-19-2003 04:53 AM

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

All times are GMT -5. The time now is 09: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