Archive for the ‘.htaccess’ Category

Suhosin Values in Magento

Posted: April 7, 2013 in .htaccess, Magento

Sometimes Magento admins face the issue of some values missing from the frontend even though the configuration would have shown to be saved from Backend. This could be due the limit in the number of values set by suhosin.

The common override for this issue is to have the following values set in .htaccess

php_value suhosin.mail.protect 0
php_value suhosin.memory_limit 128M
php_value suhosin.post.max_vars 5000
php_value suhosin.post.max_value_length 500000
php_value suhosin.request.max_vars 5000
php_value suhosin.request.max_value_length 500000
php_flag suhosin.session.cryptua off

For php.ini use the variables without php_value or php_flag


[error] [client 192.168.3.2] ALERT - Include filename 
('tmpl:///var/www/joomla/components/com_foo/views/people/tmpl/default.php')
is an URL that is not allowed (attacker '192.168.3.2', 
file '/var/www/joomla/plugins/system/koowa/view/abstract.php', line 418)


To fix this add the following to your php.ini file if you are using suhosin :

 (more…)

How to disable XCache per domain

Posted: March 23, 2013 in .htaccess

Add an htaccess file in the root folder of the website with the following info

php_flag xcache.cacher Off
php_flag xcache.size 0
php_flag xcache.stat Off


To turn off magic_quotes and magic_quotes_gpc off in .htaccess, simply put these lines in the .htaccess file of your site / directory or in /home/public_html/ wherein you want magic_quotes or magic_quotes_gpc disabled:

php_value magic_quotes 0

php_flag magic_quotes off

php_value magic_quotes_gpc 0

php_flag magic_quotes_gpc off


1. Go to /home/username/public_html

2. Vi .htaccess

php_value suhosin.post.max_vars 4096
php_value suhosin.request.max_vars 4096
php_value suhosin.get.max_value_length 2000
php_value suhosin.request.max_varname_length 350

3. Exit and save

Note: Also you can verify the changes by creating a info.php file
Type the url as http://www.domainname.com/info.php
Please find the screenshot pasted below.

Screenshot-1