FreeBSD Server Administration

« Complete Steps to Add a Website | Main | Separate Log Files for Virutal Host »

January 15, 2005

register_globals

In my last post, I wrote: "PHP doesn't need any configuration if installed with pkg_add", well, this is not accurate, I found several php scripts worked weird, that reminded me of the famous parameter register_globals. It's off by default, pkg_add doesn't create php.ini, if you want to enable register_globals, you have to create a php.ini and modify the configuration, then restart Apache.

# cp /usr/local/etc/php.ini-recommended /usr/local/etc/php.ini

In PHP documentation, there is no configuration guide specially for FreeBSD, there are two related sections: OpenBSD and Unix installation, they both use different place for php.ini.

Update: I deleted the comments of this post accidentally and lost some useful information.

The easiest way to know where to put php.ini is creating a php file like below and check the output, the key for php.ini is "Configuration File (php.ini) Path"

<?php phpinfo(); ?>


Category : PHP

Posted by FreeBSD Newbie at January 15, 2005 09:52 PM

Comments

very nice

Posted by alavojda at October 22, 2005 08:38 PM

Post a comment



(Optional, will not be shown to the public)

Remember Me?