Welcome to WebmasterWorld Guest from 107.20.110.201

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

PHP ini_set() in .htaccess

How to...

     

DrDoc

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

WebmasterWorld Senior Member drdoc is a WebmasterWorld Top Contributor of All Time 10+ Year Member



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

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

WebmasterWorld Senior Member 10+ Year Member



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

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

WebmasterWorld Senior Member drdoc is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Thank you Andreas!

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

andreasfriedrich

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

WebmasterWorld Senior Member 10+ Year Member



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

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

WebmasterWorld Senior Member drdoc is a WebmasterWorld Top Contributor of All Time 10+ Year Member



So, I'd use something like

php_flag session.save_handler user

right? ... or is it php_value?

 

Featured Threads

Hot Threads This Week

Hot Threads This Month