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

Bookmark and Share


Related Posts:

Filed Under: PHP

One Comment to “register_globals”

  1. alavojda Says:

    very nice

Leave a Comment









*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word




Categories

Archives

Meta