Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:10075 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 40457 invoked by uid 1010); 25 May 2004 06:39:56 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 40247 invoked from network); 25 May 2004 06:39:54 -0000 Received: from unknown (HELO mail.tachometry.com) (66.234.213.3) by pb1.pair.com with SMTP; 25 May 2004 06:39:54 -0000 Received: from twevans ([192.168.100.1]) (authenticated bits=0) by mail.tachometry.com (8.12.8/8.12.8) with ESMTP id i4P6llBv017214 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO); Mon, 24 May 2004 23:47:50 -0700 To: Cc: Date: Mon, 24 May 2004 23:39:44 -0700 Organization: Tachometry Message-ID: <002701c44223$12520430$230aa8c0@twevans> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.6626 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 Importance: Normal Subject: [PATCH] Servlet SAPI Bug Fixes (PHP 4.3 branch) From: tevans@tachometry.com ("Tom Evans") Greetings PHP project, I have created a patch for the Servlet SAPI package to improve the stability of the JVM runtime environment when making calls from Java to PHP. This patch is for the 4.3.x branch. Many bugs have been reported regarding various issues with this experimental module (ref. #17020 as an example). I believe this patch will correct several of the bugs that have been reported on the Servlet SAPI module. Please review and advise if you have any questions or concerns. It would be great to see these changes make it into an upcoming 4.3.x bugfix release. Here is a link to the patch: http://www.tachometry.com/support/patches/php_4.3/sapi_servlet_patch.txt I have also included a brief description of the fix and the steps we used to successfully deploy and test the modified Servlet SAPI module. We are using this build to integrate PHP with JSP/Struts inside the Tomcat container (4.1.29) for one of our current development projects, with good results. Regards, Tom Evans Tachometry ________________________________ Open Source that means business. http://www.tachometry.com/ - - - - - - - - [from http://www.tachometry.com/support/patches/php_4.3/sapi_servlet_notes.txt] Build Notes ----------- This folder contains patched sources required to build The Servlet SAPI module for PHP 4.3.6. The changes are to correct several instability problems when the PHP engine is embedded within a JVM container. Note that the Servlet SAPI module is EXPERIMENTAL and is subject to name changes and other significant refactoring. It has been moved to the pecl/servlet/ directory as of PHP 5.0. The patch adds a SAPI callback to register a subset of server variables (e.g. PHP_SELF, REQUEST_URI, etc.) that are readily available in the current module. In addition, the exception handling has been improved to return a proper 404 response to the servlet container if a PHP resource is not found. Finally, a line of code was removed that was causing the SAPI module to shutdown prematurely under certain conditions. This patch was built from PHP sources (branch PHP_4_3) on May 24, 2004 by Tom Evans of Tachometry Corporation. Released under the terms of the PHP License, version 3.0 (http://www.php.net/license/3_0.txt). Source files: ------------- sapi/servlet/servlet.c sapi/servlet/servlet.java Binaries (Linux): ----------------- libs/libphp4.so (copied to $JAVA_HOME/jre/lib/i386/ directory) libs/phpsrvlt.jar (copied to $TOMCAT_HOME/common/lib/ directory) Build arguments: ---------------- export CFLAGS=-g3 export CLASSPATH=$TOMCAT_HOME/common/lib/servlet.jar ./configure --with-java --with-servlet --enable-debug make make test ===================================================================== TEST RESULT SUMMARY --------------------------------------------------------------------- Exts skipped : 78 Exts tested : 9 --------------------------------------------------------------------- Number of tests : 592 Tests skipped : 269 (45.4%) Tests warned : 0 ( 0.0%) Tests failed : 0 ( 0.0%) Tests passed : 323 (54.6%) --------------------------------------------------------------------- Time taken : 207 seconds =====================================================================