Thread: Enabling PHP
I am trying to connect to a databse from a php script but I get the error: Fatal error:Call to undefined function: pg_connect(). I read that from the mailing list archives that I mustnt have compiled some package with the postresql library. Could someone tell me how I would fix this. Thanks, Paul
Hi, Yup, you're right. PHP hasn't been compiled with PostgreSQL. You need to compile PHP again. If any problems, check out my small tutorial - http://designmagick.50megs.com/postgresql-tutorial/ it might help with a step missed or something like that. Hope that helps.. >I am trying to connect to a databse from a php script but I get the error: >Fatal error:Call to undefined function: pg_connect(). I read that from the >mailing list archives that I mustnt have compiled some package with the >postresql library. Could someone tell me how I would fix this. >Thanks, >Paul ------------------------ Chris Smith http://www.squiz.net
www.php.net has rather decent instructions also. Adam Lang Systems Engineer Rutgers Casualty Insurance Company http://www.rutgersinsurance.com ----- Original Message ----- From: "Chris" <csmith@squiz.net> To: "Paul Joseph McGee" <mcgee@student.cs.ucc.ie>; <pgsql-php@postgresql.org> Sent: Monday, January 08, 2001 5:20 PM Subject: Re: [PHP] Enabling PHP > Hi, > > Yup, you're right. PHP hasn't been compiled with PostgreSQL. You need to > compile PHP again. > > If any problems, check out my small tutorial - > http://designmagick.50megs.com/postgresql-tutorial/ > it might help with a step missed or something like that. > > Hope that helps.. > > >I am trying to connect to a databse from a php script but I get the error: > >Fatal error:Call to undefined function: pg_connect(). I read that from the > >mailing list archives that I mustnt have compiled some package with the > >postresql library. Could someone tell me how I would fix this. > >Thanks, > >Paul > > ------------------------ > Chris Smith > http://www.squiz.net
If you compiled php yourself, you will have to recompile it with --with-pgsql On the other hand, if you installed the package that came with your linux/unix distribution, it should also have a pgsql module for php. Try installing it. Anuradha On Mon, 8 Jan 2001, Paul Joseph McGee wrote: > I am trying to connect to a databse from a php script but I get the error: > Fatal error:Call to undefined function: pg_connect(). I read that from the > mailing list archives that I mustnt have compiled some package with the > postresql library. Could someone tell me how I would fix this. > Thanks, > Paul >