I have been creating a Joomla 3.3.0 site on my local pc using XAMPP / PHP Version 5.4.7 and I have had no issues whatsoever. However today I tried to move my site to a live shared hosting environment and encountered some issues.

The migration itself was fine, using Akeeba Kickstart I was able to transfer my files and database, and the website does infact appear to be working fron the front-end. However when logged into the /administrator area of my site there is an error displayed at the top of my Joomla interface "Your host needs to disable magic_quotes_gpc to run".

My host is running php 5.4.x (BT web hosting)

I also notice that some of the admin functionality is missing, eg - I cannot set my website to be offline, another error message appears about tables not being writeable (I don't remember the exact message). I have since set my site to be offline by editing the configuration.php file.

I have ready that adding magic_quotes_gpc = Off to my php.ini file but there is no change. I have yet to follow this guide http://docs.joomla.org/How_to_turn_off_magic_quotes_gpc_for_Joomla_3 However this is my next step - I will post an update.

Why does this error appear, and what does it mean exactly?


Update 1

Deleted everything and started again, I can now see this error message in Akeeba while trying to restore.

IMPORTANT! You are restoring on a server with a different PHP version than the one you used to back up your site.

Your original site server's PHP version was 5.4.7 and your current PHP version is 5.3.28. Please note that different PHP versions may have differences which can cause your extensions (components, modules, plugins, libraries and templates) to not work properly. In these cases the restoration will complete without an error but your site may not display correctly or not load at all. Unfortunately, we cannot provide support for these issues. You will have to check that all of your extensions support PHP 5.3.28 before attempting to restore your site on this server.


Update 2

I have now resolved the "Your host needs to disable magic_quotes_gpc to run" error by adding the lines below to my .htaccess file

<IfModule mod_suphp.c>
  suPHP_ConfigPath /home/myusername/public_html/yourJ3folder
  <Files php.ini>
    order allow,deny
    deny from all

I also had to create a php.ini file and add it to my root folder and add the following lines

magic_quotes_gpc = Off
magic_quotes_runtime = Off
magic_quotes_sybase = Off

However now I don't seem to have write access to make any changes in the admin area - could this be related. The error I get is as follows (when tyring to set the site to be offline)

1044 Access denied for user 'MyUser'@'%' to database 'MyDb' SQL=LOCK TABLES ix5ta_assets WRITE

  • Did you restart Apache after changing the php.ini ?
    – Lodder
    Jun 30, 2014 at 14:40
  • I'm on shared hosting and I don't think that is permitted. However I did make the changes via their web interface which has a 'save and apply changed to php file' button. Didn't make any difference.
    – jonboy
    Jun 30, 2014 at 14:44
  • 1
    Your host isn't running PHP 5.4.x for sure. Because in PHP 5.4 magic quotes is removed. According to Akeeba it is PHP 5.3.28. The other error you now see isn't related to magic quotes. It's related to your database settings. You need to make sure the configuration.php file contains the correct credentials.
    – Bakual
    Jun 30, 2014 at 20:23

1 Answer 1


It's best to contact your host to ask them about this. They may have a different setup and your php.ini file may be getting ignored. You can easily disable magic_quotes for you, or they can adjust the settings so your php.ini is honored.

In the meantime, you can modify the configuration.php file manually via ftp to take the site offline. Just change public $offline = '0'; so it reads public $offline = '1'; and save the file.

  • Thanks Brian I did make that change and the site is now offline, however the magic quotes error is still there. My shared hosting allows the creation of a custom php.ini file, which I have edited with the values mentioned in the official Joomla documentation however no change. Perhaps the change will need a while to authenticate?
    – jonboy
    Jun 30, 2014 at 14:49
  • I doubt it. I'd ask your host about it. It's probably a simple answer, but I know I've run into this before and my host had the answer.
    – Brian Peat
    Jun 30, 2014 at 15:06
  • It was the mysql user settings, the had'nt got all privileges - contacted host and they are sorting it for me - thanks!
    – jonboy
    Jul 1, 2014 at 8:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.