- Markus Breitenbach - http://blog.markus-breitenbach.com -

PHP configuration using htaccess on 1and1 shared hosting

Posted By Markus On June 15, 2010 8:21 pm @ 8:21 pm (June 15, 2010) In Fixing Stuff | No Comments

I had some problems setting PHP values for shared hosting on 1and1 and the suggested way from their FAQ using php.ini didn’t work for me. Here are the settings in .htaccess that worked for me:

AddType x-mapp-php5 .php

# PHP 4, Apache 1
<IfModule mod_php4.c>
php_value magic_quotes_gpc 0
php_value register_globals 0
php_value session.auto_start 0
</IfModule>

# PHP 4, Apache 2
<IfModule sapi_apache2.c>
php_value magic_quotes_gpc 0
php_value register_globals 0
php_value session.auto_start 0
</IfModule>

# PHP 5, Apache 1 and 2
<IfModule mod_php5.c>
php_value magic_quotes_gpc 0
php_value register_globals 0
php_value session.auto_start 0
</IfModule>

This instructs the server to use PHP5 and the configuration below is turning off the magic quotes, register globals and session auto start features.


Article printed from Markus Breitenbach: http://blog.markus-breitenbach.com

URL to article: http://blog.markus-breitenbach.com/2010/06/15/php-configuration-in-htaccess-on-1and1-shared-hosting/

Click here to print.