I've hacked away and actually got a working copy of Apache + PHP + PostgreSQL
to install on my disk: Apache and PHP from source, and the rpm'd version of
PostgreSQL 7.0.3 mdk.
I have followed a tutorial from www.newbienetwork.net entitled "Beginning PHP
and PostgreSQL" that included an html/php script to connect with Apache. It
doesn't work. The offending lines are:
<snip>
�������� $db = pg_connect("dbname=friends user=htdocs");
�������� $query = "SELECT * FROM friends";
�������� $result = pg_exec($db, $query);
<snip>
I cannot "connect" with Apache, no matter what I put as "user". I get the
following message:
"WARNING: PostgreSQL query failed in /home/lab/apache/htdocs/frnz0.php on
line 6
ERROR"
I've created user "htdocs". Nothing. In the tutorial he wrote: "Obviously at
this point, change the username to the one that your web server runs as."
Would that be "postgres" or "nobody"? I'm really confused (as a newbie) since
I'm trying to sort out three new things at once: Apache, PHP, and Postgresql!
>From the information I've listed here, can any gurus figure out what I've
messed up? I'd really appreciate your help so that I could actually use the
three!
*********************************************************************************
The setup (so far):
Apache 1.3.23 and PHP 4.1.1 (from source), and PostgreSQL 7.0.3.mdk (RPM from
LM8.0).
Apache: with DSO installed in /home/lab/apache with recursive 755
permissions (from /lab) nobody:nobody; document root = htdocs (755
nobody:nobody).
PostgreSQL: installed in /var/lib/pgsql 755 postgres:postgres; /data 700
postgres:postgres.
*********************************************************************************
Somehow, I think that it's the permission thing again, but where? Any ideas?
I'd greatly appreciate help again -- man this is fun! It's bringing back
so many neat memories -- I love this stuff.
Tia,
Andre
--
Please pray the Holy Rosary to end the holocaust of abortion.
Remember in your prayers the suffering souls in Purgatory.
May God bless you abundantly in His love!
For a free Cenacle Scriptural Rosary Booklet -- http://www.webhart.net/csrb/
Want to buy your Pack or Services from MandrakeSoft?
Go to http://www.mandrakestore.com