Joined: Aug 27, 2002 Posts: 15229 Location: Kansas
Posted:
Tue Nov 27, 2007 1:20 am
While the server default settings with php.ini may restrict certain applications, it is possible to modify the settings and how php will run on your account on a per directory basis. For example, If you have an application that requires:
register_globals = On
Then by creating a file named php.ini within the directory that the script is located within, with the following entry, would allow you to run that script with your settings.
EG. php.ini
register_globals = On
If you also require say Zend Optimizer to be installed for your application, you would add :-
php.ini
register_globals = On
zend_optimizer.optimization_level=15
zend_extension="/usr/local/Zend/lib/ZendOptimizer.so"
You may copy the other variables from the phpinfo page as they appear within it and modify the settings as required for your scripts.
Some important relevant default php values are as follows:-
register_globals = Off
register_argc_argv = Off
safe_mode = On
magic_quotes_gpc = Off
All other settings can be viewed from your servers phpinfo.php page (see
Only registered users can see links on this board! Get registered or login to the forums!
Joined: Aug 29, 2004 Posts: 7487 Location: Arizona
Posted:
Tue Nov 27, 2007 5:38 am
A "Nuke" question: since 99% of the time, the browser request is to either index.php, modules.php or admin.php, is php.ini at the root level good enough to cover most executions of nuke scripts? Or, does there need to be a php.ini within each and every directory of nuke with our desired settings?
Joined: Aug 27, 2002 Posts: 15229 Location: Kansas
Posted:
Tue Nov 27, 2007 8:16 am
Unfortunately at the present time, the phpSuExec application requires a php.ini in every directory that needs it. And from what I read this is not an issue with suexec as much as it is a constraint by using PHP as a CGI. Hopefully in future releases this will be enhanced.
However, as I fretted over this , I realized that it isn't really as bad as it first seems . For example, the php directive php_value output_buffering on in a path like /www/modules/Module_Name/admin/modules/Another_Name/index.php really only needs it in the Another_Name folder and not in every folder in the path.
Also, your Host can ease some of the pain by adding/changing settings in the global php.ini. Of course it will depend on if the global php.ini setting can be used w/o adversely affecting other accounts on the server and/or server performance.
One other thing to note, phpsuexec has reached End Of Life (EOL) and suphp is the recommended replacement. However, cPanel is still only supporting phpsuexec so we are stuck between the proverbial rock and hard place . Also, suphp requires Apache 2.2 and later to function (yet another change coming in 2008)
View next topic View previous topic
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum