When I first attempted to install Joomla 3 on my shared host I received an error message in the pre installation check showing that magic quotes was switched on and I could not continue.
Not only does Joomla 3 not like magic quotes on installation, unless you follow the instructions below you will also get problems with image paths when using the CMS too.
The first 'fix' I found managed to get me passed the install.
However I soon found further issues with the Magic Quotes still being switched on.
Image path issue
If Magic Quotes is left on after Joomla 3 installation, when you save an article the editor will change the path to make the image disappear.
See example below:
If you were to add an image to an article and make sure you DO NOT SAVE.
Then using the code view you would see the following in the file.
<p><img alt="Test image" src="/images/Testimage.jpg" height="225" width="300" /></p>
Now if you save the file and re-open the code view you see will see something like this:
<p><img src="/\"images/Testimage.jpg\"" alt="\"Test image" width="\"300\"" height="\"225\"" /></p>
Again after much searching I found this was due to Magic Quotes being installed.
Therefore I thought I would share the total fix that ensures it is switched off for good.
Follow the instructions below to turn off Magic Quotes for Joomla 3.
- Add you files to your host via FTP
- Use notepad to create a file called php.ini
- Add the following lines to the file:
- Now use FTP to connect to your host and place your newly created file in /public_html
- Place a copy of this file into the installation directory.
- Finally add a copy to root of the the Administrator folder
magic_quotes_gpc = Off
magic_quotes_runtime = Off
magic_quotes_sybase = Off
You will now be able to complete the Joomla installation and magic quotes will be switched off when using Joomla too.
If you're worried about security then see Magic quotes and security on the Joomla site.