pgsql is not loading (centOS 6.8)PHP-FPM not working as global PHP handler on Apache, CentOS 6.4

Is there a way, while dragging, to "snap" to the nearest guide?

How much will studying magic in an academy cost?

What's currently blocking the construction of the wall between Mexico and the US?

Why is prior to creation called holy?

Why do textbooks often include the solutions to odd or even numbered problems but not both?

Array initialization optimization

When can you leave off “le/la” to say “it” in French?

Do I have to explain the mechanical superiority of the player-character within the fiction of the game?

Find the C-factor of a vote

Why do some professors with PhDs leave their professorships to teach high school?

Can White Castle?

Methodology: Writing unit tests for another developer

Why does the Saturn V have standalone inter-stage rings?

Do I need a shock-proof watch for cycling?

What is the origin of Scooby-Doo's name?

Count All Possible Unique Combinations of Letters in a Word

Employer wants to use my work email account after I quit

Drawing people along with x and y axis

How to find the last non zero element in every column throughout dataframe?

How many children?

What is "industrial ethernet"?

How do I professionally let my manager know I'll quit over smoking in the office?

Understanding the reasoning of the woman who agreed with King Solomon to "cut the baby in half"

If I wouldn't want to read the story, is writing it still a good idea?



pgsql is not loading (centOS 6.8)


PHP-FPM not working as global PHP handler on Apache, CentOS 6.4






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








0















*First of all don't answer "php.ini >> uncomment extension=pgsql.so and restart httpd". did that millions of times, did not solve my problem.



*Tried hundreds of methods described in different sites including stackoverflow, but unfortunately did not work for me (I am leaning Linux >> noob)



INFO: httpd 2.2.15, php 5.6.26 (remi-php56), CentOS 6.8, postgresql 8.2.9



Error 1:




Fatal error: Call to undefined function mb_convert_encoding() in /var/www/html/bancarella_dev/config.php on line 6




Error 1 was solved by:



yum install php-mbstring
service httpd restart


Error 2:




Fatal error: Call to undefined function pg_connect() in /var/www/html/bancarella_dev/dbconnect.php on line 69




To solve Error 2 I did :



yum install php-pgsql
service httpd restart


But it did not solve the Error 2



To see what extensions are loading, I created a test file "test.php"



Code:



$isPgsql = extension_loaded('pgsql') ? 'yes':'no';

echo "pgsql loaded: $isPgsql" ;

print_r(get_loaded_extensions());


Output of test.php:



pgsql loaded: no

Array
(
[0] => Core
[1] => date
[2] => ereg
[3] => libxml
[4] => openssl
[5] => pcre
[6] => zlib
[7] => filter
[8] => hash
[9] => Reflection
[10] => SPL
[11] => session
[12] => standard
[13] => apache2handler
[14] => bz2
[15] => calendar
[16] => ctype
[17] => curl
[18] => mbstring
[19] => fileinfo
[20] => ftp
[21] => gettext
[22] => iconv
[23] => exif
[24] => PDO
[25] => Phar
[26] => sockets
[27] => sqlite3
[28] => tokenizer
[29] => pdo_pgsql
[30] => pdo_sqlite
[31] => json
[32] => zip
[33] => mhash
)


