You are missing our premiere tool bar navigation system! Register and use it for FREE!

NukeCops  
•  Home •  Downloads •  Gallery •  Your Account •  Forums • 
Readme First
- Readme First! -

Read and follow the rules, otherwise your posts will be closed
Modules
· Home
· FAQ
· Buy a Theme
· Advertising
· AvantGo
· Bookmarks
· Columbia
· Community
· Donations
· Downloads
· Feedback
· Forums
· PHP-Nuke HOWTO
· Private Messages
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Theme Gallery
· Top
· Topics
· Your Account
Who's Online
There are currently, 363 guest(s) and 0 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
How to change PHP parameters when you don't have access to php.ini

27.3. How to change PHP parameters when you don't have access to php.ini

Unless you have your own "root" server, you are most probably sharing the same hardware with a few thousand other so-called "virtual" domains. For this reason, it is all too natural that your ISP will deny you access to the system-wide php.ini file (usually located under /etc). Whatever value you enter there, is going to affect all the virtual domains running on that machine!

But what to do if you find out that you must change a setting and you are told to change it in php.ini? Fortunately, there is an alternative way - and once again the .htaccess file (see Section 25.4) comes to your rescue:

To set register_globals to off (a good idea from a security point of view, see Section 23.4.2), for example, add

php_flag register_globals off

to the .htaccess file in the PHP-Nuke root directory.

To set magic_quotes to off (a bad idea from a security point of view, see Section 23.4.2), you can add the following line to the .htaccess file in the PHP-Nuke root directory:

php_flag magic_quotes_gpc off

To set "display_errors" to off, add:

php_flag display_errors off

while to set the include path (see Section 3.9.10), you can add

php_value include_path "your/include/path/here"

If you get a memory limit error like:

Fatal error: Allowed memory size of 8388608 bytes exhausted 
(tried to allocate 67584 bytes) in xxx/xxxxxxx/xxxxx

then you can try to increase allocated memory with

php_value memory_limit "16M"

although you will probably not achieve the desired result, due to restrictions that your ISP has set in place.

To change the maximum execution time limit of your PHP scripts, add:

php_value max_execution_time 60

This will set the time limit to 60 seconds. But if you are not allowed to change php.ini, it is doudtful that you will be allowed to change the value of max_execution_time in a .htaccess file. If you can do it, however, then the .htaccess method gives you the flexibility to set different time limits in different directories - and thus different scripts that reside therein. See also Page genration time too long.

As you have guessed by now , the general syntax is:

php_value PHP-variable value

Help us make a better PHP-Nuke HOWTO!

Want to contribute to this HOWTO? Have a suggestion or a solution to a problem that was not treated here? Post your comments on my PHP-Nuke Forum!

Chris Karakas, Maintainer PHP-Nuke HOWTO

Powered by TOGETHER TEAM srl ITALY http://www.togetherteam.it - DONDELEO E-COMMERCE http://www.DonDeLeo.com - TUTTISU E-COMMERCE http://www.tuttisu.it
Web site engine's code is Copyright © 2002 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.044 Seconds - 197 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::