PHP Web Host - Quality Web Hosting For All PHP Applications Sign up for PayPal and start accepting credit card payments instantly
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
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: 15229
Location: Kansas

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

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!
).
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
montego
Site Admin


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

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

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?
View user's profile Send private message Visit poster's website
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 15229
Location: Kansas

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

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)
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
Display posts from previous:       
Post new topic   Reply to topic

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
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2008 by Raven
Proud to be listed at Lobo Links Web Directory

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::

:: fisubice Theme Recoded To 100% W3C CSS & HTML 4.01 Transitional Compliance by Raven and 64bitguy ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum