PDA

View Full Version : php Configuration Questions


Christine
Sat 6th Mar '04, 10:49am
Hi all!

A couple of questions about configuring php:

1. When I pico php.ini, it says that register_globals is OFF, yet phpinfo() shows it to be ON. MySQL is currently version 4.0.15 (cPanel default), yet phpinfo() is showing 3.23.

I am going to upgrade to 4.0.18 today -- how do I make sure that phpinfo() is reading the current settings on everything and not whatever original setup cPanel provided however many eons ago?

Note -- I already upgraded from 4.3.3 to 4.3.4 and that IS showing in phpinfo()

2. I prefer to have display_errors OFF on my live site, and ON in my test environment. Now that I have a dedicated and am moving all domains from various locations to there, I would like to know if I can somehow default that setting to OFF in the php.ini yet override it for one account.

Is that possible?

Thanks for any help in this!!!

Christine
Tue 9th Mar '04, 6:54pm
Ok, I found a post by Eva (http://www.vbulletin.com/forum/showpost.php?p=618112&postcount=3) from a while back about MySQL that I believe addresses part of my first question -- it has to do with how these are compiled.

If I can't rely on phpinfo() for version and configuration information, where can I go to find the correct answer for these MySQL and php elements as the settings in the /etc/ files conflict with the information in phpinfo() -- how do I know which is correct?

I am still clueless on the second question -- I am assuming this can be done through Apache, but not sure where to look.

Can anyone help?

snakes1100
Tue 9th Mar '04, 7:08pm
Hi all!

A couple of questions about configuring php:

1. When I pico php.ini, it says that register_globals is OFF, yet phpinfo() shows it to be ON. MySQL is currently version 4.0.15 (cPanel default), yet phpinfo() is showing 3.23.

I am going to upgrade to 4.0.18 today -- how do I make sure that phpinfo() is reading the current settings on everything and not whatever original setup cPanel provided however many eons ago?

Note -- I already upgraded from 4.3.3 to 4.3.4 and that IS showing in phpinfo()

2. I prefer to have display_errors OFF on my live site, and ON in my test environment. Now that I have a dedicated and am moving all domains from various locations to there, I would like to know if I can somehow default that setting to OFF in the php.ini yet override it for one account.

Is that possible?

Thanks for any help in this!!!
1. You maybe editing the wrong php.ini, look in the phpinfo and see where php is running from.

2. You maybe able to do that with a htaccess file, in that sites dir.

Christine
Tue 9th Mar '04, 8:20pm
Thanks for helping me with this, snakes. :)1. You maybe editing the wrong php.ini, look in the phpinfo and see where php is running from.php.ini resides in 3 places. Two locations (symbolic link) agree with phpinfo() -- which, for example, says that register_globals is ON. /etc/php.ini states that it is OFF.

If I am understanding you, it is /etc/php.ini that is the default, and any modifications I make need to be to the other php.ini file, which is live?

phpinfo() is also compiled with '--with-mysql'. If I recompile it with '--with/mysql=/usr will that make it read the current version of the database (or will I mess up how php is set up)?

2. You maybe able to do that with a htaccess file, in that sites dir.Thanks for the heads up. I am new to Apache and the whole when to use httpd.conf vs .htaccess vs mod_rewrite has me a bit confused right now.

:cool:

snakes1100
Tue 9th Mar '04, 9:07pm
Well php.ini is the default, but that dont mean that the server is using that one in etc/, it could be using it from another location, at the top of phpinfo it will tell u which one it is using.

yw too