On Wed, 16 May 2007 22:23:05 +0100
Mat Grove <mjeg@???> wrote:
> On Wed, 16 May 2007 15:52:01 +0100
> john lewis <johnlewis@???> wrote:
>
>
> > I would like to get my Apache + PHP setup talking to Postgresql
> > so I can play with the Exodus (genealogy) database
> >
> > I can get apache to display a simple html website and to display a
> > PHP test script (1) but cannot persuade PHP to open the exodus
> > database I have setup in postgresql.
>
> Can you put a copy of that page somewhere we can see? And / or what
> is the output of this command:
>
> dpkg -l | grep php
Hi Matt
benden:~# dpkg -l | grep php
ii libapache-mod-php5 5.2.2-1+b1
server-side, HTML-embedded scripting languag
ii libapache2-mod-php5 5.2.2-1+b1
server-side, HTML-embedded scripting languag
ii php5-common 5.2.2-1+b1
Common files for packages built from the php
ii php5-pgsql 5.2.2-1+b1
PostgreSQL module for php5
ii phppgadmin 4.0.1-3.1 Set of PHP scripts to
administrate PostgreSQ
> Perhaps you don't have the PHP Postgre module installed or
> configured.
>
> In addition what is the error message! 'cannot persuade' - pah :)
I didn't repeat what I had posted in an earlier email :-)
trying to load exodus with
http://localhost/exodus I get
Warning: pg_connect() [function.pg-connect]: Unable to connect to
PostgreSQL server: fe_sendauth: no password supplied
in /var/www/exodus/settings/settings.php on line 34
Warning: pg_last_error() [function.pg-last-error]: No PostgreSQL link
opened yet in /var/www/exodus/settings/settings.php on line 35 Could
not connect:
I deliberately set up the exodus database in postgresql without a
password. The relevant lines in settings.php are
//db parameters
$host = "localhost";
$dbname = "exodus";
$username = "jayell";
// * $password = " ";
$db = pg_connect("host=$host dbname=$dbname user=$username")
or die('Could not connect: ' . pg_last_error());
pg_set_client_encoding($db, LATIN1);
Some of the details were modified by me but the $db_connect lines
are as supplied in the exodus package and presumably work for the
author.
see
http://solumslekt.org/blog/?p=6 for details of Exodus
The output from test.php is
System Linux benden 2.6.18-4-k7 #1 SMP Mon Mar 26 17:57:15
UTC 2007 i686 Build Date May 11 2007 09:42:21
Server API Apache 2.0 Handler
Virtual Directory Support disabled
Configuration File (php.ini) Path /etc/php5/apache2
Loaded Configuration File /etc/php5/apache2/php.ini
Scan this dir for additional .ini files
/etc/php5/apache2/conf.d additional .ini files parsed
/etc/php5/apache2/conf.d/pdo.ini, /etc/php5/apache2/conf.d/pdo_pgsql.ini, /etc/php5/apache2/conf.d/pgsql.ini
PHP API 20041225 PHP Extension 20060613
Zend Extension 220060519
Debug Build no
Thread Safety disabled
Zend Memory Manager enabled
IPv6 Support enabled
Registered PHP Streams zip, php, file, data, http, ftp,
compress.bzip2, compress.zlib, https, ftps Registered Stream Socket
Transports tcp, udp, unix, udg, ssl, sslv3, sslv2, tls
Registered Stream Filters string.rot13, string.toupper,
string.tolower, string.strip_tags, convert.*, consumed,
convert.iconv.*, bzip2.*, zlib.*
I trust this is enough info ;-)
--
John Lewis
Debian (Sid) with the GeneWeb genealogy package