hosted by liquidweb

Go Back   Web Hosting Talk : Web Hosting Main Forums : Hosting Security and Technology : FreeBSD installing PHP with postgresql support failure via ports

Forum Jump

FreeBSD installing PHP with postgresql support failure via ports

Reply Post New Thread In Hosting Security and Technology Subscription
Send news tip View All Posts Thread Tools Search this Thread Display Modes
Join Date: Aug 2004
Posts: 23

FreeBSD installing PHP with postgresql support failure via ports

Thanks for taking a look, Initially i had just installed it plain and received the common error: Fatal error: Call to undefined function: pg_connect().

So i went to /usr/ports/www/mod_php4/ and did a make deinstall.

then i did a make install --with-pgsql=shared but to no avail. It doesnt show up after install. All i have is:

'./configure' '--enable-versioning' '--enable-memory-limit' '--with-layout=GNU' '--with-config-file-scan-dir=/usr/local/etc/php' '--disable-all' '--with-regex=php' '--disable-cli' '--with-apxs=/usr/local/sbin/apxs' '--prefix=/usr/local' 'i386-portbld-freebsd5.2.1'

Im relativley new to this aspect of server admining and trying to learn, anyone able to give a helpful hand by chance?

Thanks in advance

P.S. running freebsd 5.2.1 , php 4.3.8

Basically what im looking for is a straight explanation on how to fix this so i could use it for future purposes.

Appreciate everyones time.


Sponsored Links
Join Date: Dec 2002
Location: chica go go
Posts: 11,858
when you run make, it should bring up a little screen similar to make menuconfig which will allow you specify modules to be installed with php.

Try installing php from /usr/ports/lang/php4 and then installing from /usr/ports/www/mod_php4/

Join Date: Aug 2004
Posts: 23
Aye I thought so too sir but the menu that comes up only has 3 options

Apache 2.0
IPV6 (or something of the nature)

Thank you for your effort to help


Sponsored Links
WHT Addict
Join Date: Dec 2002
Location: Egypt
Posts: 151
PHP compile


You need to compile first php with this option --with-pgsql=shared , it's on the configure command , not the make install one.

so append this --with-pgsql=shared to the configure command you listed and should work fine then.

knowledge is Power , Spread it.
AIM:AhmedFouad0 , yahooID:xor2004

Web Hosting Master
Join Date: Feb 2002
Posts: 981
Running latest ports tree?
check out "lang/php4-extensions" - it all has been moved there a while ago.


Powered by AMD & FreeBSD.
"Documentation is like sex:
when it is good, it is very, very good;
and when it is bad, it is better than nothing."

Web Hosting Evangelist
Join Date: Dec 2002
Posts: 508
php4-extensions is just a meta port. Personally, I don't like using it as it adds more dependencies.

As Miha was hinting at however, as of about 2-3 months ago, all the extensions for php are in their own seperate ports now. The one you are looking for is:


Matt Wade
Christian Web Hosting - Home of the PHP Coding Contest - Directory of PHP Web Hosts. Free Listing.

Join Date: Aug 2004
Posts: 23
Thank you kindly for all the replies. Yeah I needed to install via php-extensions in order to get that menu up that everyone was discussing lol.

I appreciate everyones time ! Thank you !


Web Hosting Master
Join Date: Feb 2004
Posts: 772
Dear zuir,

PHP is not compiled with the pgsql extensions on your server.
As suggested by AhmedFouad You must recompile PHP like,

'./configure' '--enable-versioning' '--enable-memory-limit' '--with-layout=GNU' '--with-config-file-scan-dir=/usr/local/etc/php' '--disable-all' '--with-regex=php' '--disable-cli' '--with-apxs=/usr/local/sbin/apxs' '--prefix=/usr/local' 'i386-portbld-freebsd5.2.1' '--with-pgsql=/usr/local'


Bright Info Solutions


Related posts from
Title Type Date Posted
Linux Malware Operation Windigo Infects 25,000 Web Servers Web Hosting News 2014-03-19 11:44:53
Google Compute Engine Expands OS Support, Lowers Prices in General Availability Web Hosting News 2013-12-03 13:08:34
HOSTING Storage Failure Affects CloudVPS Accounts Web Hosting News 2013-10-23 11:51:43
Five Rules for Moving to the Cloud Blog 2013-07-24 09:27:00
Jelastic Launches Version 1.9.1 of Java and PHP Hosting Platform Web Hosting News 2013-05-21 09:39:09

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Log in with your username and password

Forgot Password?
WHT Host Brief Email:

We respect your privacy. We will never sell, rent, or give away your address to any outside party, ever.

Web Hosting News:
WHT Membership
WHT Membership



Welcome to

Create your username to jump into the discussion! is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.

(4 digit year)

Already a member?