How will i determine the existing intallation of PHP in Apache and as well as in IIS web server, whether PHP(or PHP interpreter) is use as CGI Binary or ISAPI Module? are there any settings to check? speakig of IIS, on a remote computer - using Windows Remote Desktop Connection, i have been trying to figure out whats the cause of this error reflected on the browser "File not found" though i am very sure that files "index.php" and "index.html" are located in "c:\inetpub\wwwroort\" folder. Only the html file works but not its php file counter part. Does IIS could not indentify a php file yet? Does "Application Mapping" has something to do with this? or what settings i need to change?
[RESOLVED] is it CGI Binary or ISAPI Module?
joboy wrote:How will i determine the existing intallation of PHP in Apache and as well as in IIS web server, whether PHP(or PHP interpreter) is use as CGI Binary or ISAPI Module? are there any settings to check?
See [man]php_sapi_name/man. (This can also be found by doing a [man]phpinfo/man and looking for the "Server API" value at the top.)
joboy wrote:Does IIS could not indentify a php file yet?
Could be. I would first double check the permissions on the .php file - make sure the IUSR_(ComputerName) account has read/execute access (you might even try giving it full access to the entire wwwroot directory at first to rule out a permissions issue). If that doesn't work, then it is very likely that PHP was not properly installed.
If you feel that IIS isn't configured correctly, let us know how you've attempted to install PHP and we can begin troubleshooting the problem. Before doing so, I would recommend re-reading the following manual pages to ensure that you've followed all of the steps: [man]install.windows.iis[/man], [man]install.windows.manual[/man]. I would also recommend installing PHP as an ISAPI module versus a CGI binary executable.
bradgrafelman wrote:See [man]php_sapi_name/man. (This can also be found by doing a [man]phpinfo/man and looking for the "Server API" value at the top.) Could be. I would first double check the permissions on the .php file - make sure the IUSR_(ComputerName).. If you feel that IIS isn't configured correctly, let us know how you've attempted to install PHP and we can begin troubleshooting the problem.
i think i could not still use function phpinfo() because any php files won't still run in windows through IIS.
my colleague already check all the "permission" stuff which include - ...\wwwroot.
prior to your reply, i made changes to IIS "setting" - With IIS 6 (2003 Server), open up the IIS Manager, go to Web Service Extensions, choose "Add a new Web service extension", enter in a name such as PHP, choose the Add button and for the value browse to either the ISAPI file (php4isapi.dll or php5isapi.dll) or CGI (php.exe or php-cgi.exe) then check "Set extension status to Allowed" and click OK. - these steps are found in "general consideration for intallations of PHP..(php.net)
then again i open/run index.php, but a prompt pops out stating "Windows cannot open this file file: index.php" and provide option to browse list of program..
PHP was already intalled in "c:\program files\php" before we are given the authority to access their intranet. and unfortunately their PHP folder didn't have php.ini so i madet it for them by renaming php.ini-recommended. open it and changed values on doc_root and extension_dir appropriately.
Few things I'll mention:
Can you move the PHP folder to say.. c:\php\ ? I know you said that it's already located in Program Files, but since it doesn't work, moving it wouldn't hurt any. Here's a quote from the manual:
You may choose a different location but do not have spaces in the path (like C:\Program Files\PHP) as some web servers will crash if you do.
Have you copied the files inside the "dlll" and "sapi" folders to the main PHP folder (C:\Program Files\php\ in your case) ?
Have you added the PHP folder to the PATH system environment variable as described here?
Expand the "Web Sites" folder, right-click on the site you are attempting to use PHP on, and choose properties. On the Home Directory tab, ensure that "Eexecute permissions" is set to "Scripts only". Then, click on the Configuration button to the right of that drop-down menu. Here, you'll want to add a mapping for .php to the ISAPI module php4isapi.dll .
(NOTE: This wouldn't prevent PHP from running, but you might run into this later.) Have you added the 'PHPRC" system environment variable to ensure that PHP can find your php.ini file as described here?
(NOTE: This wouldn't prevent PHP from running, but if you ever plan on doing HTTP authentication via PHP, you'll need to do this. If, however, you do not plan to ever use HTTP authentication via PHP, you can & should skip this step.) Expand the "Web Sites" folder, right-click on the site you are attempting to use PHP on, and choose properties. On the ISAPI filters tab, click Add. Give the filter a logical name - PHP, for example. Then, browse for the php4isapi.dll (assuming you're installing PHP 4) which should be in the directory you've added to the system PATH environment variable earlier.
yup that's the "last defense"" to move PHP file to "c:\PHP\" but prior to that, i need to tally my list with your list.
i guessed all files inside DLL and SAPI folders were brought to the root "c:\program files\php". just to mention, the version of their PhP is 5.1.6. based on the zip file they have.
recently i added c:\program..\php\ to environment variable but still have not made the remote pc(server) to reboot.
mapping? i tried it, but subsequently reverse the changes because i was think that that procedure is done only on IIS 4...and for IIS 6 all i have to do is deal only on web service extension. by the way the "Web Sites" i use is "Default Website"
phprc - the one i am currently working on...
temporarily, i plan not to do HTTP authentication as of the moment.
gothca! i got good news! everything on that remote PC is doing fine on PHP, index.php file now runs on IIS. thanks buddy, i did follow all your suggestions except on transferring the folder "php" to the root directory "c:\", but sooner i will implement it. i just want to experience myself on any error arising from the path "c:\programs files\php\". "to the php enthusiast, mabuhay tayong lahat!"