For Programmers: Free Programming Magazines  


Home > Archive > PHP Installation > March 2007 > PHP5 as module on Apache 2.2 on win XP









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author PHP5 as module on Apache 2.2 on win XP
j k

2007-02-27, 7:02 pm

Just installed apache 2.2 and it is up and running.
trying to add PHP5 using the instructions add these to httpd.conf:

LoadModule php5_module "F:\php-5.2.1\php5apache2.dll"
AddType application/x-httpd-php .php
# configure the path to php.ini
PHPIniDir "F:/php-5.2.1"

I have done this successfully on earlier versions of both PHP and Apache...
but this one chokes on the PHPIniDir on apache restart:

Syntax error on line 121 of F:/Apache2.2/conf/httpd.conf:
Invalid command 'PHPIniDir', perhaps misspelled or defined by a module not
included in the server configuration.



No error message when the PHPIniDir line is commented out so it is finding
the dll OK.

Nothing in the error logs to help.
Tried using \ in the PHPIniDir but that didn't help.

Any ideas?

j k

2007-02-28, 7:01 pm

Update for the benefit of searchers with a similar problem.
I tried many reboots and many permutations of the file paths always with the
same result:
syntax error on line xxx of F:/Apache2.2/conf/httpd.conf:
Invalid command 'PHPIniDir',

In desperation to get something working, after wasting so much time on what
should be trivial, figured I'd try the msi install binary so I downloaded
that but before running that, for one last try, even though it wasn't what I
wanted, I copied the php directory from my F drive to C
and edited httpd.conf accordingly.

Well it worked. PHP ran just like it should have done several days back.
So at that stage thinking I was crazy, I renamed the C drive PHP folder so
it wouldn't be found and redid the httpd.conf to point back at the F drive.
Well that worked too! So now the original config that would never work for
several days suddenly starts working. wtf?

The only way to retrace my steps would be to do a fresh install of XP and I
just don't have time so the mystery remains but there's a path for anyone
else who has this problem.

BTW (off topic): they use very poor email address mangling on this list so
be warned you may get spammed if you join.

On 2/27/07, j k <noone@nowhere.com> wrote:
>
> Just installed apache 2.2 and it is up and running.
> trying to add PHP5 using the instructions add these to httpd.conf:
>
> LoadModule php5_module "F:/php-5.2.1/php5apache2_2.dll"
> AddType application/x-httpd-php .php
> # configure the path to php.ini
> PHPIniDir "F:/php-5.2.1"
>
> I have done this successfully on earlier versions of both PHP and
> Apache...
> but this one chokes on the PHPIniDir on apache restart:
>
> Syntax error on line 121 of F:/Apache2.2/conf/httpd.conf:
> Invalid command 'PHPIniDir', perhaps misspelled or defined by a module not
> included in the server configuration.
>
>
>
> No error message when the PHPIniDir line is commented out so it is finding
> the dll OK.
>
> Nothing in the error logs to help.
> Tried using \ in the PHPIniDir but that didn't help.
>
> Any ideas?
>


Warwolf

2007-03-12, 11:24 am

Christina Ricci Undressing!
http://Christina-Ricci-Undressing.o...hp?movie=148803
Erpoenceter5

2007-03-23, 5:15 pm

Jessica Alba In Anal Action Movie!
http://Jessica-Alba-In-Anal-Action-...hp?movie=148803
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com