Page 1 of 1
How to parse .php to .html
Posted: Wed Jun 08, 2005 11:37 am
by HS0018
I've done research on how to parse php code into html and found it by creating .htaccess with the following code:
Action php-script /interpreters/php-script
AddHandler php-script .php .php4 .php3 .html .htm
Therefore, I created (copy and paste the .htaccess) .htaccess at the wwwroot directory but still not working.
Does anyone has suggestion? Thank you
Posted: Thu Jun 09, 2005 7:55 am
by anjanesh
wwwroot ? IIS ?
.htaccess is Apache specific.
Posted: Thu Jun 09, 2005 11:50 am
by HS0018
I don't have apache installed on our Windows NT. Is there a way for me to parse php to html? I'm desperately stuck opening the .php file with password prompt. I can get in just fine internally with
http://hostname/file.php just fine.
But if I go to
http://www.hostname.com/file.php, I get password prompt & 401.3 ACL error. I set IUSR_machine name to read php.ini,wwwroot,c:/php directory. The funny thing is that I get CGI error if I give IUSR an execute permission for php-cgi.exe. Windows NT is way too strict!
I'm trying to work around it by parsing the php code to html, but still couldn't get it to work. If you can help me, I greatly appreciated. Desperate for solution here.

Posted: Thu Jun 09, 2005 12:07 pm
by Burrito
check your permissions on the web folder itself. If you can hit it internally, it might be using your NT domain account to access the files.
just make sure the IUSR has read permissions on the folder.
also make sure that anonymous access is checked in the directory security in IIS.
Posted: Thu Jun 09, 2005 12:30 pm
by HS0018
Thank you again Burrito for your valuable input. FYI, I got the php dynamic content to work using the php variable. I got this idea from your input. Thank you for that
PHP folder:
IUSR_machine (RX) (R) 1. Directory 2. File access
IWAM_machine (RX) (RX)
Administrator (ALL)
IP_Browsers (RX) (RX)
System Full Control (All)
PHP-CGI.EXE
IUSR_machine (R) 1. Directory 2. File access
IWAM_machine (RX)
Administrator (ALL)
IP_Browsers (RX)
System Full Control (All)
PHP.INI
IUSR_machine (RX)
Administrator (ALL)
Everyone (RX)
IP_Browsers (RX) (RX)
System Full Control (All)
I checked the directory setting and the anynomous checkbox is checked. Still not working.
Nonetheless, thank you so much for your input
Posted: Thu Jun 09, 2005 12:34 pm
by Burrito
the web folder is what I was suggesting you need to check permissions on:
ie wwwroot and/or it's subdirectories
Posted: Thu Jun 09, 2005 12:51 pm
by HS0018
C:\inetPub\wwwroot where the php files reside
Admin (All)
Authors (all)
browser (RX) (R)
Administrator (all)
IUSR_machinename (RX) (R)
IWAM_machinename (RX) (R)
System (all)
other pages such as the html, htm can open just fine. Only .php that would not work. Thank you
Posted: Thu Jun 09, 2005 12:56 pm
by Burrito
weird...can't say I've ever experienced that.
you might try changing from cgi to isapi (assuming your using cgi currently).
isapi is much better (faster) anyway.
Posted: Thu Jun 09, 2005 12:59 pm
by HS0018
I will try to do that with manual installation. thanks
Posted: Thu Jun 09, 2005 2:19 pm
by HS0018
One thing that I noticed was that it doesn't give me a CGI error when I give IUSR execute permission for the php folder. Other than that, it still prompt for a password.
Posted: Fri Jun 10, 2005 4:50 am
by Pyrite
What he is saying is to give the IUSR_<yourmachine> user read/exe permissions on all your php files. This is the annonymous internet user account for NT (just like the user nobody on Linux). And you definitely want to run IIS with ISAPI, unless you are using NT 4.0.
Posted: Fri Jun 10, 2005 9:11 am
by HS0018
Thank you for your input, Pyrite.
All the php files is under the wwwroot directory and inherit all the permission from this parent directory. I did verified the .php files as well and IUSR_<machine> had the read permission.
Thanks.
Posted: Fri Jun 10, 2005 11:03 am
by HS0018
OK guys, I think it is more than just permission problem. It could be IIS and SSL issue here. We do have SSL certification in place.
The reason that I think that it could be the problem is that I can't even open .asp, .cfm, or .shtml without getting username and password prompt.
If you have any suggestion, I would greatly appreciate it