PHP is not working right. My html file asks for a name and then calls
the PHP will display a “Hello” message.
What is happening is on the htm page I am putting in my name and hit go
then the browser shows website/Drop2.php and I get 404 error saying
page not found.
It is like the htm page is not really getting to the PHP file.
- Software loaded and verified
- Win Server 2003
- IIS 6.0
- PHP 5.4
- VC9 x86
- WinCache 1.3
- Visual C++ Redistributable files for X86
PHP has been tested and works from command prompt
All FastCGI changes have been made per documentation
My configuration looks like this
- c:\Inetpub\wwwroot htm and php file
- c:\Inetpub\wwwroot\PHP PHP software
I have installed all the above software, set up the following:
- Extension .php c:\Intepub\wwwroot\PHP\ext\php5isapi.dll
- Added index.php to my doucments in IIS
- Added to php.ini both and extension_dir=c:\Inetpub\wwwroot\PHP\ext
- Added Web service Extension for PHP ISAPI
- Added to Path – c:\Inetpub\wwwroot\PHP
Here is htm code for Drop2.htm:
<html> <head> <Title>Form</Title> </head> <body> <h1>Enter your name</h1> <form method="post" action="C:\Inetpub\wwwroot\Drop2.php"> <input type="text" name="me"> <input type="submit"> </form> </body> </html> here is PHP code for Drop2.php: <html> <head> <title>Form</title> </head> <body> <?php echo "<h1>Hello " . $_POST["me"] . "</h1>"; ?> </body> </html>
If you want to run live on my server try.
www.sloventhal.com and click on 3 to execute this code
<form method="post" action="C:\Inetpub\wwwroot\Drop2.php">
C:\ is not a URL, it’s a path.
<form method="post" action="Drop2.php">
would be better, assuming the files are in the same folder.