Let php PDO work with newest version of PostgreSQL (Debian/Ubuntu) The 2019 Stack Overflow...

Why hard-Brexiteers don't insist on a hard border to prevent illegal immigration after Brexit?

How to deal with fear of taking dependencies

Multiply Two Integer Polynomials

Shouldn't "much" here be used instead of "more"?

Write faster on AT24C32

What does "fetching by region is not available for SAM files" means?

The difference between dialogue marks

How to answer pointed "are you quitting" questioning when I don't want them to suspect

How come people say “Would of”?

What could be the right powersource for 15 seconds lifespan disposable giant chainsaw?

If a Druid sees an animal’s corpse, can they wild shape into that animal?

Which Sci-Fi work first showed weapon of galactic-scale mass destruction?

Worn-tile Scrabble

Apparent duplicates between Haynes service instructions and MOT

Is "plugging out" electronic devices an American expression?

Identify boardgame from Big movie

Is there any way to tell whether the shot is going to hit you or not?

Resizing object distorts it (Illustrator CC 2018)

What is the meaning of Triage in Cybersec world?

What is the most effective way of iterating a std::vector and why?

Is flight data recorder erased after every flight?

Why not take a picture of a closer black hole?

Can a flute soloist sit?

Right tool to dig six foot holes?



Let php PDO work with newest version of PostgreSQL (Debian/Ubuntu)



The 2019 Stack Overflow Developer Survey Results Are InSetting up PostGIS on Ubuntu Server 9.04?How can I get access to password hashing in postgresql? Tried installing postgresql-contrib in ubuntu, still can't access hashing functionsubuntu: Installed php-mcrypt but it doesn't show up in phpinfo()Can't install libpq-dev, ubuntu 10.10 and postgres 9PHP 5.4.9 Mysqli issueHow to build & install pgsql PHP extension manually on Ubuntuhow to install pg_archivecleanup for postgresql 9.3 on UbuntuHow to tell apt-get that a package is OK and does not need any more attentionUncaught Zend_Db_Adapter_Exception: The mysql driver is not currently installedPostgresql fails to start with no such file or directory error?





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







0















I installed PostgreSQL and the php PDO driver on my 14.04 Ubuntu like this:



sudo apt-get install postgresql postgresql-contrib
sudo apt-get install php5-pgsql


Which installed PostgreSQL 9.3 and worked fine, but now I want to run 9.5.
So I updated the postgresql packages by adding the PostgreSQL repo following this guide and updating the packages.



However phpinfo still reports 9.3 after restarting apache:




PostgreSQL(libpq) Version 9.3.10




I can imagine that I somehow also have to update the php5-pgsql package? But then how? Or should I do something else?










share|improve this question














