Posted by ttgt, 03-29-2009, 01:04 AM | my server is centos and cpanel,
i setup it with suphp and suEXEC,
and i set the register_globals as off on server,
now,i had a website need register_globals on,
i search many articles and try to edit php.ini and .htaccess,
but all still show
FATAL ERROR: register_globals is disabled in php.ini, please enable it!
or
500 internal error
could anyone teach me how to solve the issue?
|
Posted by sam0, 03-29-2009, 03:02 AM | You shouldn't need to have register_globals turned on, it is a sign of poor coding if any script requires it.
Try:
php_admin_value register_globals 1
in your virtualhost, eg:
ServerName localhost
DocumentRoot /var/www
php_admin_value register_globals 1
|
Posted by ttgt, 03-29-2009, 03:34 AM | osCommerce need it as on,i need to make it.
i hope i can set it from account side directly,
do not edit the system file for particular account.
|
Posted by sam0, 03-29-2009, 06:14 AM | You should also be able to put "php_admin_value register_globals 1" in a .htaccess.
I'm amazed oscommerce forces you to enable register_globals. You could also try: http://www.magic-seo-url.com/oscomme...obals-off.html
|
Posted by ttgt, 03-29-2009, 06:25 AM | it shows Internal Server Error, IOI
|
Posted by david510, 03-29-2009, 07:13 AM | Try in .htaccess
php_flag register_globals On
|
Posted by ttgt, 03-29-2009, 07:15 AM | soory,it also shows Internal Server Error.
|
Posted by relichost, 03-29-2009, 07:31 AM | Hi
With SuPHP you need to put the php.ini with register_globals= On in the catalog directory (ie where you oscommerce is running from)
and remove any php_ entries from the .htaccess
Thanks
|
Posted by ttgt, 03-29-2009, 07:37 AM | about the two .htaccess in /public_html and /public_html/catalog,
they both be empty.
and i put a php.ini under /public_html/catalog,
it code with "register_globals= On",
but still no work.
|
Posted by relichost, 03-29-2009, 07:38 AM | What does your error_log say ?
|
Posted by ttgt, 03-29-2009, 07:38 AM | is it possible any other setting make it unable?
|
Posted by ttgt, 03-29-2009, 12:24 PM | im sorry,where can i check the log?
|
Posted by relichost, 03-29-2009, 12:33 PM | Hi
In Cpanel ?, I assume your using Cpanel?
theres an icon called error log
Thanks
|
Posted by ttgt, 03-29-2009, 12:39 PM | i find those
---------------------
[Mon Mar 30 00:23:14 2009] [alert] [client 55.22.33.44] /home/gtt/public_html/.htaccess: Invalid command 'php_flag', perhaps misspelled or defined by a module not included in the server configuration
[Mon Mar 30 00:23:14 2009] [alert] [client 55.22.33.44] /home/gtt/public_html/.htaccess: Invalid command 'php_flag', perhaps misspelled or defined by a module not included in the server configuration
[Mon Mar 30 00:23:13 2009] [alert] [client 55.22.33.44] /home/gtt/public_html/.htaccess: Invalid command 'php_flag', perhaps misspelled or defined by a module not included in the server configuration
[Mon Mar 30 00:23:13 2009] [alert] [client 55.22.33.44] /home/gtt/public_html/.htaccess: Invalid command 'php_flag', perhaps misspelled or defined by a module not included in the server configuration
[Mon Mar 30 00:22:52 2009] [alert] [client 55.22.33.44] /home/gtt/public_html/.htaccess: Invalid command 'php_admin_value', perhaps misspelled or defined by a module not included in the server configuration
[Mon Mar 30 00:22:52 2009] [alert] [client 55.22.33.44] /home/gtt/public_html/.htaccess: Invalid command 'php_admin_value', perhaps misspelled or defined by a module not included in the server configuration
[Mon Mar 30 00:22:47 2009] [alert] [client 55.22.33.44] /home/gtt/public_html/.htaccess: Invalid command 'php_admin_value', perhaps misspelled or defined by a module not included in the server configuration
[Mon Mar 30 00:22:47 2009] [alert] [client 55.22.33.44] /home/gtt/public_html/.htaccess: Invalid command 'php_admin_value', perhaps misspelled or defined by a module not included in the server configuration
|
Posted by relichost, 03-29-2009, 02:39 PM | Ok
Edit your .htaccess file and remove the php_flag statement(s)
and create a php.ini file with
register_globals =On
This should solve the Internal error
If you need specific help please PM me
Thanks
|
Posted by ttgt, 04-19-2009, 08:40 AM | it still not work at all,is it possible the server run with suhosin.simulation ?
thanx
|
Posted by Syslint, 04-19-2009, 09:38 AM | 1) With suphp.
You can't use php flags in .htaccess . If so it will show internal server error
2) Copy your original php.ini to your document root ( where your files are located ) , then enable register_global in that file
3) If you still issue , you already disabled the local php.ini include option in php compilation time, if so please consider recompiling php
|
|
Add to Favourites
Print this Article |