Forum Moderators: coopster

Message Too Old, No Replies

How making Apache2 and PHP5 communicating?

Never done it from scratch on XP

         

henry0

10:07 pm on Sep 17, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I have on my other RH machine PHP5 running
I am now trying to install on a Wins machine a LAMP from scratch

So far I have Apache 2 running (page test works OK)
Now I have unzipped the PHP5 installer that will install PHP or should I do it from scratch too
I did read PHP5 thread with Coopster's tutorial
but I cannot really fathom the task at hand

Where should it be installed?
But mostly I do not understand how establishing communication in between
PHP and Apache

<EDIT>
Where is it
<<<
Oh yeah, don't forget to update your Apache configuration to process PHP files
>>>
</EDIT>

regards

Henry

henry0

12:50 pm on Sep 18, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I followed (as far as I can trust myself!) both Coopster and PHP5 manual
Dll’s are where they should be
PHP path added as per PHP manual
PHP.ini edited
But I still cannot have my PHP files red as a web page
It shows the script but does not read it as a web page

I do not know if anything else has to be edited or added in Apache conf?

Well I am stock :)

Thanks

Henry

lazydog

2:12 pm on Sep 18, 2004 (gmt 0)

10+ Year Member



Have you added this line to apache conf?

AddType application/x-httpd-php .php

Saurabh.

henry0

3:25 pm on Sep 18, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks
but with the new line added
it now opens the file download dialog as if I wanted to download the file to my machine

Henry

coopster

4:30 pm on Sep 18, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



The last couple of lines in the instructions [webmasterworld.com] you are referring to mention don't forget to update your Apache configuration to process PHP files.

Since the instructions there are for running as a server module, here are the two lines you need to add to your Apache configuration (

httpd.conf
) file.


# For PHP 5 do something like this:
LoadModule php5_module "c:/php/php5apache2.dll"
AddType application/x-httpd-php .php

# It's also common to setup the .phps extension to show highlighted PHP
# source, this can be done with:
AddType application/x-httpd-php-source .phps

Resource:
Apache 2.0.x on Microsoft Windows [php.net]

henry0

8:27 pm on Sep 18, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks Coopster
I am all set
Learned something again today

regards

Henry