Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> FAQ - PHP5 w/phpSuExec Conversion From PHP4
Poll
Was this helpful?
Yes
100%
 100%  [ 2 ]
No
0%
 0%  [ 0 ]
Total Votes : 2


Author Message
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

PostPosted: Tue Nov 27, 2007 1:20 am Reply with quote

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! ] ).
 
View user's profile Send private message
montego
Site Admin



Joined: Aug 29, 2004
Posts: 9457
Location: Arizona

PostPosted: Tue Nov 27, 2007 5:38 am Reply with quote

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?

_________________
Where Do YOU Stand?
HTML Newsletter::ShortLinks::Mailer::Downloads and more... 
View user's profile Send private message Visit poster's website
Raven







PostPosted: Tue Nov 27, 2007 8:16 am Reply with quote

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 Evil or Very Mad , I realized that it isn't really as bad as it first seems Smile. 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 Confused . Also, suphp requires Apache 2.2 and later to function (yet another change coming in 2008)
 
Display posts from previous:       
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> FAQ - PHP5 w/phpSuExec Conversion From PHP4

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
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©