Home > PHP > register_globals

register_globals

January 15, 2005 Posted by KP

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(); ?>



Related Posts:

Filed Under: PHP

One Comment to “register_globals”

  1. alavojda Says:

    very nice

Leave a Comment

(required)
(will not be published, required)

* Copy this password:

* Type or paste password here:






Archives

Links