logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in  RSS Apache Lounge  


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.


Post new topic   Forum Index -> Coding & Scripting Corner View previous topic :: View next topic
Reply to topic   Topic: PHP code doesn't work
Author
tggsun



Joined: 18 Aug 2006
Posts: 2

PostPosted: Fri 18 Aug '06 20:23    Post subject: PHP code doesn't work Reply with quote

Hi All,
I'm a new user for the PHP5.x and Apache2.x.
I configed them and seems those are work. But when I submit the code below, the IE only run the html code and can not excute the php script part. Can anyone point out where the problem occured?
Thanks
TGGSUN

code:

<html>
<head><title>PHP Design</title></head>
<body bgcolor="white">

<h1> PHP Design Page </h1>
<?php phpinfo(); ?>
<p>

</body>
</html>
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7128
Location: Germany, Next to Hamburg

PostPosted: Fri 18 Aug '06 21:07    Post subject: Reply with quote

Does the file has the correct extension? Windows doesn't show known extension.
How did you set the php handler in httpd.conf?
Back to top
tggsun



Joined: 18 Aug 2006
Posts: 2

PostPosted: Fri 18 Aug '06 22:37    Post subject: Reply with quote

what do you mean the file has the correct extension? the file I saved for the testing has .html extension.

I set httpd.conf file by add two lines
loadmodule php5_module c:/php5/php5apache2.dll
addtype application/x-httpd-php .php .html
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7128
Location: Germany, Next to Hamburg

PostPosted: Fri 18 Aug '06 23:21    Post subject: Reply with quote

Config seems to be okay. How do you call the script?

http://127.0.0.1/testing.html or http://localhost/testing.html or C:\apache\htdocs\testing.html

Did you restart Apache after adding the two lines?
Some error in the error log?

If nothing work at all follow this post
http://www.apachelounge.com/viewtopic.php?t=570
Back to top


Reply to topic   Topic: PHP code doesn't work View previous topic :: View next topic
Post new topic   Forum Index -> Coding & Scripting Corner