Date: Tue, 26 Oct 2004 23:01:42 +0700 (NOVST) From: Dmitry A Grigorovich <odip@bionet.nsc.ru> To: FreeBSD-gnats-submit@FreeBSD.org Cc: ale@FreeBSD.org Subject: ports/73167: [PATCH] php4 4.2.9 openssl building static needed Message-ID: <200410261601.i9QG1gSw072652@pierino.bionet.nsc.ru> Resent-Message-ID: <200410261610.i9QGATO2068847@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 73167 >Category: ports >Synopsis: [PATCH] php4 4.2.9 openssl building static needed >Confidential: no >Severity: serious >Priority: high >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Tue Oct 26 16:10:29 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Dmitry A Grigorovich >Release: FreeBSD 4.8-RELEASE i386 >Organization: ICiG SB RAS >Environment: System: FreeBSD pierino.bionet.nsc.ru 4.8-RELEASE FreeBSD 4.8-RELEASE #5: Sat Oct 4 02:28:14 NOVST 2003 root@pierino.bionet.nsc.ru:/usr/obj/usr/src/sys/ODIP i386 >Description: php4 extension openssl when building shared does not work as necessary 1) http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/71754 2) http://bugs.php.net/bug.php?id=29934 This can't be fixed because PHP4 BUG ! Same bug in php 4.3.8 and now in php 4.3.9 >How-To-Repeat: File test.php <?php $fp = fsockopen( "ssl://example.com", 443, $errno, $errstr, $timeout = 30); if (!$fp) { echo "$errstr ($errno)<br />\n"; } else { $out = "GET / HTTP/1.1\r\n"; $out .= "Host: example.com\r\n"; $out .= "Connection: Close\r\n\r\n"; fwrite($fp, $out); while (!feof($fp)) { echo fgets($fp, 4096); } fclose($fp); } ?> Place test.php on web Show test.php via browser You are get error 0 ! Remove 'ssl://' and change 443 into 80 - all is ok >Fix: To fix problem: 1) Remove ports php4-extensions, php4-<EXTNAME>, mod_php4 2) Patch ports with follow patches 3) Install mod_php4, php4-extensions Don't try install php4-openssl direcly - it's not needed ! Even if some port using php4-openssl, all is ok --- patch-Mk begins here --- --- Mk/bsd.php.mk.orig Thu Sep 2 17:08:48 2004 +++ Mk/bsd.php.mk Thu Oct 7 19:13:38 2004 @@ -259,6 +259,12 @@ sockets sqlite sybase_ct sysvmsg sysvsem sysvshm \ tidy tokenizer wddx xml xmlrpc xsl xslt yaz yp zip zlib +.if ${PHP_VER} == 4 +_USE_PHP_DUMMY= openssl +.else +_USE_PHP_DUMMY= +.endif + bcmath_DEPENDS= math/php${PHP_VER}-bcmath bz2_DEPENDS= archivers/php${PHP_VER}-bz2 calendar_DEPENDS= misc/php${PHP_VER}-calendar @@ -333,12 +339,14 @@ . for extension in ${USE_PHP} . if ${_USE_PHP_ALL:M${extension}} != "" && exists(${PORTSDIR}/${${extension}_DEPENDS}) -. if defined(USE_PHP_BUILD) +. if ${_USE_PHP_DUMMY:M${extension}} == "" +. if defined(USE_PHP_BUILD) BUILD_DEPENDS+= ${LOCALBASE}/lib/php/${PHP_EXT_DIR}/${extension}.so:${PORTSDIR}/${${extension}_DEPENDS} -. endif +. endif RUN_DEPENDS+= ${LOCALBASE}/lib/php/${PHP_EXT_DIR}/${extension}.so:${PORTSDIR}/${${extension}_DEPENDS} +. endif . else -isyes= ${extension} +isyes= ${extension} . if ${isyes:L} != "yes" check-makevars:: @${ECHO_CMD} "Unknown extension ${extension}." --- patch-Mk ends here --- --- patch-php-port begins here --- --- php4/Makefile.orig Tue Oct 26 22:10:49 2004 +++ php4/Makefile Tue Oct 26 22:11:42 2004 @@ -33,6 +33,13 @@ --with-config-file-scan-dir=${PREFIX}/etc/php \ --disable-all +# Need to compile openssl statically +.if !defined(WITHOUT_OPENSSL) +CONFIGURE_ARGS+=--with-openssl=${OPENSSLBASE} \ + --with-openssl-dir=${OPENSSLBASE} +USE_OPENSSL= yes +.endif + .if !defined(WITH_REGEX_TYPE) || ${WITH_REGEX_TYPE} == "php" CONFIGURE_ARGS+=--with-regex=php .else --- php4/Makefile.ext.orig Tue Oct 26 22:11:03 2004 +++ php4/Makefile.ext Tue Oct 26 22:12:02 2004 @@ -227,6 +227,7 @@ .endif .if ${PHP_MODNAME} == "openssl" +BROKEN= "Does not work with php4" CONFIGURE_ARGS+=--with-openssl=${OPENSSLBASE} \ --with-openssl-dir=${OPENSSLBASE} --- patch-php-port ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200410261601.i9QG1gSw072652>