Doc #80044 [NEW]: Script in documentation fails

From: Date: Tue, 01 Sep 2020 14:33:59 +0000
Subject: Doc #80044 [NEW]: Script in documentation fails
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-17853@lists.php.net to get a copy of this message
From: agroot at eastlink dot ca Operating system: Windows 7 PHP version: 7.2.33 Package: Windows Installer Bug Type: Documentation Problem Bug description:Script in documentation fails Description: ------------ Ref: https://www.php.net/manual/en/install.windows.manual.php Script fails as written. The cause is: set phpdir=c:\php set phppath=php-5.6.19-nts-Win32-VC11-x86 used as: '%phpdir%\%phppath%\php-cgi.exe' in several lines when phppath is empty, i.e. set 'phppath='. The test script below corrects this, and has some added remarks. Test script: --------------- @echo off echo **************************************************** echo * * echo * IIS Configurator * echo * * echo * Adds elements to IIS configuration enabling PHP. * echo * * echo **************************************************** REM download .ZIP file of PHP build from http://windows.php.net/downloads/ REM decompress the .zip file to your chosen location, and set phppath below REM to the location of php-cgi.exe in your decompressed download. REM path to directory you decompressed PHP .ZIP file into (no trailing \) set phppath=c:\php REM Check for broken lines if you copied this into a batch file from the REM documentation. Sections below have the number of lines annotated. REM Clear current PHP handlers (3 lines) %windir%\system32\inetsrv\appcmd clear config /section:system.webServer/fastCGI REM The next line will generate "ERROR (message:Cannot find requested collection element.)" if PHP is not installed. This can be ignored. %windir%\system32\inetsrv\appcmd set config /section:system.webServer/handlers /-[name='PHP_via_FastCGI'] REM Set up the PHP handler (3 lines) %windir%\system32\inetsrv\appcmd set config /section:system.webServer/fastCGI /+[fullPath='%phppath%\php-cgi.exe'] %windir%\system32\inetsrv\appcmd set config /section:system.webServer/handlers /+[name='PHP_via_FastCGI',path='*.php',verb='*',modules='FastCgiModule',scriptProcessor='%phppath%\php- cgi.exe',resourceType='Unspecified'] %windir%\system32\inetsrv\appcmd set config /section:system.webServer/handlers /accessPolicy:Read,Script REM Configure FastCGI Variables (3 lines) %windir%\system32\inetsrv\appcmd set config -section:system.webServer/fastCgi /[fullPath='%phppath%\php-cgi.exe'].instanceMaxRequests:10000 %windir%\system32\inetsrv\appcmd.exe set config -section:system.webServer/fastCgi /+"[fullPath='%phppath%\php-cgi.exe'].environmentVariables.[name='PHP_FCGI_MAX_REQUESTS',value='10000']" %windir%\system32\inetsrv\appcmd.exe set config -section:system.webServer/fastCgi /+"[fullPath='%phppath%\php-cgi.exe'].environmentVariables.[name='PHPRC',value='%phppath%\php.ini']" @echo on -- Edit bug report at https://bugs.php.net/bug.php?id=80044&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=80044&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=80044&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=80044&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=80044&r=needscript Try newer version: https://bugs.php.net/fix.php?id=80044&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=80044&r=support Expected behavior: https://bugs.php.net/fix.php?id=80044&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=80044&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=80044&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=80044&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=80044&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=80044&r=dst IIS Stability: https://bugs.php.net/fix.php?id=80044&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=80044&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=80044&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=80044&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=80044&r=mysqlcfg

« previous php.doc.bugs (#17853) next »