homepage Welcome to WebmasterWorld Guest from 54.161.214.221
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
PHP ini_set() in .htaccess
How to...
DrDoc




msg:1256081
 7:02 am on Mar 25, 2003 (gmt 0)

How do I change PHP settings in the .htaccess file? It says on the ini_set function help page that I can do that (with some settings) instead of directly in the script, but it doesn't explain how. Would appreciate any help...

 

andreasfriedrich




msg:1256082
 10:54 am on Mar 25, 2003 (gmt 0)

See How to change configuration settings [php.net].


php_flag session.use_cookies off
php_flag track_vars off
php_value arg_separator.input ";&"

In your .htaccess files you can only change PHP_INI_ALL and PHP_INI_PERDIR type directives. For a list of those directives have a look at the table within the ini_set [php.net] documentation.

Andreas

DrDoc




msg:1256083
 2:41 pm on Mar 25, 2003 (gmt 0)

Thank you Andreas!

Yes, I already took a look at the ini_set() page... This will be really useful ;)

andreasfriedrich




msg:1256084
 2:47 pm on Mar 25, 2003 (gmt 0)

You´re welcome, DrDoc.

It is really useful indeed since it safes you from having to use ini_set [php.net] in all your scripts.

Using arg_separator.input to set the arguments separator to ; will save you from any hassle with non-escaped ampersands in query strings. So it should be present in all your root level .htaccess files or httpd.conf files.

Andreas

DrDoc




msg:1256085
 3:03 pm on Mar 25, 2003 (gmt 0)

So, I'd use something like

php_flag session.save_handler user

right? ... or is it php_value?

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved