For OsCommerce to work, apparently one needs to enable register_globals. (??? What were they thinking ???) Anyway, been trying various methods in .htaccess to do this:
Code:
<Directory "/home/aether/public_html/shoppingcart">
AllowOverride All
php_admin_flag register_globals on
php_admin_flag register_long_arrays on
</Directory>
These cause Misconfig 500 errors.
Have also tried:
Code:
php_value register_globals 1
Also error 500.
Any other ideas? I'm running CentOS. .htaccess definitely works, because I've used mod_rewrite... among other things.
Sorry, should have clarified: I don't want every CPanel account to have register_globals on, just one. Changing php.ini would modify the setting server-wide, which is an uber-no-no. Thanks for the response, but that's not what I want to do. Is there anything else in .htaccess that I should set?
Have you tried creating a php.ini file and putting the directive into that. If I remember correctly if you have safe mode enabled php directives need t be in the php.ini file.
If this is the case you do not edit the main php.ini file you create a new 1 and enter the options into tha and place it in the root folder for that hosting package.
Tree: That second method would be great, and thanks for that code, except the shopping cart will display an error if the whole setting is 0 / off. I suppose we could just disable the display of that error and put that script on each page, though. Still an option.
Weblord: I can't edit the php.ini file, because I need this to apply only to the one cpanel account.
Interesting indeed! I will investigate using safe mode in the main php.ini and try this method. Thanks.
yes by all means. My post wasn't to recommend the option but rather to point out it is housed in a php.ini file if you are using safe mode. The op should look to see if he hs that enabled.