Help - Search - Members - Calendar
Full Version: register_globals on?
The Planet Forums > Control Panels > cPanel/WHM
vivo2341
I have a customer trying to setup oscommerce and it will not work because he says register_globals is off, but I double checked php.ini and it is turned off already.. I am not sure of how the cpanel setup works so I was wondering if any of you had an suggestions of how I can enable it for this site? Would I just do something like the following in my httpd.conf??

ServerAdmin webmaster@domain.com
DocumentRoot /home/siteadmin/public_html
BytesLog domlogs/domain.com_log
User admin
Group admin
ServerName www.domain.com
ScriptAlias /cgi-bin/ /home/siteadmin/public_html/cgi-bin/
CustomLog domlogs/domain.com combined
register_globals Off
jreed
Assuming that you're trying to turn register_globals on for a particular user, the easiest method (from an administrative point of view) would be to instruct the user to create an .htaccess file in the appropriate directory with the following contents:

php_flag register_globals on

Sure beats editing httpd.conf, restarting, etc.
vivo2341
That did not work for some reason... any other ideas.. I am really lost.. Someone suggested doing a PHP_INI_PERDIR register_globals = off in php.ini rather than the normal register_globals = On in the default /etc/php.ini
jreed
Make sure you have an AllowOverride All directive between the relevant containers in httpd.conf.

If it doesn't exist, you can add the following:


AllowOverride All


The above will allow all users the ability to modify php.ini settings via .htaccess files. To restrict to a single user, replace the asterisk with the username.
igorluks
I have tried that, but still throws 500 internal server error when I try to put:

php_flag register_globals Off

into:
/home/someuser/public_html/.htaccess

Do you have any suggestions on how to resolve this...
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.