Actions

Difference between revisions of "How to turn off magic quotes gpc for Joomla 3"

From Joomla! Documentation

m (For MAMP)
m (For Rochen or some other Joomla hosts similar to its setup)
Line 8: Line 8:
 
== For Rochen or some other Joomla hosts similar to its setup ==
 
== For Rochen or some other Joomla hosts similar to its setup ==
 
Steps:
 
Steps:
1) Create a php.ini file with the following:
+
* Create a php.ini file with the following:
 
<pre>magic_quotes_gpc = Off
 
<pre>magic_quotes_gpc = Off
 
extension=pdo.so
 
extension=pdo.so
 
extension=pdo_mysql.so</pre>
 
extension=pdo_mysql.so</pre>
  
2) Put it in your Joomla 3 root. Then change the htaccess.txt in your Joomla 3 root to .htaccess. Add the following lines to the .htaccess file (at the top) :
+
* Put it in your Joomla 3 root. Then change the htaccess.txt in your Joomla 3 root to .htaccess. Add the following lines to the .htaccess file (at the top) :
 
<pre><IfModule mod_suphp.c>
 
<pre><IfModule mod_suphp.c>
 
   suPHP_ConfigPath /home/myusername/public_html/yourJ3folder
 
   suPHP_ConfigPath /home/myusername/public_html/yourJ3folder

Revision as of 03:36, 17 December 2012

For MAMP

Steps:

  • Go to MAMP application >> Preferences (button) >> PHP (tab) >> Choose 5.3.1 or greater >> choose OK.
  • Go to the MAMP folder >> bin >> php >> php5.3.6 >> conf >> edit php.ini >> add "magic_quotes_gpc = Off" a few lines above "magic_quotes_sybase = Off".
  • Restart MAMP's servers.

For Rochen or some other Joomla hosts similar to its setup

Steps:

  • Create a php.ini file with the following:
magic_quotes_gpc = Off
extension=pdo.so
extension=pdo_mysql.so
  • Put it in your Joomla 3 root. Then change the htaccess.txt in your Joomla 3 root to .htaccess. Add the following lines to the .htaccess file (at the top) :
<IfModule mod_suphp.c>
  suPHP_ConfigPath /home/myusername/public_html/yourJ3folder
  <Files php.ini>
    order allow,deny
    deny from all
  </Files>
</IfModule>

Change "myusername" and "yourJ3folder" to your respective folders.

.htaccess for some hosts

For some host, add "php_flag magic_quotes_gpc off" to the .htaccess file