note 14614 deleted from language.variables.external by irc-html

From: Date: Sat, 19 Jan 2002 19:04:02 +0000
Subject: note 14614 deleted from language.variables.external by irc-html
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-25224@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.

« previous php.notes (#25224) next »