php --> postgresql

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
costache
Forum Newbie
Posts: 2
Joined: Mon Mar 10, 2003 4:51 pm

php --> postgresql

Post by costache »

I get the following error when calling pg_connect
Fatal error: Call to undefined function: pg_connect() in /var/www/html/page/pass.php on line 23
though phpinfo says in 'Configure command'
'--with-pgsql=shared'
and in Apache/Loaded Modules
mod_php4, mod_setenvif, mod_so, mod_headers, mod_expires, mod_auth_db, mod_auth_anon, mod_auth, mod_access, mod_rewrite, mod_alias, mod_userdir, mod_actions, mod_imap, mod_asis, mod_cgi, mod_dir, mod_autoindex, mod_include, mod_info, mod_status, mod_negotiation, mod_mime, mod_log_referer, mod_log_agent, mod_log_config, mod_env, mod_vhost_alias, http_core

What do I have to do?
do i have to specify smth like
"--with-pgsql=shared,/path/to/postgres/home" in the configure command of php?
does this require recompiling of php ?
User avatar
Stoker
Forum Regular
Posts: 782
Joined: Thu Jan 23, 2003 9:45 pm
Location: SWNY
Contact:

Post by Stoker »

changing the configure option will require recompilation, but if you did compile it with pgsql support and didnt get any errors those clients should be available, perhaps it is just not enabled in your php.ini ?
costache
Forum Newbie
Posts: 2
Joined: Mon Mar 10, 2003 4:51 pm

Post by costache »

i didn't compile it
i installed it from the rpm
the same with apache which was installed when i installed the whole SO
User avatar
Stoker
Forum Regular
Posts: 782
Joined: Thu Jan 23, 2003 9:45 pm
Location: SWNY
Contact:

Post by Stoker »

I am not familiar with the rpm-distroes, perhaps there is yet another rpm for the pgsql php module? and/or you have to ucomment a line in php.ini ?
Post Reply