Page 1 of 1

php --> postgresql

Posted: Mon Mar 10, 2003 4:51 pm
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 ?

Posted: Mon Mar 10, 2003 7:19 pm
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 ?

Posted: Tue Mar 11, 2003 9:02 am
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

Posted: Tue Mar 11, 2003 10:35 am
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 ?