Results 1 to 8 of 8
  1. #1

    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.


  2. #2
    Join Date
    Dec 2002
    chica go go
    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/

  3. #3
    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


  4. #4
    Join Date
    Dec 2002

    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.
    [email protected]
    AIM:AhmedFouad0 , yahooID:xor2004

  5. #5
    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."

  6. #6
    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.

  7. #7
    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 !


  8. #8
    Join Date
    Feb 2004
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts