[PHP-DEV] Bug #14386 Updated: function p/connect do not work in FreeBSD

2001-12-11 Thread cardinal

ID: 14386
Updated by: cardinal
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Bogus
Bug Type: PostgreSQL related
Operating System: FreeBSD
PHP Version: 4.0.6
New Comment:

Not a bug.  Please send support questions to an appropriate
mailing list such as php-general or php-db.

http://php.net/support.php

Previous Comments:


[2001-12-08 15:23:11] [EMAIL PROTECTED]

Hello everybody.

I am using FreeBSD+Apache+PHP+Postgres.
By now, I'm using the newest versions:

- FreeBSD 4.4
- Apache_1.3.22
- PHP-4.0.6 ( I have proved the 4.1RC3 and have the same problem)
- Postgresql-7.1.3

I use the same three last components in Linux ans SunOS and I have not any problems. I 
always try to compile from source, I always make the same instructions and in FreeBSD 
PHP can not connect with PostgreSQL.
I install everything with:

tar xvzf postgresql-7.1.3.tar.ga
cd postgresql-7.1.3
./configure  make  make install
initdb -D /usr/local/pgsql/data
postmaster -i -D /usr/local/pgsql/data 

Now postgres is running.

tar xvzf apache_1.3.22.tar.gz
cd apache_1.3.22
./configure 
cd ..
tar xvzf php-4.0.6.tar.gz
cd php-4.0.6
./configure --with-pgsql=/usr/local/pgsql/ --without-mysql 
--with-apache=../apache_1.3.22 --enable-track-vars
make 
make install

cd ../apache_1.3.22
./configure --enable-module=src/modules/php4/libphp4.a
make 
make install

Edit /usr/local/apache/conf/httpd.conf to make use of PHP

Start apache
/usr/local/apache/bin/apachectl start

In this moment I have apache listening in port 80 and postgres in 5432 ( i know this 
using ps-e  and nmap localhost).

In this moment apache works, PHP works. I can see the simple script ?php phpinfo(); 
? with no problems.
But I can not connect to PostgreSQL database ( tried connect and pconnect functions). 
After a while apperas this message:


Warning: Unable to connect to PostgreSQL server: connectDBStart() -- connect() failed: 
No route to host Is the postmaster running (with -i) at 'localhost' and accepting 
connections on TCP/IP port 5432? in /usr/home/pfc/phplib/php/db_pgsql.inc on line 47
Database error: Link-ID == false, pconnect failed
PostgreSQL Error: 0 ()
Session halted.

I can sure you that postgres is running and I iniciate postmaster with the '-i' flag. 
In the file /usr/local/pgsql/data/pg_dba.conf I have the following:

local  all   trust
host all 127.0.0.1 255.255.255.0 trust
host all 192.168.99.1 255.255.255.0 trust

NOTE: 192.168.99.1 is the server's IP.

I can sure I have installed apache-php-postgres in linux and SunOS with the same 
method and here work well. I do not know why PHP can not comunicate with PostgreSQL 
using FreeBSD.

Thanks a lot for.

I am pleased if anyone could solvent this problem.
If there is anyone who want contact me (for telling more details, ... ) no doubt write 
to: [EMAIL PROTECTED]

Xevi Serrats.

NOTE: excuse me, english isn't my native language.








Edit this bug report at http://bugs.php.net/?id=14386edit=1


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] Bug #14386 Updated: function p/connect do not work in FreeBSD

2001-12-11 Thread Markus Fischer

On Tue, Dec 11, 2001 at 08:28:23AM -, [EMAIL PROTECTED] wrote : 
 ID: 14386
 Updated by: cardinal
 Reported By: [EMAIL PROTECTED]
 Old Status: Open
 Status: Bogus
 Bug Type: PostgreSQL related
 Operating System: FreeBSD
 PHP Version: 4.0.6
 New Comment:
 
 Not a bug.  Please send support questions to an appropriate
 mailing list such as php-general or php-db.

Normally I won't rant, but please also try to give at least
a small hint what for the user. It just turns out to look
nicer to the users.

- Markus

-- 
Please always Cc to me when replying to me on the lists.

-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]