Thursday, 26 June 2014

How to Disable magic quotes Joomla on Linux Server

Error while accessing modsec control from WHM :Software error

Can’t locate JSON/XS.pm in @INC (@INC contains: /usr/local/cpanel /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/5.8.8 .) at /usr/local/cpanel/Cpanel/JSON.pm line 15.


You can disable magic quotes in joomla by adding the following line to the php.ini file.

magic_quotes_gpc = Off


If it did’t solver the issue you need to add the following lines to the php5.ini in the document-root.

magic_quotes_gpc = Off
magic_quotes_runtime = Off
magic_quotes_sybase = Off
extension=pdo.so
extension=pdo_mysql.so


If the file php5.ini is not there in the document root, then you can rename the php.ini as php.ini.

Also after adding this you need to add the following lines on the .htaccess file. If there is no .htaccess then you can create a new file and add the following codes to it,

SetEnv PHPRC /home/$username/public_html/

Note : Replace the path “/home/$username/public_html/” properly with your path.

No comments:

Post a Comment