469,578 Members | 1,705 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,578 developers. It's quick & easy.

Installing PhP5 (Win). Browser shows code. Help?

I'm installing PhP5 on WinXP, with Apache2.
In my Apache's httpd.conf file I have added
LoadModule php5_module c:/php-5/php5apache2.dll
and moved the .ini file to C:/Windows/php.ini
Apache works with the php module loaded.
When I look at this code with my IE browser:

<? phpinfo(); ?>

or

<?php
phpinfo();
?>

....all I get in the browser is the code itself.
Q: why is it not working? How can I diagnose my problem?
I've spent hours with manuals, etc. Help greatly appreciated.
Jul 17 '05 #1
3 1975
Erick Howenstine wrote:
...all I get in the browser is the code itself.
Q: why is it not working? How can I diagnose my problem?
I've spent hours with manuals, etc. Help greatly appreciated.


You forgotten add the following line in your httpd.conf file:

AddType application/x-httpd-php .php
JW

Jul 17 '05 #2
> I'm installing PhP5 on WinXP, with Apache2.
In my Apache's httpd.conf file I have added
LoadModule php5_module c:/php-5/php5apache2.dll
and moved the .ini file to C:/Windows/php.ini
Apache works with the php module loaded.
When I look at this code with my IE browser:

<? phpinfo(); ?>

or

<?php
phpinfo();
?>

...all I get in the browser is the code itself.
Q: why is it not working? How can I diagnose my problem?
I've spent hours with manuals, etc. Help greatly appreciated.

in Apache httpd.conf file write something like this:
################################################## ##
AddType application/x-httpd-php .php4 .php .htm .php3 .inc .html
AddType application/x-httpd-php-source .phps
Scriptalias /php/ "c:/path_to_php/"
Action application/x-httpd-php "/php/php-cgi.exe"
################################################## ##
Jul 17 '05 #3
Varavva Yevgen aka xa4anypu wrote:
Scriptalias /php/ "c:/path_to_php/"
Action application/x-httpd-php "/php/php-cgi.exe"


The OP uses PHP as a module, so skip these lines.
JW

Jul 17 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Scott Matthews | last post: by
4 posts views Thread by Philipp Lenssen | last post: by
2 posts views Thread by y_oda2002 | last post: by
1 post views Thread by Rami A. Kishek | last post: by
8 posts views Thread by Tony B | last post: by
reply views Thread by suresh191 | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.