Received: (qmail 58403 invoked by uid 501); 30 May 2000 18:05:48 -0000 Message-Id: <20000530180548.58400.qmail@locus.apache.org> Date: 30 May 2000 18:05:48 -0000 From: Marcello Perathoner Reply-To: marcello@perathoner.de To: submit@bugz.apache.org Subject: Apache doesn't set PATH_INFO and PATH_TRANSLATED when calling a CGI-script X-Send-Pr-Version: 3.110 >Number: 6130 >Category: mod_cgi >Synopsis: Apache doesn't set PATH_INFO and PATH_TRANSLATED when calling a CGI-script >Confidential: no >Severity: critical >Priority: medium >Responsible: apache >State: closed >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: apache >Arrival-Date: Tue May 30 11:10:01 PDT 2000 >Closed-Date: Sun Jul 16 21:06:21 PDT 2000 >Last-Modified: Sun Jul 16 21:06:21 PDT 2000 >Originator: marcello@perathoner.de >Release: 1.3.12 >Organization: >Environment: Win NT 4.0 Workstation SP 3 Multiprocessor Kernel Precompiled Apache Version 1.3.12 (Win32) PHP/4.0.0 Perl v5.6.0 MSWin32-x86-multi-thread >Description: Apache calls a CGI-scripts without setting the PATH_INFO and PATH_TRANSLATED environment variables. I don't know if these are *required* by the CGI Specs but notably PHP 4.0.0 dies without them. I already have tried the suggestion in PR number 5077. Nothing changes. Here are the relevant parts of my httpd.conf. ScriptAlias /php/ "C:/Prj/mind-FACTory/Homepage/php/" ScriptAlias /perl/ "C:/Prj/mind-FACTory/Homepage/php/" ScriptInterpreterSource registry AllowOverride None Options None AddHandler cgi-script .php AddHandler cgi-script .pl >How-To-Repeat: Install this perl-script as CGI. It prints all environment variables. PATH_INFO and PATH_TRANSLATED are not there. #!C:/perl/bin/perl print "Content-Type: text/html\n\n"; print "\n"; foreach $key (sort keys %ENV) { print qq|\n|; } print "
$key :  $ENV{$key}
\n"; >Fix: No >Release-Note: >Audit-Trail: State-Changed-From-To: open-closed State-Changed-By: wrowe State-Changed-When: Sun Jul 16 21:06:21 PDT 2000 State-Changed-Why: If there is not additional path info, then the envrionment variables are not created. You are describing a bug in PHP that assumes they exist, instead of testing for their presence. Release-Changed-From-To: 1.3.12 (Win32)-1.3.12 Release-Changed-By: wrowe Release-Changed-When: Sun Jul 16 21:06:21 PDT 2000 Category-Changed-From-To: os-windows-mod_cgi Category-Changed-By: wrowe Category-Changed-When: Sun Jul 16 21:06:21 PDT 2000 >Unformatted: [In order for any reply to be added to the PR database, you need] [to include in the Cc line and make sure the] [subject line starts with the report component and number, with ] [or without any 'Re:' prefixes (such as "general/1098:" or ] ["Re: general/1098:"). If the subject doesn't match this ] [pattern, your message will be misfiled and ignored. The ] ["apbugs" address is not added to the Cc line of messages from ] [the database automatically because of the potential for mail ] [loops. If you do not include this Cc, your reply may be ig- ] [nored unless you are responding to an explicit request from a ] [developer. Reply only with text; DO NOT SEND ATTACHMENTS! ]