Hi,
i have installed apache, mysql, php3 and postgresql in a debian using 'apt-get' (apache, php3, php3-mysql, mysql, php3-pgsql, postgresql). The php scripts to access to a mysql works but the php scripts to access to pgsql don't.
Pgsql works correctly.

Can you help me?

Thanks a lot.

    What is apt-get and where did you obtain it.
    Is is a ready configured system or is it merely you way of describing those tools?

    Regards

    Richard

      Hi Richard,
      'Apt-get' is a install and configuration utility used in debian systems.

        Hi there.

        What is the error message ?
        Are you able to connect to the base using psql ?

        Postgresql accept 2 kinds of connection: local and tcp/ip ones.

        Starting postgre with postmaster -i will enable tcp/ip connection (well, you will have also to twinkle a bit with pg_hba.conf) so you will be able to use a pg_connect or whatever function with a host argument.

        If postgre is not started with the -i option, have a try not to give a hostname in the connection function so it will try connecting locally.

        Hopes this helps.

          Hi,
          when i call my page.php3 system returns 'call to unsupported or undefined function pg_connect() in page.php3 '.
          It seems that php3 doesn't support pgsql, not a problem with pgsql.

            if you're running php 3 then you may need to use the "old" version of pg_connect() which is

            pg_connect("", "", "", "", "foobardb");

            NOT the pg_connect() with one big string. If you're getting an invalid number of parameters error this is probably why. I really suggest you use php4 tho' it's gotta be on apt-get or there should be a deb package out there somewhere (or, hey, you could compile it... not so tough to do).

              looks like your php was not compiled with postgresql support.

              Either recompile it if it was installed using a tarball, or install the package (rpm or deb) relative to postgre and php.

                Write a Reply...