SO, mbstring is loaded (that's why error 1 was solved).



From the array you can see that pdo_pgsql is also loaded but pgsql is not.



Why? still getting:




Call to undefined function pg_connect()




Please help.










share|improve this question
























  • Check if you edited the correct php.ini. you can see the php.ini in use with phpinfo();

    – Gerald Schneider
    Oct 14 '16 at 9:07











  • With packaged extension, you NEVER have to change anything in the .ini. Each package provide the /etc/php.d/foo.ini which does its job. Output of "php -v" and "php -m" will help. (also "rpm -Va php*")

    – Remi Collet
    Oct 14 '16 at 13:53












  • BTW, CentOS 6.8 provides postgresql 8.4.20, not 8.2.9

    – Remi Collet
    Oct 14 '16 at 14:08











  • @RemiCollet I am really glad that you mentioned something helpful. I was meant to install latest version of postgresql but unfortunately client forced to install a particular version "8.2.9" (may be because of legacy of their system). Now what to do ? The database is live in client's system, so I can't do anything to postgres. How can I solve it now?

    – Hassan Tareq
    Oct 17 '16 at 0:37












  • Another thing I wanna know is that I asked this question here, is it ok or should I ask this type of question in stackoverflow or unix.stackexchange or dba.stackexchange?

    – Hassan Tareq
    Oct 17 '16 at 0:41


















0















*First of all don't answer "php.ini >> uncomment extension=pgsql.so and restart httpd". did that millions of times, did not solve my problem.



*Tried hundreds of methods described in different sites including stackoverflow, but unfortunately did not work for me (I am leaning Linux >> noob)



INFO: httpd 2.2.15, php 5.6.26 (remi-php56), CentOS 6.8, postgresql 8.2.9



Error 1:




Fatal error: Call to undefined function mb_convert_encoding() in /var/www/html/bancarella_dev/config.php on line 6




Error 1 was solved by:



yum install php-mbstring
service httpd restart


Error 2:




Fatal error: Call to undefined function pg_connect() in /var/www/html/bancarella_dev/dbconnect.php on line 69




To solve Error 2 I did :



yum install php-pgsql
service httpd restart


But it did not solve the Error 2



To see what extensions are loading, I created a test file "test.php"



Code:



$isPgsql = extension_loaded('pgsql') ? 'yes':'no';

echo "pgsql loaded: $isPgsql" ;

print_r(get_loaded_extensions());


Output of test.php:



pgsql loaded: no

Array
(
[0] => Core
[1] => date
[2] => ereg
[3] => libxml
[4] => openssl
[5] => pcre
[6] => zlib
[7] => filter
[8] => hash
[9] => Reflection
[10] => SPL
[11] => session
[12] => standard
[13] => apache2handler
[14] => bz2
[15] => calendar
[16] => ctype
[17] => curl
[18] => mbstring
[19] => fileinfo
[20] => ftp
[21] => gettext
[22] => iconv
[23] => exif
[24] => PDO
[25] => Phar
[26] => sockets
[27] => sqlite3
[28] => tokenizer
[29] => pdo_pgsql
[30] => pdo_sqlite
[31] => json
[32] => zip
[33] => mhash
)


SO, mbstring is loaded (that's why error 1 was solved).



From the array you can see that pdo_pgsql is also loaded but pgsql is not.



Why? still getting:




Call to undefined function pg_connect()




Please help.










share|improve this question
























  • Check if you edited the correct php.ini. you can see the php.ini in use with phpinfo();

    – Gerald Schneider
    Oct 14 '16 at 9:07











  • With packaged extension, you NEVER have to change anything in the .ini. Each package provide the /etc/php.d/foo.ini which does its job. Output of "php -v" and "php -m" will help. (also "rpm -Va php*")

    – Remi Collet
    Oct 14 '16 at 13:53












  • BTW, CentOS 6.8 provides postgresql 8.4.20, not 8.2.9

    – Remi Collet
    Oct 14 '16 at 14:08











  • @RemiCollet I am really glad that you mentioned something helpful. I was meant to install latest version of postgresql but unfortunately client forced to install a particular version "8.2.9" (may be because of legacy of their system). Now what to do ? The database is live in client's system, so I can't do anything to postgres. How can I solve it now?

    – Hassan Tareq
    Oct 17 '16 at 0:37












  • Another thing I wanna know is that I asked this question here, is it ok or should I ask this type of question in stackoverflow or unix.stackexchange or dba.stackexchange?

    – Hassan Tareq
    Oct 17 '16 at 0:41














0












0








0








*First of all don't answer "php.ini >> uncomment extension=pgsql.so and restart httpd". did that millions of times, did not solve my problem.



*Tried hundreds of methods described in different sites including stackoverflow, but unfortunately did not work for me (I am leaning Linux >> noob)



INFO: httpd 2.2.15, php 5.6.26 (remi-php56), CentOS 6.8, postgresql 8.2.9



Error 1:




Fatal error: Call to undefined function mb_convert_encoding() in /var/www/html/bancarella_dev/config.php on line 6




Error 1 was solved by:



yum install php-mbstring
service httpd restart


Error 2:




Fatal error: Call to undefined function pg_connect() in /var/www/html/bancarella_dev/dbconnect.php on line 69




To solve Error 2 I did :



yum install php-pgsql
service httpd restart


But it did not solve the Error 2



To see what extensions are loading, I created a test file "test.php"



Code:



$isPgsql = extension_loaded('pgsql') ? 'yes':'no';

echo "pgsql loaded: $isPgsql" ;

print_r(get_loaded_extensions());


Output of test.php:



pgsql loaded: no

Array
(
[0] => Core
[1] => date
[2] => ereg
[3] => libxml
[4] => openssl
[5] => pcre
[6] => zlib
[7] => filter
[8] => hash
[9] => Reflection
[10] => SPL
[11] => session
[12] => standard
[13] => apache2handler
[14] => bz2
[15] => calendar
[16] => ctype
[17] => curl
[18] => mbstring
[19] => fileinfo
[20] => ftp
[21] => gettext
[22] => iconv
[23] => exif
[24] => PDO
[25] => Phar
[26] => sockets
[27] => sqlite3
[28] => tokenizer
[29] => pdo_pgsql
[30] => pdo_sqlite
[31] => json
[32] => zip
[33] => mhash
)


SO, mbstring is loaded (that's why error 1 was solved).



From the array you can see that pdo_pgsql is also loaded but pgsql is not.



Why? still getting:




Call to undefined function pg_connect()




Please help.










share|improve this question
















*First of all don't answer "php.ini >> uncomment extension=pgsql.so and restart httpd". did that millions of times, did not solve my problem.



*Tried hundreds of methods described in different sites including stackoverflow, but unfortunately did not work for me (I am leaning Linux >> noob)



INFO: httpd 2.2.15, php 5.6.26 (remi-php56), CentOS 6.8, postgresql 8.2.9



Error 1:




Fatal error: Call to undefined function mb_convert_encoding() in /var/www/html/bancarella_dev/config.php on line 6




Error 1 was solved by:



yum install php-mbstring
service httpd restart


Error 2:




Fatal error: Call to undefined function pg_connect() in /var/www/html/bancarella_dev/dbconnect.php on line 69




To solve Error 2 I did :



yum install php-pgsql
service httpd restart


But it did not solve the Error 2



To see what extensions are loading, I created a test file "test.php"



Code:



$isPgsql = extension_loaded('pgsql') ? 'yes':'no';

echo "pgsql loaded: $isPgsql" ;

print_r(get_loaded_extensions());


Output of test.php:



pgsql loaded: no

Array
(
[0] => Core
[1] => date
[2] => ereg
[3] => libxml
[4] => openssl
[5] => pcre
[6] => zlib
[7] => filter
[8] => hash
[9] => Reflection
[10] => SPL
[11] => session
[12] => standard
[13] => apache2handler
[14] => bz2
[15] => calendar
[16] => ctype
[17] => curl
[18] => mbstring
[19] => fileinfo
[20] => ftp
[21] => gettext
[22] => iconv
[23] => exif
[24] => PDO
[25] => Phar
[26] => sockets
[27] => sqlite3
[28] => tokenizer
[29] => pdo_pgsql
[30] => pdo_sqlite
[31] => json
[32] => zip
[33] => mhash
)


SO, mbstring is loaded (that's why error 1 was solved).



From the array you can see that pdo_pgsql is also loaded but pgsql is not.



Why? still getting:




Call to undefined function pg_connect()




Please help.







centos6 postgresql httpd php.ini






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Oct 14 '16 at 11:51









Gerald Schneider

7,32832748




7,32832748










asked Oct 14 '16 at 9:02









Hassan TareqHassan Tareq

1014




1014












  • Check if you edited the correct php.ini. you can see the php.ini in use with phpinfo();

    – Gerald Schneider
    Oct 14 '16 at 9:07











  • With packaged extension, you NEVER have to change anything in the .ini. Each package provide the /etc/php.d/foo.ini which does its job. Output of "php -v" and "php -m" will help. (also "rpm -Va php*")

    – Remi Collet
    Oct 14 '16 at 13:53












  • BTW, CentOS 6.8 provides postgresql 8.4.20, not 8.2.9

    – Remi Collet
    Oct 14 '16 at 14:08











  • @RemiCollet I am really glad that you mentioned something helpful. I was meant to install latest version of postgresql but unfortunately client forced to install a particular version "8.2.9" (may be because of legacy of their system). Now what to do ? The database is live in client's system, so I can't do anything to postgres. How can I solve it now?

    – Hassan Tareq
    Oct 17 '16 at 0:37












  • Another thing I wanna know is that I asked this question here, is it ok or should I ask this type of question in stackoverflow or unix.stackexchange or dba.stackexchange?

    – Hassan Tareq
    Oct 17 '16 at 0:41


















  • Check if you edited the correct php.ini. you can see the php.ini in use with phpinfo();

    – Gerald Schneider
    Oct 14 '16 at 9:07











  • With packaged extension, you NEVER have to change anything in the .ini. Each package provide the /etc/php.d/foo.ini which does its job. Output of "php -v" and "php -m" will help. (also "rpm -Va php*")

    – Remi Collet
    Oct 14 '16 at 13:53












  • BTW, CentOS 6.8 provides postgresql 8.4.20, not 8.2.9

    – Remi Collet
    Oct 14 '16 at 14:08











  • @RemiCollet I am really glad that you mentioned something helpful. I was meant to install latest version of postgresql but unfortunately client forced to install a particular version "8.2.9" (may be because of legacy of their system). Now what to do ? The database is live in client's system, so I can't do anything to postgres. How can I solve it now?

    – Hassan Tareq
    Oct 17 '16 at 0:37












  • Another thing I wanna know is that I asked this question here, is it ok or should I ask this type of question in stackoverflow or unix.stackexchange or dba.stackexchange?

    – Hassan Tareq
    Oct 17 '16 at 0:41

















Check if you edited the correct php.ini. you can see the php.ini in use with phpinfo();

– Gerald Schneider
Oct 14 '16 at 9:07





Check if you edited the correct php.ini. you can see the php.ini in use with phpinfo();

– Gerald Schneider
Oct 14 '16 at 9:07













With packaged extension, you NEVER have to change anything in the .ini. Each package provide the /etc/php.d/foo.ini which does its job. Output of "php -v" and "php -m" will help. (also "rpm -Va php*")

– Remi Collet
Oct 14 '16 at 13:53






With packaged extension, you NEVER have to change anything in the .ini. Each package provide the /etc/php.d/foo.ini which does its job. Output of "php -v" and "php -m" will help. (also "rpm -Va php*")

– Remi Collet
Oct 14 '16 at 13:53














BTW, CentOS 6.8 provides postgresql 8.4.20, not 8.2.9

– Remi Collet
Oct 14 '16 at 14:08





BTW, CentOS 6.8 provides postgresql 8.4.20, not 8.2.9

– Remi Collet
Oct 14 '16 at 14:08













@RemiCollet I am really glad that you mentioned something helpful. I was meant to install latest version of postgresql but unfortunately client forced to install a particular version "8.2.9" (may be because of legacy of their system). Now what to do ? The database is live in client's system, so I can't do anything to postgres. How can I solve it now?

– Hassan Tareq
Oct 17 '16 at 0:37






@RemiCollet I am really glad that you mentioned something helpful. I was meant to install latest version of postgresql but unfortunately client forced to install a particular version "8.2.9" (may be because of legacy of their system). Now what to do ? The database is live in client's system, so I can't do anything to postgres. How can I solve it now?

– Hassan Tareq
Oct 17 '16 at 0:37














Another thing I wanna know is that I asked this question here, is it ok or should I ask this type of question in stackoverflow or unix.stackexchange or dba.stackexchange?

– Hassan Tareq
Oct 17 '16 at 0:41






Another thing I wanna know is that I asked this question here, is it ok or should I ask this type of question in stackoverflow or unix.stackexchange or dba.stackexchange?

– Hassan Tareq
Oct 17 '16 at 0:41











1 Answer
1






active

oldest

votes


















0














I updated PostgreSQL (as @RemiCollet suggested) and everything is working properly.



yum install postgresql96* 
service postgresql-9.6 initdb
chkconfig postgresql-9.6 on
service postgresql-9.6 start





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%2f809008%2fpgsql-is-not-loading-centos-6-8%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














    I updated PostgreSQL (as @RemiCollet suggested) and everything is working properly.



    yum install postgresql96* 
    service postgresql-9.6 initdb
    chkconfig postgresql-9.6 on
    service postgresql-9.6 start





    share|improve this answer



























      0














      I updated PostgreSQL (as @RemiCollet suggested) and everything is working properly.



      yum install postgresql96* 
      service postgresql-9.6 initdb
      chkconfig postgresql-9.6 on
      service postgresql-9.6 start





      share|improve this answer

























        0












        0








        0







        I updated PostgreSQL (as @RemiCollet suggested) and everything is working properly.



        yum install postgresql96* 
        service postgresql-9.6 initdb
        chkconfig postgresql-9.6 on
        service postgresql-9.6 start





        share|improve this answer













        I updated PostgreSQL (as @RemiCollet suggested) and everything is working properly.



        yum install postgresql96* 
        service postgresql-9.6 initdb
        chkconfig postgresql-9.6 on
        service postgresql-9.6 start






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Oct 28 '16 at 1:29









        Hassan TareqHassan Tareq

        1014




        1014



























            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%2f809008%2fpgsql-is-not-loading-centos-6-8%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

            Wikipedia:Vital articles Мазмуну Biography - Өмүр баян Philosophy and psychology - Философия жана психология Religion - Дин Social sciences - Коомдук илимдер Language and literature - Тил жана адабият Science - Илим Technology - Технология Arts and recreation - Искусство жана эс алуу History and geography - Тарых жана география Навигация менюсу

            Bruxelas-Capital Índice Historia | Composición | Situación lingüística | Clima | Cidades irmandadas | Notas | Véxase tamén | Menú de navegacióneO uso das linguas en Bruxelas e a situación do neerlandés"Rexión de Bruxelas Capital"o orixinalSitio da rexiónPáxina de Bruselas no sitio da Oficina de Promoción Turística de Valonia e BruxelasMapa Interactivo da Rexión de Bruxelas-CapitaleeWorldCat332144929079854441105155190212ID28008674080552-90000 0001 0666 3698n94104302ID540940339365017018237

            What should I write in an apology letter, since I have decided not to join a company after accepting an offer letterShould I keep looking after accepting a job offer?What should I do when I've been verbally told I would get an offer letter, but still haven't gotten one after 4 weeks?Do I accept an offer from a company that I am not likely to join?New job hasn't confirmed starting date and I want to give current employer as much notice as possibleHow should I address my manager in my resignation letter?HR delayed background verification, now jobless as resignedNo email communication after accepting a formal written offer. How should I phrase the call?What should I do if after receiving a verbal offer letter I am informed that my written job offer is put on hold due to some internal issues?Should I inform the current employer that I am about to resign within 1-2 weeks since I have signed the offer letter and waiting for visa?What company will do, if I send their offer letter to another company