This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 506377 - Fatal error: Call to undefined function pg_connect
Fatal error: Call to undefined function pg_connect
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: php (Show other bugs)
11
x86_64 Linux
low Severity medium
: ---
: ---
Assigned To: Joe Orton
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-06-16 19:52 EDT by Sylvain Blanchet
Modified: 2009-06-18 09:38 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-06-18 09:38:24 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Sylvain Blanchet 2009-06-16 19:52:18 EDT
Description of problem:
After installing FC11 over FC10, and setup apache, postgres and php, I get "Fatal error: Call to undefined function pg_connect ..."


Version-Release number of selected component (if applicable): Apache 2.2.0, Postgres 8.3.7 and PHP 5.2.9 all x86_64


How reproducible:
not tested

Steps to Reproduce:
1. Install FC11 over FC10
2. Install Apache, PHP, Postgres
3. Convert DB from 8.2 to 8.3
  
Actual results:
Fatal error...

Expected results:
Access to DB to retrieve requested data

Additional info:
I uninstalled PHP 5.2.9 and re-installed it to see if it would solve the problem but did not.

I was able to "fix" it by adding a symbolic link in /usr/lib
ln -s /usr/lib64/php /usr/lib/php
service httpd restart
Comment 1 Tom Lane 2009-06-16 20:37:39 EDT
Sounds to me like you neglected to install php-pgsql.  But if it's more subtle than that, I'm sure the maintainer thereof can help you better than I can ...
Comment 2 Sylvain Blanchet 2009-06-16 21:35:43 EDT
Nope php_pgsql was installed (I tried to re-install all the php packages from the DVD and all were installed)
Comment 3 Remi Collet 2009-06-17 00:36:39 EDT
What is the result of 

  grep extension_dir /etc/php.ini
  php -i | grep extension_dir

+
Comment 4 Sylvain Blanchet 2009-06-17 17:38:27 EDT
With the symbolic link in place, I get this

[root@linux03 lib]# grep extension_dir /etc/php.ini
extension_dir = "/usr/lib/php/modules"
; extension_dir directive above.
[root@linux03 lib]# php -i | grep extension_dir
extension_dir => /usr/lib/php/modules => /usr/lib/php/modules
[root@linux03 lib]# 
------------------------------------------------------------------------

Without the symbolic link in place, I get this

[root@linux03 lib]# grep extension_dir /etc/php.ini
extension_dir = "/usr/lib/php/modules"
; extension_dir directive above.
[root@linux03 lib]# php -i | grep extension_dir
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/curl.so' - /usr/lib/php/modules/curl.so: cannot open shared object file: No such file or directory in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/curl.so' - /usr/lib/php/modules/curl.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/dbase.so' - /usr/lib/php/modules/dbase.so: cannot open shared object file: No such file or directory in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/dbase.so' - /usr/lib/php/modules/dbase.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/json.so' - /usr/lib/php/modules/json.so: cannot open shared object file: No such file or directory in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/json.so' - /usr/lib/php/modules/json.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/mysql.so' - /usr/lib/php/modules/mysql.so: cannot open shared object file: No such file or directory in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/mysql.so' - /usr/lib/php/modules/mysql.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/mysqli.so' - /usr/lib/php/modules/mysqli.so: cannot open shared object file: No such file or directory in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/mysqli.so' - /usr/lib/php/modules/mysqli.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/pdo.so' - /usr/lib/php/modules/pdo.so: cannot open shared object file: No such file or directory in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/pdo.so' - /usr/lib/php/modules/pdo.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/pdo_mysql.so' - /usr/lib/php/modules/pdo_mysql.so: cannot open shared object file: No such file or directory in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/pdo_mysql.so' - /usr/lib/php/modules/pdo_mysql.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/pdo_pgsql.so' - /usr/lib/php/modules/pdo_pgsql.so: cannot open shared object file: No such file or directory in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/pdo_pgsql.so' - /usr/lib/php/modules/pdo_pgsql.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/pdo_sqlite.so' - /usr/lib/php/modules/pdo_sqlite.so: cannot open shared object file: No such file or directory in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/pdo_sqlite.so' - /usr/lib/php/modules/pdo_sqlite.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/pgsql.so' - /usr/lib/php/modules/pgsql.so: cannot open shared object file: No such file or directory in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/pgsql.so' - /usr/lib/php/modules/pgsql.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/zip.so' - /usr/lib/php/modules/zip.so: cannot open shared object file: No such file or directory in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/zip.so' - /usr/lib/php/modules/zip.so: cannot open shared object file: No such file or directory in Unknown on line 0
extension_dir => /usr/lib/php/modules => /usr/lib/php/modules
[root@linux03 lib]#
Comment 5 Remi Collet 2009-06-18 00:57:45 EDT
Extension_dir should not be present in php.ini

You can :
- Comment it 
- set it to the right location (/usr/lib64/php/modules)
- swicth to the default php.ini provided by php-common

So, this is not a bug.

Note You need to log in before you can comment on or make changes to this bug.