|
Posted by David Haynes on 10/19/05 20:31
Maddman75@gmail.com wrote:
> I'm having trouble getting PHP installed on my system. I downloaded
> the zip file and extracted the files to C:\php. Following the
> documentation, I did the following
>
> - added C:\php to my PATH
> - added the following lines to the httpd.conf file for Apache
>
> # Adding module references for PHP
> LoadModule php5_module "c:/php/php5apache2.dll"
> AddType application/x-httpd-php .php
>
> # configure the path to php.ini
> PHPIniDir "C:/php/"
>
> I tried it both with and without the last slash on the PHPIniDir, made
> no difference.
>
> - I copied and renamed php.ini-recommended as php.ini.
> - One bit of advice in the documentation said to copy this file to "the
> apache directory", which is a bit vauge. There's lots of Apache
> directories. I tried it in both Apache2 and htdocs, no difference.
>
> It does not seem to be processing PHP commands at all. The sample I'm
> using is
>
> <html>
> <head>
> <title>PHP Test</title>
> </head>
> <body>
> <?php echo 'Hello World'; ?>
> </body>
> </html>
>
> If I bring up the page and View Source, this is exactly what I get.
> Its my understanding that if PHP were working correctly I'd just see
> the Hello World, and not the surrounding PHP script.
>
> Also, I checked my Apache logs, nothing relevent within. Anyone know
> what I might have missed?
>
> Thanks!
>
Two things:
1. I think PHPIniDir may need to be "C:\php"
2. Did you restart apache? It needs to be restarted to pick up changes
in the httpd.conf.
-david-
Navigation:
[Reply to this message]
|