bumped to the homepage by Community 2 mins ago


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






















    0















    I installed PostgreSQL and the php PDO driver on my 14.04 Ubuntu like this:



    sudo apt-get install postgresql postgresql-contrib
    sudo apt-get install php5-pgsql


    Which installed PostgreSQL 9.3 and worked fine, but now I want to run 9.5.
    So I updated the postgresql packages by adding the PostgreSQL repo following this guide and updating the packages.



    However phpinfo still reports 9.3 after restarting apache:




    PostgreSQL(libpq) Version 9.3.10




    I can imagine that I somehow also have to update the php5-pgsql package? But then how? Or should I do something else?










    share|improve this question














    bumped to the homepage by Community 2 mins ago


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


















      0












      0








      0








      I installed PostgreSQL and the php PDO driver on my 14.04 Ubuntu like this:



      sudo apt-get install postgresql postgresql-contrib
      sudo apt-get install php5-pgsql


      Which installed PostgreSQL 9.3 and worked fine, but now I want to run 9.5.
      So I updated the postgresql packages by adding the PostgreSQL repo following this guide and updating the packages.



      However phpinfo still reports 9.3 after restarting apache:




      PostgreSQL(libpq) Version 9.3.10




      I can imagine that I somehow also have to update the php5-pgsql package? But then how? Or should I do something else?










      share|improve this question














      I installed PostgreSQL and the php PDO driver on my 14.04 Ubuntu like this:



      sudo apt-get install postgresql postgresql-contrib
      sudo apt-get install php5-pgsql


      Which installed PostgreSQL 9.3 and worked fine, but now I want to run 9.5.
      So I updated the postgresql packages by adding the PostgreSQL repo following this guide and updating the packages.



      However phpinfo still reports 9.3 after restarting apache:




      PostgreSQL(libpq) Version 9.3.10




      I can imagine that I somehow also have to update the php5-pgsql package? But then how? Or should I do something else?







      linux ubuntu php postgresql pdo






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 31 '16 at 14:35









      SebastianSebastian

      10814




      10814





      bumped to the homepage by Community 2 mins ago


      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 2 mins ago


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
























          1 Answer
          1






          active

          oldest

          votes


















          0














          Ok I resolved this issue but was struggling for some time, so I don't know exactly what the easiest method is to do. But I will describe a recipe which will probably work for others as well.



          The first important note is:
          I think I resolved the issue since I can use the new upsert feature introduced in 9.5 (INSERT .. ON CONFLICT DO UPDATE ..). However my phpinfo() still reports version 9.3.



          One more word about the problem situation: After adding the PostgreSQL repo and doing apt-get upgrade I had two version of PostgreSQL apparently.



          ls /usr/share/postgresql
          9.3 9.5


          So to fix I did:



          dpkg --get-selections | grep postgresql


          You will get a list of all the related packages installed. I deinstalled them all with --purge (this will probably remove all your databases as well, no problem in my case since they were empty).



          sudo apt-get remove --purge postgresql postgresql-9.5 postgresql-contrib etc.


          It gave me errors on some packages but when I repeated it, in the end all packages were gone.
          Also do this for the php pdo driver:



          sudo apt-get remove --purge php5-pgsql


          Now install postgresql again, only 9.5 will be installed.



          sudo apt-get install postgresql postgresql-contrib php5-pgsql 





          share|improve this answer
























            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "2"
            };
            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%2fserverfault.com%2fquestions%2f767342%2flet-php-pdo-work-with-newest-version-of-postgresql-debian-ubuntu%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            Ok I resolved this issue but was struggling for some time, so I don't know exactly what the easiest method is to do. But I will describe a recipe which will probably work for others as well.



            The first important note is:
            I think I resolved the issue since I can use the new upsert feature introduced in 9.5 (INSERT .. ON CONFLICT DO UPDATE ..). However my phpinfo() still reports version 9.3.



            One more word about the problem situation: After adding the PostgreSQL repo and doing apt-get upgrade I had two version of PostgreSQL apparently.



            ls /usr/share/postgresql
            9.3 9.5


            So to fix I did:



            dpkg --get-selections | grep postgresql


            You will get a list of all the related packages installed. I deinstalled them all with --purge (this will probably remove all your databases as well, no problem in my case since they were empty).



            sudo apt-get remove --purge postgresql postgresql-9.5 postgresql-contrib etc.


            It gave me errors on some packages but when I repeated it, in the end all packages were gone.
            Also do this for the php pdo driver:



            sudo apt-get remove --purge php5-pgsql


            Now install postgresql again, only 9.5 will be installed.



            sudo apt-get install postgresql postgresql-contrib php5-pgsql 





            share|improve this answer




























              0














              Ok I resolved this issue but was struggling for some time, so I don't know exactly what the easiest method is to do. But I will describe a recipe which will probably work for others as well.



              The first important note is:
              I think I resolved the issue since I can use the new upsert feature introduced in 9.5 (INSERT .. ON CONFLICT DO UPDATE ..). However my phpinfo() still reports version 9.3.



              One more word about the problem situation: After adding the PostgreSQL repo and doing apt-get upgrade I had two version of PostgreSQL apparently.



              ls /usr/share/postgresql
              9.3 9.5


              So to fix I did:



              dpkg --get-selections | grep postgresql


              You will get a list of all the related packages installed. I deinstalled them all with --purge (this will probably remove all your databases as well, no problem in my case since they were empty).



              sudo apt-get remove --purge postgresql postgresql-9.5 postgresql-contrib etc.


              It gave me errors on some packages but when I repeated it, in the end all packages were gone.
              Also do this for the php pdo driver:



              sudo apt-get remove --purge php5-pgsql


              Now install postgresql again, only 9.5 will be installed.



              sudo apt-get install postgresql postgresql-contrib php5-pgsql 





              share|improve this answer


























                0












                0








                0







                Ok I resolved this issue but was struggling for some time, so I don't know exactly what the easiest method is to do. But I will describe a recipe which will probably work for others as well.



                The first important note is:
                I think I resolved the issue since I can use the new upsert feature introduced in 9.5 (INSERT .. ON CONFLICT DO UPDATE ..). However my phpinfo() still reports version 9.3.



                One more word about the problem situation: After adding the PostgreSQL repo and doing apt-get upgrade I had two version of PostgreSQL apparently.



                ls /usr/share/postgresql
                9.3 9.5


                So to fix I did:



                dpkg --get-selections | grep postgresql


                You will get a list of all the related packages installed. I deinstalled them all with --purge (this will probably remove all your databases as well, no problem in my case since they were empty).



                sudo apt-get remove --purge postgresql postgresql-9.5 postgresql-contrib etc.


                It gave me errors on some packages but when I repeated it, in the end all packages were gone.
                Also do this for the php pdo driver:



                sudo apt-get remove --purge php5-pgsql


                Now install postgresql again, only 9.5 will be installed.



                sudo apt-get install postgresql postgresql-contrib php5-pgsql 





                share|improve this answer













                Ok I resolved this issue but was struggling for some time, so I don't know exactly what the easiest method is to do. But I will describe a recipe which will probably work for others as well.



                The first important note is:
                I think I resolved the issue since I can use the new upsert feature introduced in 9.5 (INSERT .. ON CONFLICT DO UPDATE ..). However my phpinfo() still reports version 9.3.



                One more word about the problem situation: After adding the PostgreSQL repo and doing apt-get upgrade I had two version of PostgreSQL apparently.



                ls /usr/share/postgresql
                9.3 9.5


                So to fix I did:



                dpkg --get-selections | grep postgresql


                You will get a list of all the related packages installed. I deinstalled them all with --purge (this will probably remove all your databases as well, no problem in my case since they were empty).



                sudo apt-get remove --purge postgresql postgresql-9.5 postgresql-contrib etc.


                It gave me errors on some packages but when I repeated it, in the end all packages were gone.
                Also do this for the php pdo driver:



                sudo apt-get remove --purge php5-pgsql


                Now install postgresql again, only 9.5 will be installed.



                sudo apt-get install postgresql postgresql-contrib php5-pgsql 






                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Apr 1 '16 at 15:51









                SebastianSebastian

                10814




                10814






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Server Fault!


                    • 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%2fserverfault.com%2fquestions%2f767342%2flet-php-pdo-work-with-newest-version-of-postgresql-debian-ubuntu%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

                    As a Security Precaution, the user account has been locked The Next CEO of Stack OverflowMS...

                    Список ссавців Італії Природоохоронні статуси | Список |...

                    Українські прізвища Зміст Історичні відомості |...