Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I've a problem on my Ubuntu Server 12.04 with PHP. As per /etc/php5/apache2/php.ini:

; http://php.net/magic-quotes-gpc
magic_quotes_gpc = Off

But the phpinfo.php says that Magic quotes are ON...

Also

sebastien@thivinfo:~$ php -l /etc/php5/apache2/php.ini 
No syntax errors detected in /etc/php5/apache2/php.ini

How

share|improve this question
3  
I am guessing you restarted the server or at least apache. –  Goddard Dec 19 '12 at 23:29
    
Yep, did you run sudo service apache2 restart, after you changed the setting? –  saji89 Dec 23 '12 at 5:51
add comment

3 Answers

EDIT

Is this problem still persists ? If you have missed the semicolon in php.ini, the changes will not reflect. try adding semicolon after each setting if you have missed.

If you are in shared hosting, there will be an option in your control panel to end the current session (something like End Web in GoDaddy). Kill that to start a new session to load your newly configured php.ini . .

PS: If the problem is in local machine, you have to restart your webserver. Also, in some hosting providers, configuration files will take effect from a specified time, like 12 00 hours GMT etc. In that case you can contact your hosting provider for that.

share|improve this answer
    
Thx for answer. I've my own hosting and make several times sudo service apache2 restart....I have to reboot completely my server? –  Sébastien Serre Dec 20 '12 at 6:21
    
Just rebooted and pb allways here.... –  Sébastien Serre Dec 20 '12 at 6:25
add comment

Are you sure you are modifying the correct php.ini? phpinfo() shows you were the php.ini is located.

share|improve this answer
add comment

I ran into the same problem, and it is a syntax error in php.ini even though running php -l /etc/php5/apache2/php.ini results in No syntax errors detected in /etc/php5/apache2/php.ini

I found the error in the following line in the ini file error_reporting = E_ALL& & ~E_DEPRECATED(see the double & &) changing that to error_reporting = E_ALL & ~E_DEPRECATED resolved the problem.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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