Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
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.
| |
|
Topic: PHP is half working? |
|
Author |
|
littlecomet
Joined: 08 Oct 2006 Posts: 2
|
Posted: Sun 08 Oct '06 6:22 Post subject: PHP is half working? |
|
|
Hi All,
I installed Apache 2.2.3 and PHP 5.1.6 for windows. I followed below instruction to install:
http://www.apachelounge.com/viewtopic.php?t=570
The http://localhost/test.php page work fine! Also when I load other php page with http://localhost/xxxxx.php
But when I try to call a php page from another HTML, I can only see the php source code appear on brower. Why PHP did not process the php file?
I am using IE6. The code is below:
<html>
<body>
<form action="processorder.php" method="post">
<table border="0">
<tr bgcolor="#cccccc">
<td width="150">Item</td>
<td width="15">Quantity</td>
</tr>
<tr> |
|
Back to top |
|
Brian
Joined: 21 Oct 2005 Posts: 209 Location: Puyallup, WA USA
|
Posted: Sun 08 Oct '06 8:12 Post subject: |
|
|
It sounds like you have not given the VHOST the ability to execute the PHP. I am not so comfortable with Apache CONF files as to venture what specific section to look for, but it sounds like the vhost just doesn not even pass the PHP file onto the PHP engine for processing. In other words, for Localhost you parse and process PHP, but for other traffic it does not.
Let me ask this, are you calling PHP from something other than localhost, such as http://somewebsite.com/file.php and that is what is kicking the PHP code instead of the appropriate output? |
|
Back to top |
|
littlecomet
Joined: 08 Oct 2006 Posts: 2
|
Posted: Sun 22 Oct '06 16:25 Post subject: |
|
|
Thanks for your reply.
That's right, I was calling my php from outside the localhost directory. So the php was not process by the php engine.
So how do I specify the php to process other php even if it's not within the localhost? Do I modify the CONF files? |
|
Back to top |
|
Brian
Joined: 21 Oct 2005 Posts: 209 Location: Puyallup, WA USA
|
Posted: Sat 28 Oct '06 18:20 Post subject: |
|
|
You need to look at what directory has the PHP contained within.
i.e. d:/www/
... or what ever. Then, you need to look at the CONF file and look at the portion that manages the execution of PHP. Now, at this point you really need to already be aware of what part of the CONF or what ever include it uses (if any) that controls the behavior or execution of PHP.
I don't mean to sound offensive, but if you are trying to execute PHP, and if you are running a web server, you really need to understand the very basics first. Simply setting up PHP on a server wide (global) level is not the safest thing to do, but it would be fine for learning purposes. Then once you have it running globally, you could lock it down to a vhost or directory that contains the vhosts.
There are numerous threads in this forum on setting up PHP, and there are two methods of searching. If you are still having difficulty, then I strongly suggest you take a couple of steps back and search the forums on how to set up PHP.
I hope that this helps you out. |
|
Back to top |
|
|
|
|
|
|