I am installing Joomla. It reported that magic_quotes_gpc is switched on so I went to check out php.ini. In there it's showing as off. I did a bit of googling and it turns out the server could be reading a different php.ini file and to check the 'Loaded configuration' section of phpinfo. So I did.

It reports that it is loading the same file I looked at, and it (phpinfo) also reports magic_quotes_gpc as being on.

Does anyone know what could be causing two seperate entities (joomla setup and phpinfo) to report it as 'On' but php.ini shows it as off?

EDIT: I figured out what was going on. There was an error earlier in php.ini which was causing the server not to parse the rest of the file.

  • Please post the exact error and what you found out as a fix/answer to your own question. The problem still perists and your inputs are valued. – itsols Apr 4 '13 at 5:48
  • It's been a while so I might not remember what the problem was, but when I get time I will update the question. Edit: I did remember - I never found out what the problem was. I left it alone as it wasn't a deal breaker. – MrVimes Apr 4 '13 at 8:35
  • but your EDIT on the question says you found out what was going on... something about an error :) – itsols Apr 5 '13 at 2:40

Here's the solution.

Had it not been to install Joomla 3, I wouldn't have taken the trouble to check this out :)

First, the file to modify is


We are supposed to turn off magic quotes so that the line looks like this:

magic_quotes_gpc = Off

The above change was on line 756 for my version.

But this change had no effect since the block starting at line 99 had errors. Here's the block of text WITH the errors:

; display_errors
   Default Value: On
   Development Value: On
;   Production Value: Off

; display_startup_errors
   Default Value: On
   Development Value: On
;   Production Value: Off

; error_reporting
   Default Value: E_ALL & ~E_NOTICE
   Development Value: E_ALL | E_STRICT
;   Production Value: E_ALL & ~E_DEPRECATED

; html_errors
   Default Value: On
   Development Value: On
;   Production value: Off

; log_errors
   Default Value: On
   Development Value: On
;   Production Value: On

Note that some rows don't have a leading semicolon (;). How did this happen? I'm not sure. However, these rows (above) are not the actual settings. So they need to be commented by adding the semi-colon in front.

The fix was to comment them and leave line 756 as shown, for the magic quotes statement.

Then restart apache like this from the terminal:

sudo service apache2 restart

Now you're ready to install Joomla 3 :)

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

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