Page 1 of 1

Installing php, apache on XT again.....

Posted: Fri Jun 26, 2009 9:56 am
by dkperez
I tried the tutorial but the page isn't available. I rummaged around but didn't find a forum for installing, so if this is in the wrong place let me know...

BRAND NEW to php.

Installed Apache 2.2 on Windows XP this morning. Went fine. Got the "it works" display in the browser.

Extracted the php files to c:\Program Files\php

Copied the following fiels to C:\Program Files\Apache Software Foundation\Apache2.2\

C:\php\php5ts.dll
C:\php\php5apache2_2.dll
C:\php\php.ini-recommended

Renamed C:\php\php.ini-recommended C:\php\php.ini

Should I have used this ini file or the ini-dist one?
Should I copy the ini file to the apache directory or just rename the one in the php directory?

Edited the ini file in the apache directory and changed doc_root = to

doc_root = C:\Program Files\Apache Software Foundation\Apache2.2\htdocs

Edited the apache configuration httpd.conf and added (at the end)

LoadModule php5_module php5apache2_2.dll
AddType application/x-httpd-php .php

When I ran the test configuration it kept telling me it couldn't find php5apache2_2.dll module.

SO, I found another set of installation instructions that had me do it this way:

LoadModule php5_module "c:\Program Files\php\php5apache2_2.dll"
AddType application/x-httpd-php .php
PHPIniDir "C:\Program Files\php"

Now I don't get any error when I do the test configuration...............

BUT, I just get the source code from test.php:

I created the following and put it in the htdocs folder of the apache directory

<?php
phpinfo();
?>

In IE I used url http://localhost/test.php but instead of running I just see the source above.
I presume this means Apache IS NOT recognizing php.....

What do I need to change to get this working?

Re: Installing php, apache on XT again.....

Posted: Fri Jun 26, 2009 10:06 am
by Benjamin
:arrow: Moved to Installation and Configuration

Re: Installing php, apache on XT again.....

Posted: Fri Jun 26, 2009 3:42 pm
by dkperez
OK, now that I've been put in the right forum, I found several other topics on people having the same problem I am....

But, as near as I can tell, I'm using the right files, with the right names, in the directories where they actually are.

And I'm still getting the source of the test.php instead of executing it.....

I'll go rummage around for some MORE installation tutorials....

Re: Installing php, apache on XT again.....

Posted: Fri Jun 26, 2009 4:57 pm
by dkperez
Never mind........ I went back out looking for more installation instructions and found one that claimed the majority of others were riddled with errors.... It had me do a couple additional steps including copying all the .dll files (that were NOT php5*.dll) from the php directory to windows/system32 and
I can now run test.php......................... SO, I presume Apache is now recognizing php?

Now the real fun starts...... I've got a simple html file that puts up a form and calls a php file with:

<form action="test1.php" method="post">

but again, instead of executing the php file, I get the source. Configuration? Something else?
Is there a specific directory everything hsa to be put in for it to execute? I tried copying everything
to the htdocs directory but I still just get the source... What'm I missing here?