Connecting Tech Pros Worldwide Help | Site Map

php.ini seems broken

Newbie
 
Join Date: Nov 2007
Posts: 8
#1: Nov 11 '07
Hello,

Quick and somewhat stupid question. I have a functioning installation of PHP with apache 1.3.36 (when I <?phpinfo();?>, it works).

However, when I provide a specific configration file (or even the backup copy at php.ini-reccomended), phpinfo() stops working. My first guess is that I did something horrible to the .ini files, but I can't seem to find a way to test them, nor a system backup. I would really like to a) change some values available in php.ini, and b) get a concrete working installation back.

Is there a way to test the configuration/installation like perl -c ? Do I have to go out and try to build from source again? Can anyone point out a reference that *doesn't* start off with "phpinfo()"?
ak1dnar's Avatar
Moderator
 
Join Date: Jan 2007
Location: Colombo
Posts: 1,439
#2: Nov 11 '07

re: php.ini seems broken


What do you mean by "phpinfo() stops working"?
Atli's Avatar
Moderator
 
Join Date: Nov 2006
Location: Iceland
Posts: 3,745
#3: Nov 11 '07

re: php.ini seems broken


Hi.

Seeing as the short-tags (<?..?>) are disabled by default in PHP, it would be perfectly normal that "<?phpinfo()?>" won't work with the default, recommended, php.ini configuration file.

Try using the normal PHP tags (<?php...?>) instead. Like so:
Expand|Select|Wrap|Line Numbers
  1. <?php
  2.   echo phpinfo();
  3. ?>
  4.  
If that is not the problem, please explain the problem a little better.
Like what exactly is your script doing, and how is this different from what you expect it to do.
Are you receiving any errors?
Newbie
 
Join Date: Nov 2007
Posts: 8
#4: Nov 11 '07

re: php.ini seems broken


Quote:

Originally Posted by Atli

Hi.

Seeing as the short-tags (<?..?>) are disabled by default in PHP, it would be perfectly normal that "<?phpinfo()?>" won't work with the default, recommended, php.ini configuration file.

Try using the normal PHP tags (<?php...?>) instead. Like so:

Expand|Select|Wrap|Line Numbers
  1. <?php
  2.   echo phpinfo();
  3. ?>
  4.  
If that is not the problem, please explain the problem a little better.
Like what exactly is your script doing, and how is this different from what you expect it to do.
Are you receiving any errors?

Thank you, thank you, THANK YOU!

I usually use ssi and perl, php is kinda new, didn't realize that short tags were bad. Is there a reason they are off?
Reply