PHP configured with “magic_quotes_gpc=Off” but phpinfo() shows it as 'On'












1















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
















bumped to the homepage by Community yesterday


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.











  • 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













  • Open the last file into "/etc/php5/apache2/conf.d/" folder and add "magic_quotes_gpc = Off"

    – Panganino
    May 3 '14 at 10:14
















1















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
















bumped to the homepage by Community yesterday


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.











  • 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













  • Open the last file into "/etc/php5/apache2/conf.d/" folder and add "magic_quotes_gpc = Off"

    – Panganino
    May 3 '14 at 10:14














1












1








1


1






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
















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







configuration php






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 23 '12 at 5:52









Jorge Castro

36.4k105422617




36.4k105422617










asked Dec 19 '12 at 22:52









Sébastien SerreSébastien Serre

613




613





bumped to the homepage by Community yesterday


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







bumped to the homepage by Community yesterday


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.










  • 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













  • Open the last file into "/etc/php5/apache2/conf.d/" folder and add "magic_quotes_gpc = Off"

    – Panganino
    May 3 '14 at 10:14














  • 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













  • Open the last file into "/etc/php5/apache2/conf.d/" folder and add "magic_quotes_gpc = Off"

    – Panganino
    May 3 '14 at 10:14








3




3





I am guessing you restarted the server or at least apache.

– Goddard
Dec 19 '12 at 23:29





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







Yep, did you run sudo service apache2 restart, after you changed the setting?

– saji89
Dec 23 '12 at 5:51















Open the last file into "/etc/php5/apache2/conf.d/" folder and add "magic_quotes_gpc = Off"

– Panganino
May 3 '14 at 10:14





Open the last file into "/etc/php5/apache2/conf.d/" folder and add "magic_quotes_gpc = Off"

– Panganino
May 3 '14 at 10:14










3 Answers
3






active

oldest

votes


















0














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



















0














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






share|improve this answer































    0














    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























      Your Answer








      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "89"
      };
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function() {
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled) {
      StackExchange.using("snippets", function() {
      createEditor();
      });
      }
      else {
      createEditor();
      }
      });

      function createEditor() {
      StackExchange.prepareEditor({
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      imageUploader: {
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      },
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      });


      }
      });














      draft saved

      draft discarded


















      StackExchange.ready(
      function () {
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f230811%2fphp-configured-with-magic-quotes-gpc-off-but-phpinfo-shows-it-as-on%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      3 Answers
      3






      active

      oldest

      votes








      3 Answers
      3






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      0














      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
















      0














      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














      0












      0








      0







      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















      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














      share|improve this answer



      share|improve this answer








      edited Dec 23 '12 at 5:47

























      answered Dec 20 '12 at 3:40









      palerdotpalerdot

      6711818




      6711818













      • 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



















      • 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

















      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





      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





      Just rebooted and pb allways here....

      – Sébastien Serre
      Dec 20 '12 at 6:25













      0














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






      share|improve this answer




























        0














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






        share|improve this answer


























          0












          0








          0







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






          share|improve this answer













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







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jan 14 '13 at 15:15









          FrankFrank

          1612




          1612























              0














              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




























                0














                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


























                  0












                  0








                  0







                  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













                  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












                  share|improve this answer



                  share|improve this answer










                  answered Sep 2 '13 at 15:33









                  DaveDave

                  1




                  1






























                      draft saved

                      draft discarded




















































                      Thanks for contributing an answer to Ask Ubuntu!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f230811%2fphp-configured-with-magic-quotes-gpc-off-but-phpinfo-shows-it-as-on%23new-answer', 'question_page');
                      }
                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      Category:香港粉麵

                      List *all* the tuples!

                      Channel [V]