PHP 7.2 / MySQL Issue after upgrading to 18.04

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
1
down vote

favorite












After upgrading my servers to Ubuntu 18.04 I had a few issues.



  • PHP pages were displayed as plain text, exposing code.

  • Could not connect to MySQL from web pages using PHP (once the PHP issue was fixed), however could connect via the command line.

  • On one server, PHP curl functions stopped working.






share|improve this question
























    up vote
    1
    down vote

    favorite












    After upgrading my servers to Ubuntu 18.04 I had a few issues.



    • PHP pages were displayed as plain text, exposing code.

    • Could not connect to MySQL from web pages using PHP (once the PHP issue was fixed), however could connect via the command line.

    • On one server, PHP curl functions stopped working.






    share|improve this question






















      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      After upgrading my servers to Ubuntu 18.04 I had a few issues.



      • PHP pages were displayed as plain text, exposing code.

      • Could not connect to MySQL from web pages using PHP (once the PHP issue was fixed), however could connect via the command line.

      • On one server, PHP curl functions stopped working.






      share|improve this question












      After upgrading my servers to Ubuntu 18.04 I had a few issues.



      • PHP pages were displayed as plain text, exposing code.

      • Could not connect to MySQL from web pages using PHP (once the PHP issue was fixed), however could connect via the command line.

      • On one server, PHP curl functions stopped working.








      share|improve this question











      share|improve this question




      share|improve this question










      asked Apr 27 at 2:13









      Phippsy

      1214




      1214




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          1
          down vote













          Ubuntu 18.04 Bionic Beaver upgrades PHP to version 7.2, but does not always seem to update the modules. I've had the same issue in previous upgrades.



          In my case, libapache2-mod-php7.2 was missing, so to fix that problem:



          sudo apt install php7.2 php7.2-common php7.2-cli
          sudo a2enmod php7.2


          The issue of not being able to connect to mysql was resolved with:



          apt install php7.2-mysql


          And the issue of missing curl functionality was resolved with:



          apt install php7.2-curl





          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',
            convertImagesToLinks: true,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            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%2f1028588%2fphp-7-2-mysql-issue-after-upgrading-to-18-04%23new-answer', 'question_page');

            );

            Post as a guest






























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            1
            down vote













            Ubuntu 18.04 Bionic Beaver upgrades PHP to version 7.2, but does not always seem to update the modules. I've had the same issue in previous upgrades.



            In my case, libapache2-mod-php7.2 was missing, so to fix that problem:



            sudo apt install php7.2 php7.2-common php7.2-cli
            sudo a2enmod php7.2


            The issue of not being able to connect to mysql was resolved with:



            apt install php7.2-mysql


            And the issue of missing curl functionality was resolved with:



            apt install php7.2-curl





            share|improve this answer
























              up vote
              1
              down vote













              Ubuntu 18.04 Bionic Beaver upgrades PHP to version 7.2, but does not always seem to update the modules. I've had the same issue in previous upgrades.



              In my case, libapache2-mod-php7.2 was missing, so to fix that problem:



              sudo apt install php7.2 php7.2-common php7.2-cli
              sudo a2enmod php7.2


              The issue of not being able to connect to mysql was resolved with:



              apt install php7.2-mysql


              And the issue of missing curl functionality was resolved with:



              apt install php7.2-curl





              share|improve this answer






















                up vote
                1
                down vote










                up vote
                1
                down vote









                Ubuntu 18.04 Bionic Beaver upgrades PHP to version 7.2, but does not always seem to update the modules. I've had the same issue in previous upgrades.



                In my case, libapache2-mod-php7.2 was missing, so to fix that problem:



                sudo apt install php7.2 php7.2-common php7.2-cli
                sudo a2enmod php7.2


                The issue of not being able to connect to mysql was resolved with:



                apt install php7.2-mysql


                And the issue of missing curl functionality was resolved with:



                apt install php7.2-curl





                share|improve this answer












                Ubuntu 18.04 Bionic Beaver upgrades PHP to version 7.2, but does not always seem to update the modules. I've had the same issue in previous upgrades.



                In my case, libapache2-mod-php7.2 was missing, so to fix that problem:



                sudo apt install php7.2 php7.2-common php7.2-cli
                sudo a2enmod php7.2


                The issue of not being able to connect to mysql was resolved with:



                apt install php7.2-mysql


                And the issue of missing curl functionality was resolved with:



                apt install php7.2-curl






                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Apr 27 at 2:13









                Phippsy

                1214




                1214



























                     

                    draft saved


                    draft discarded















































                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1028588%2fphp-7-2-mysql-issue-after-upgrading-to-18-04%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Popular posts from this blog

                    Trouble downloading packages list due to a “Hash sum mismatch” error

                    How do so many people here on Academia.SE, and in general, afford lavish higher education programs?

                    How do I move numbers in filenames, in a batch renaming operation?