Translations of this page?:

PHP restrictions using ini_set

The hosting service i use obviously does not allow ini_set() commands. These calls are used in common.php lines 18,31,34: arg_separator.output, magic_quotes_gpc, magic_quotes_sybase. Which features of Dokuwiki would be restricted when commenting out those lines to avoid the error messages?


Further notes on ini_set: Setting magic_quotes_gpc, for example, inside a PHP script has no effect. The magic quotes will already have been added before the script was parsed. The same applies to other ini settings like register_globals - it's too late once script execution has begun.

If you look in the ini setting list and examine the Changeable column then compare the value with the table at the bottom of that page, it should make sense.

For the specific case of magic_quotes_gpc, there's useful further discussion here

Answers

Well register_globals is set to off after stripping additional slashes as suggested in the linked article. Setting it is just to inform libraries that maybe include the same logic. I think in DokuWiki this call can be safely removed.

arg_separator.output defines what URL-parameter separator is used for PHP generated URLs - this should affect autmatically added session-IDs only. If you remove this call you will break XHTML validity for pages were the session-ID is added to links.

To sum it up: DokuWiki should work without these settings.

Andreas Gohr 2005-03-19 23:02

 
wiki/discussion/ini_set.txt · Last modified: 2006/11/13 14:48 by andi
 
Imprint Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki
WikiForumIRCBugsTranslate