php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #21833 IIS 5.0 requires additional parameters on Add Mappings Tab
Submitted: 2003-01-22 22:07 UTC Modified: 2005-04-26 18:00 UTC
Votes:2
Avg. Score:3.0 ± 2.0
Reproduced:1 of 2 (50.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: dvorobyov at sympatico dot ca Assigned:
Status: Closed Package: Documentation problem
PHP Version: 4.3.0 OS: Windows 2000 Server
Private report: No CVE-ID: None
 [2003-01-22 22:07 UTC] dvorobyov at sympatico dot ca
<?php phpinfo(); ?>

This line produced the "No input file" output
after I configured PHP on IIS 5.0 by following
each step of installation instructions (I decided
to configure PHP to work as a CGI script, not SAPI )

After several
tries I understood what the problem is. I have an
experience in Perl programming under Linux and Windows
and I remembered that Active Perl 5.6 installation
script adds not only the script name in Add/Edit Application Extension Mapping dialog but also adds
%s %s to the end.

Quote from the ActiveState Perl installation docs:

"To run Perl as a CGI application, type the full path to Perl.exe followed by %s %s. When a script is executed, the first %s will be replaced by the full path to the script, and the second %s will be replaced by the script parameters."

This applies only to CGI mode. For ISAPI mode there is no need in these additional %s %s at the end.

So I suggest that installation guide may be
corrected like this:

--- text ---

 Windows NT/2000/XP and IIS 4 or newer and PWS 4 on NT Workstation or W2K non server editions

--- text ---

   If you want to use the CGI binary, do the following:
   Under 'Home Directory', 'Virtual Directory', or
   'Directory', click on the 'Configuration' button,
   and then enter the App Mappings tab.

   Click Add, and in the Executable box, type:
   c:\php\php.exe %s %s (assuming that you have unzipped PHP in c:\php\).

--- text ---

And thats it!

Here is also a URL to ActiveState website where I found the explanation for this %s spells :-)))

Well, this is it. Everything else is working fine!

Denys Vorobyov

Patches

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-01-22 22:15 UTC] dvorobyov at sympatico dot ca
Sorry, I forgot to include URL:

http://aspn.activestate.com//ASPN/Reference/Products/ActivePerl/faq/Windows/ActivePerl-Winfaq6.html

Link: How do I configure Microsoft IIS 4.0/IIS 5.0 to support Perl
 [2003-01-22 22:34 UTC] philip@php.net
Is this modification specific to (required for) IIS 5 and not IIS 4?  Even so, does adding it still allow IIS 4 to work with PHP CGI?  

This %s %s information appears in the user comments as well but needs to be put in the manual :)
 [2003-01-22 22:38 UTC] pollita@php.net
I have *NOT* experienced this requirement with PHP installed as a CGI on my Win2K/IIS5.0 installation. (I just have "c:\php\php.exe" entered in my IIS5.0 setup).

Some research needs to be done to determine when and why it is necessary.
 [2003-01-23 09:47 UTC] dvorobyov at sympatico dot ca
Thank you for responding to my report!

Well, first of all, I must say that I am PHP beginner with
good Perl/CGI programming experience. I downloaded PHP 4.3.0 for Win32 (not MSI install, just files for manual installation), unpacked it and configured everything as it was described in the install.txt. Then I create a small index.php and place there <?php phpinfo(); ?> to test the installation. It didn't work (No input file). So I tried this trick - it worked. That is how it was. This morning I tried again to remove these %s and again I received an error. Put them back - everything is OK. It can be easily tested - just create another website in Internet Service Manager, configure default application with .php mapping but without %s and place index.php as a default document.
That is exactly how I did it.

I think this problem also relates to IIS 4.0 and higher.
 [2003-01-23 13:30 UTC] cg at gordimer dot net
%s %s had to be added in the application extension panel before PHP 4, but afterwards it has always worked without. The comment about %s even had been in the manual if I remember correctly.

I think this is not a general problem, if it was, there were tons of bug reports on this - here it works on IIS 4, 5 and 5.1.

Christoph
 [2003-12-08 15:42 UTC] unknown at simplemachines dot org
May I request that, if anything is changed, it is done using "%s" %s NOT %s %s?

The reason for this (and this holds true for Perl too!) is that if you have a script named, for example, C:\Somewhere With A Space\www\test.php, just using %s will fail. (C:\Somewhere not found.)

However, I have found that at least IIS 5, IIS 5.1, and IIS 6 all handle it properly without such arguments.

-[Unknown]
 [2005-03-29 11:35 UTC] philip@php.net
The use of %s used to be in the docs but was removed by Goba roughly three years ago.

http://cvs.php.net/diff.php/phpdoc/en/chapters/Attic/install.xml?sa=1&r1=1.82&r2=1.83

By the sounds of it, the use of %s sounds optional but I wonder under which (if any) conditions it's required. This bug report may be open for a long time... :)
 [2005-04-26 18:00 UTC] vrana@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.

Maybe %s %s is optional under some circumstances but it works with it under all circumstances so I added it to the docs.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Aug 15 13:01:28 2024 UTC