sed script masks php compile options

Bug #87168 reported by Jeff Griffiths
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
php5 (Ubuntu)
Won't Fix
Low
Unassigned

Bug Description

Binary package hint: php5

as discussed on ubuntu-devel:

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

Revision history for this message
Soren Hansen (soren) wrote :

1. php5 is one of the packages that takes the longest to build. It currently takes an entire hour. If we were to rebuild everything when doing the cgi build it would take two hours. As a developer working on the package, waiting an entire hour for the entire build to finish is more than enough.
2. Your problem seems to stem from the DISCARD_PATH setting. From configure's output:
  --enable-discard-path CGI: If this is enabled, the PHP CGI binary
                            can safely be placed outside of the
                            web tree and people will not be able
                            to circumvent .htaccess security

...so it sounds like we definitely want DISCARD_PATH to be set to 1.

Could you be a tad more specific about what your actual problem is? I mean, rather than telling us how you think we should fix it, show us precisely what doesn't work.

Changed in php5:
assignee: nobody → shawarma
importance: Undecided → Low
status: New → Incomplete
Revision history for this message
River Tarnell (river-wikimedia) wrote :

I believe I'm running into this issue as well. When PHP is compiled with --enable-discard-path, it does not work as a FastCGI responder under Sun Java System Web Server (aka iPlanet). A hand compiled PHP without this option works fine. I would prefer not to compile my own PHP, so I would be nice if a PHP binary were available without this option.

Revision history for this message
River Tarnell (river-wikimedia) wrote :

... when i say "does not work", I mean I get the same error as the OP: "No input file specified."

Revision history for this message
Soren Hansen (soren) wrote :

I'd like to know the following exactly what you are trying to do (i.e. how I can reproduce this).

I don't see how the trick used to avoid building twice is to blame for anything here. Please enlighten me :)

Changed in php5 (Ubuntu):
assignee: Soren Hansen (soren) → nobody
Revision history for this message
Chuck Short (zulcss) wrote :

No response from user.

Regards
chuck

Changed in php5 (Ubuntu):
status: Incomplete → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.