Re: [Hampshire] Apache2 configuration

Top Page

Reply to this message
Author: john lewis
Date:  
To: hampshire
Subject: Re: [Hampshire] Apache2 configuration
On Mon, 02 Apr 2007 19:25:19 +0100
Graeme Hilton <graeme.hilton@???> wrote:

> john lewis wrote:
> > still can't get it to display index.php so am giving up for today
> > and will try again tomorrow when brain is less fuzzy
>
> You need to tell Apache how to handle the .php files. This is done
> with the following incantion:
> AddHandler php5-script .php
> AddType text/html .php
>
> You also need to tell it that index.php is the file you want it to
> serve if you give it a url without a filename on the end (i.e.
> http://www.example.com/). This is done with the DirectoryIndex
> statement DirectoryIndex index.php
>
> On my FC6 system all these php specific parts are in
> /etc/httpd/conf.d/php.conf which I've copied below.


Thanks Graeme

I added a php.conf to /etc/apache2/conf.d/ as set out in your email
and started apache and got this

[Tue Apr 03 12:31:22 2007] [warn] module php5_module is already
loaded, skipping [Tue Apr 03 12:31:22 2007] [notice] Apache/2.2.3
(Debian) PHP/5.2.0-10 configured -- resuming normal operations

I then tried to load the website with
http://localhost;80/exodus.benden.pern/index.php

and got these error messages-

[Tue Apr 03 12:31:30 2007] [error] [client 127.0.0.1] PHP Warning:
pg_connect() [<a href='function.pg-connect'>function.pg-connect</a>]:
Unable to connect to PostgreSQL server: fe_sendauth: no password
supplied in /var/www/exodus.benden.pern/settings/settings.php on line
34 [Tue Apr 03 12:31:30 2007] [error] [client 127.0.0.1] PHP
Warning: pg_last_error()
[<a href='function.pg-last-error'>function.pg-last-error</a>]: No
PostgreSQL link opened yet
in /var/www/exodus.benden.pern/settings/settings.php
on line 35 benden:/etc/apache2/sites-available#

settings.php has among other things

//db parameters
    $host = "localhost";
    $dbname = "exodus";
    $username = "jayell";
//    $password = "";


and

// application path
    $app_path = "/var/www/exodus.benden.pern"; 


These are parameters I set up and may well be incorrect, the database
'exodus' seems to be setup OK if the following dialog is anything to
go by

jayell@benden:~$ psql exodus
Welcome to psql 8.1.8, the PostgreSQL interactive terminal.

Type:  \copyright for distribution terms
       \h for help with SQL commands
       \? for help with psql commands
       \g or terminate with semicolon to execute query
       \q to quit


exodus=>

so it looks as though I may at last have got apache2 working but the
next step is missing

--
John Lewis
Debian Linux with Geneweb genealogy application