Site icon David Yin's Blog

Joomla on 1and1 shared server

I have a installation on 1and1 shared server, beginner package.
In the Administrator, back-end, I got the warning as below:

PHP register_globals setting is `ON` instead of `OFF`

It looks like a big risk for server and the sites on it.
I tried a lot of ways. Still have this problem.
Just like add a php.ini file on every folder, or change .htaccess file by add

php_flag register_globals off

, which make a 500 error.
Finally I got the answer from bikeman on this post.

1and1 hosting uses multiple levels of php. With php5, register_globals is by default OFF.
To switch from php4 to php 5 you can
i) change all .php files to suffix .php5 which is worse than placing a php.ini in every folder wacko.gif
or ii) add the line, AddType x-mapp-php5 .php, to a .htaccess in your root directory. The good news is it applies to all sub-directories smile.gif
This seems to avoid server 500 errors, unlike a .htaccess with the line, php_flag register_globals off
Such a shame that 1and1 tech support couldn’t have told me of this!

I choose way 2, and it works.
Add the following line in my .htaccess file.

AddType x-mapp-php5 .php

Exit mobile version