php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #581 PHP_SELF set incorrectly when using FORCE_CGI_REDIRECT
Submitted: 1998-07-26 01:32 UTC Modified: 1998-08-27 00:22 UTC
From: david at uws dot edu dot au Assigned:
Status: Closed Package: Other
PHP Version: 3.0.2a OS: Solaris 2.5.1
Private report: No CVE-ID: None
 [1998-07-26 01:32 UTC] david at uws dot edu dot au
First reported for 3.0-FINAL but still exists in 3.0.2a;
if compiling PHP for CGI use with FORCE_CGI_REDIRECT, the
PHP_SELF variable becomes set to the URL/location of the
PHP binary instead of the script - when used in an anchor
tag (A/HREF), this creates URLs that cannot be selected (as
PHP complains that it was called directly).

PHP_SELF should be set to the script being run (URI), not
the PHP binary in FORCE_CGI_REDIRECT cases.

The hack/fix for 3.0-FINAL was to wrap the current code (in
main.c) within:

#if FORCE_CGI_REDIRECT
  /* original code, modified to only append path_info
     and not script_name */
#else
  /* original code goes here */
#endif

Could this please be wrapped into the CVS so that it's included in 3.0.3??

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1998-08-27 00:22 UTC] rasmus
Fixed - will be in 3.0.4
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 16 17:01:30 2024 UTC