By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,247 Members | 1,273 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,247 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Share this Question
Share on Google+
3 Replies


P: n/a
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

P: n/a
> 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

P: n/a
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.