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.
Environment:
Software loaded and verified
Win Server 2003
IIS 6.0
PHP 5.4
VC9 x86
FastCGI
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:
1. Extension .php c:\Intepub\wwwroot\PHP\ext\php5isapi.dll
2. Added index.php to my doucments in IIS
3. Added to php.ini both and extension_dir=c:\Inetpub\wwwroot\PHP\ext
and extension=php_wincache.dll
4. Added Web service Extension for PHP ISAPI
5. 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
Your action path is wrong - C:\Inetpub\wwwroot\Drop2.php. You should use
http://localhost/Drop2.php. or you could use some IP address, or domain name (if you set such).
Regards
WindowsHostingASP.NET - My favourite site for Windows and IIS hosting information.
HowtoASP.NET - Free ASP.NET tutorials and source code.
Okay I changed to Localhost in the htm file. but still get 404 error. I tried putting in the ip of the server but no different. My server runs on the DMZ of my firewall. the IP that I mentioned
www.sloventhal.com is translated at go daddy to loventhal.homeip.net. Could any of that be my problem?
2 Posts
Need Help with IIS/PHP problem
Jul 07, 2015 07:19 PM|SLovey|LINK
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.
Environment:
Software loaded and verified
Win Server 2003
IIS 6.0
PHP 5.4
VC9 x86
FastCGI
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:
1. Extension .php c:\Intepub\wwwroot\PHP\ext\php5isapi.dll
2. Added index.php to my doucments in IIS
3. Added to php.ini both and extension_dir=c:\Inetpub\wwwroot\PHP\ext
and extension=php_wincache.dll
4. Added Web service Extension for PHP ISAPI
5. 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
909 Posts
Re: Need Help with IIS/PHP problem
Jul 08, 2015 01:25 AM|HostingASPNet|LINK
Hello,
Your action path is wrong - C:\Inetpub\wwwroot\Drop2.php. You should use http://localhost/Drop2.php. or you could use some IP address, or domain name (if you set such).
Regards
HowtoASP.NET - Free ASP.NET tutorials and source code.
2 Posts
Re: Need Help with IIS/PHP problem
Jul 08, 2015 05:29 PM|SLovey|LINK
Okay I changed to Localhost in the htm file. but still get 404 error. I tried putting in the ip of the server but no different. My server runs on the DMZ of my firewall. the IP that I mentioned www.sloventhal.com is translated at go daddy to loventhal.homeip.net. Could any of that be my problem?