note 14614 added to language.variables.external.php

From: Date: Mon, 06 Aug 2001 12:52:54 +0000
Subject: note 14614 added to language.variables.external.php
Groups: php.notes 
Request: Send a blank email to php-notes+get-16378@lists.php.net to get a copy of this message
I was disapointed when i figured out, that cgi command line php scripts on win32 environment do not want to access command line arguments (such as resolve.phpcgi www.php.net). There was no www.php.net in $argv array, only the script file name. I didn't find any mention of this problem on the web (list archives etc.) so here's the solution: When installing php on win32 it creates a registry record at My Computer\HKEY_CLASSES_ROOT\Applications\ named php.exe the problem is that the value of My Computer\HKEY_CLASSES_ROOT\Applications\php.exe\shell\open\command\ is default 'C:\php\php.exe "%1"' it means it only passes to php.exe the first argument = the name of the file and it do NOT pass any other arguments. The thing that helps (maybe can be in a newer version of win32 php) is to set the value to 'C:\php\php.exe -q "%1" %2 %3 %4 %5 %6 %7 %8 %9' NB: the first argument has to be in "'s you can suppress the -q argument if you insist on having the info displayed. http://www.php.net/manual/en/language.variables.external.php

« previous php.notes (#16378) next »