Ticket #3515 (closed enhancement: fixed)

Opened 3 years ago

Last modified 3 years ago

Improving the FastCGI stub for standalone usage

Reported by: spillgroup Owned by: weyrick
Priority: immediate Milestone:
Component: FastCGI Version: trunk
Severity: feature Keywords:
Cc:

Description

When trying to use a statically compiled FastCGI application standalone (using the -e switch) in conjunction with Lighttpd, I faced several problems. The attached patch tries to solve those. I have not extensively tested this, so your mileage may vary!

Troubles:

1. Some servers provide path info through the PATH_INFO var, others through SCRIPT_NAME. This was already being taken into consideration for the PHP_SELF variable, but not for the script execution path. Lazy fix by reusing PHP_SELF for the script execution path.

2. A chdir was being done to "web-doc-root" appended by the contents of the "PATH_INFO" var. This made no sense to me. I think it should simply do a chdir to "web-doc-root".

3. Lighttpd passes its current document root through the "DOCUMENT_ROOT" environment variable. Let the stub pick it up and use it when it has nothing better.

Furthermore I placed some quotes around the url in the 404 handler. This makes debugging easier when dealing with either empty or complex url's easier.

Attachments

roadsend-php-2.9.2-fastcgi.patch (1.7 KB) - added by spillgroup 3 years ago.
Several FastCGI improvements

Change History

Changed 3 years ago by spillgroup

Several FastCGI improvements

Changed 3 years ago by weyrick

  • owner changed from anonymous to weyrick
  • status changed from new to assigned

Changed 3 years ago by weyrick

  • priority changed from low to immediate

Changed 3 years ago by weyrick

  • status changed from assigned to closed
  • resolution set to fixed

patch applied in r324. thanks!

Note: See TracTickets for help on using tickets.