Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 6 Jun 2005 12:08:58 +0200
From:      Nelis Lamprecht <nlamprecht@gmail.com>
To:        philip@xms.co.za
Cc:        FreeBSD Questions <questions@freebsd.org>
Subject:   Re: PHP on freebsd ports not working
Message-ID:  <7cbadc8705060603085dc37ef1@mail.gmail.com>
In-Reply-To: <1118083484.19699.6.camel@linux.site>
References:  <1118083484.19699.6.camel@linux.site>

next in thread | previous in thread | raw e-mail | index | archive | help
On 6/6/05, Philip Wege <philip@xms.co.za> wrote:
> Unable to get php to work through ports system:
>=20
> Php5 and Apache2 is being used.
>=20
> The test script looks like this :
> <html>
> <head>
> <title>Hello World</title>
> </head>
> <body>
> <?php
> echo "Hello World";
> ?>
> </body>
> </html>
>=20
> Logs only says :
>=20
> [Mon Jun 06 07:50:48 2005] [notice] caught SIGTERM, shutting down
> [Mon Jun 06 07:53:12 2005] [notice] Apache/2.0.54 (FreeBSD) PHP/5.0.4
> configured -- resuming normal operations
>=20
> The following was added to httpd.conf :
>=20
> LoadModule php5_module        libexec/apache2/libphp5.so
>=20
> When the one open machineip/test.php , it displayes the empty webpage
> and its title.
>=20
> I got a feeling im missing config lines that needs to be added to
> httpd.conf , can anyone help ?
>=20

I assume you added the following which would have displayed after your
php5 installation:

nelis@sqldb~>$ pkg_info -D php5-5.0.4_1
Information for php5-5.0.4_1:

Install notice:
***************************************************************

Make sure index.php is part of your DirectoryIndex.

You should add the following to your Apache configuration file:

AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

***************************************************************

Also, it's probably best to test your php5 installation using phpinfo();
Just add <? phpinfo(); ?> to a filename.php and access it via your web brow=
ser.

Regards,
Nelis



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7cbadc8705060603085dc37ef1>