php-cgi ( 5.1.6 ) compile options?

Forest Bond forest at alittletooquiet.net
Sat Feb 10 12:26:26 UTC 2007


On Fri, Feb 09, 2007 at 03:54:12PM -0800, Jeff Griffiths wrote:
> I'm currently working on a problem where the php-cgi interpreter in Edgy 
> causes problems for our products' debugger by not setting 
> SCRIPT_FILENAME, resulting in this error from PHP:
> 
> "
> Status: 404
> X-Powered-By: PHP/5.1.6
> Content-type: text/html
> 
> No input file specified.
> "

Well, I looked at that file myself, and found this:

--------------------------------------------------------------------------------
+       # Dirty hack to not rebuild everything twice
+       cd cgi-build/main && \
+               sed -i -e 's/FORCE_CGI_REDIRECT 1/FORCE_CGI_REDIRECT 0/' \
+                      -e 's/DISCARD_PATH 0/DISCARD_PATH 1/' php_config.h && \
+               sed -i -e 's/--enable-force-cgi-redirect/--enable-discard-path/'
+               touch ../../ext/standard/info.c && \
+               touch ../../sapi/cgi/cgi_main.c
+
+       cd cgi-build && $(MAKE) && mv sapi/cgi/php sapi/cgi/usr.bin.php5-cgi
--------------------------------------------------------------------------------

This little snippet tries to avoid re-running configure and make on the full
tree by performing manual substitutions on the files created when building the
cli binaries and rebuilding selected targets.  Perhaps if there are no missing
Makefile deps that would work, but it doesn't sound like a good idea to me.
It's not really worth saving the build time, anyway.

In other words, this looks like a bug to me (although I am far from
authoritative on the subject).  You can file a bug at:

http://bugs.launchpad.net/ubuntu/+source/php5/+bugs

-Forest
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/ubuntu-devel-discuss/attachments/20070210/5be6b575/attachment.pgp>


More information about the Ubuntu-devel-discuss mailing list