every one here say to enable register_global you need one of tow things :
add this line to htaccess : php_flag register_globals on
add this lines to httpd.conf :
php_flag register_globals on
my problem is when i add the line to htaccess i get error 500 internal server error.
and when i add the lines to httpd.conf apache can't start again.
i have WHM with PHP 4.4.3 and php.ini register_global off, phpcuexec
i am don't want to edit php.ini because i have many mods there done by server admin and i am afred if i edit it to need to recompile php/apache then will lost all php mod and batch and extintions than added.
so what should i do now to enable register_global for some domains on the server ?
If you have phpsuexec enabled on your server, you cannot pass php values through .htaccess. If you are using .htaccess with php_value entries within it, you will receive an internal server 500 error. This is because php is not running as an apache module and apache will not know how to handle those directives when phpsuexec is enabled.
You will need to enable 'register_globals' through php.ini rather than through .htaccess.
And you do not need to edit the main php.ini on the server. You can create seperate php.ini files and place them in the root directories of the accounts for which you want to change the php values.
register_globals = On
The above entry in the php.ini file will enable 'register_globals' for the particular account. You would need to edit the server's main php.ini only if you want to make the changes server wide.
SupportExpertz.com - the name says it all!
Managed Cloud Servers
Server Management and Monitoring
24x7 outsourced customer support
Yes, you can create a php.ini file and place it in /home/user/ or /home/user/public_html/ (whichever is the root directory of that account).
Give the entry to enable 'register_globals' in that file along with any other php values that you want to enable...
Here you need to create php.ini where .htaccess are available means like this /home/user/public_html
Just for note: Not only register_globals, Most of the user identified data can be pass through this way.
now i am using php.ini in each account that need register_globals on
but some site giving error in the log file like this error :
23-Sep-2006 09:20:16] PHP Warning: Unknown(): open(/tmp/sess_66351d08ad3d4a19a5e36969819f593f, O_RDWR) failed: Permission denied (13) in Unknown on line 0
[23-Sep-2006 09:20:16] PHP Warning: Unknown(): Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0