www/pserv genereates bogus headers in the http-response if PHP with CLI SAPI is installed. In the included patch OPTIONS= was removed, because it is not possible to use it for the following reasons: 1. WITH_PHP must be tested AFTER including bsd.port.pre.mk 2. USE_PHP and WANT_PHP_CGI must be set BEFORE including bsd.port.pre.mk 3. USE_PHP and WANT_PHP_CGI must be set with ".if defined(WITH_PHP)" test You see - 3. conflicts with 1. & 2. The solution is to remove 1. condition and propmt the user to set WITH_PHP BEFORE we include bsd.port.pre.mk (as done in many ports). How-To-Repeat: % php -v PHP 4.3.11 (cli) (built: May 31 2005 09:34:26) Copyright (c) 1997-2004 The PHP Group Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies % echo -ne "GET /tmp/test.php HTTP/1.1\r\n\r\n" |socket localhost 8080 HTTP/1.0 200 OK Connection: close Date: Tue, 31 May 2005 09:38:30 EEST Server: pServ/3.3 phpinfo() PHP Version => 4.3.11 System => FreeBSD sinanica.bg.datamax 5.4-STABLE FreeBSD 5.4-STABLE #6: Tue May 10 12:46:25 EEST 2005 root@sinanica.bg.datamax:/usr/obj/usr/src/sys/SINANICA-SMP i386 ... You see, this is totally incorrect. It should be: % echo -ne "GET /tmp/test.php HTTP/1.1\r\n\r\n" |socket localhost 8080 HTTP/1.0 200 OK Connection: close Date: Tue, 31 May 2005 09:41:07 EEST Server: pServ/3.3 Content-type: text/html X-Powered-By: PHP/4.3.11 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd"> <html><head> ... % php -v PHP 4.3.11 (cgi) (built: May 31 2005 09:18:03) Copyright (c) 1997-2004 The PHP Group Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
Responsible Changed From-To: freebsd-ports-bugs->ale Over to maintainer.
ale 2007-07-02 12:49:20 UTC FreeBSD ports repository Modified files: www/pserv Makefile Log: Add php-cgi dependency. PR: ports/81699 Submitted by: vd Revision Changes Path 1.13 +5 -0 ports/www/pserv/Makefile _______________________________________________ cvs-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/cvs-all To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
State Changed From-To: open->closed Fixed.