I am sponsoring this case for Sriram Natarajan. Enables the NSAPI functionality in PHP. Timeout set to 12/15/2009.
Template Version: @(#)sac_nextcase 1.68 02/23/09 SMI This information is Copyright 2009 Sun Microsystems 1. Introduction 1.1. Project/Component Working Name: Include NSAPI support in PHP 1.2. Name of Document Author/Supplier: Author: Sriram Natarajan 1.3 Date of This Document: 07 December, 2009 4. Technical Description Include NSAPI support in PHP 3 December 2009 1. Summary and motivation 1.1. Introduction The PHP distribution contains support for building an NSAPI plugin form of PHP. NSAPI is the API used for plugins by Sun's Web Server product. Until now the NSAPI support of PHP has remained disabled in OpenSolaris. This project enables compiling this functionality. Specifically this project will deliver following new features: a) Compile and integrate PHP with Zend Thread Safety(ZTS) enabled along with current PHP integration. PHP with ZTS enabled introduces considerable overhead and will be advantageous only within multi-threaded web servers like Apache worker MPM and Sun Web Server. b) Compile PHP with bundled NSAPI extension module to deliver 32-bit PHP NSAPI plugin. This provides necessary glue to load PHP within Web Server 7. c) Deliver 'memsession' PECL extension for PHP NSAPI plugin module. This case seeks Minor Release Binding. 1.2 Previous Relevant ARC cases PSARC/2007/641 - Enabling built-in extensions. PSARC/2007/552 - Upgrading PHP 5.2.4 PSARC/2007/470 - Upgrading PHP 5.2.3 PSARC/2007/168 - Integrating PHP 5.2.0 LSARC/2008/538 - Integrating PHP 5.2.6 LSARC/2009/124 - PHP5 Feature Enhancements LSARC/2009/564 - Updated PHP to deliver addnl features 2. Technical issues 2.1. Key objects /etc/php/5.2/nsapi/php.ini /etc/php/5.2/zts-conf.d/<php bundled config> /usr/php/5.2/bin/configure-webserver7 /usr/php/5.2/zts-modules/<php bundled extensions> /usr/php/5.2/nsapi/libphp5.so 2.2 Support for Sun Web Server 7 Enterprise customers have repeatedly requested for PHP support within Sun Web Server. This project aims to support PHP within Web Server both as NSAPI module (in-process) and FastCGI (out of process) in OpenSolaris. To deliver PHP NSAPI support for Sun Web Server, PHP and its extensions will need to be compiled with Zend Thread safety enabled option and integrated in addition to currently integrated PHP(non ZTS) runtime. PHP with ZTS enabled introduces considerable overhead and will be advantageous only within multi-threaded web servers like Apache worker MPM and Sun Web Server. Hence, the need to deliver PHP with ZTS enabled in addition to currently integrated PHP runtime. This project will deliver its runtime and configuration files within SUNWphp52u, SUNWphp52r, SUNWphp52u-nsapi and SUNWphp52r-nsapi packages. This project will deliver a) PHP extensions with 'Zend Thread safety' compile flag enabled b) PHP configuration ini files to enable / disable PHP extensions c) 32-bit PHP NSAPI library for Sun Web Server 7 d) 'configure-webserver7' (support script) to configure Web Server 7 with the integrated PHP NSAPI library. Users will need to manually run this support script to load PHP NSAPI library within Web Server 7 configuration. 'configure-webserver7' script was earlier delivered under 'samples' directory to allow some one to try out Web Server 7 with PHP under FastCGI mode. This project will now deliver it under 'bin' directory to support PHP configuration (both FastCGI as well as NSAPI) within Sun Web Server 7. For backward compatibility, a symlink to this script will be retained under the 'samples' directory. This script can be invoked by providing the following arguments to configure PHP runtime with Sun Web Server 7. /usr/php/5.2/bin/configure-webserver7.sh \ --installroot=<Web Server 7 instance location> \ --instancename=<Web Server 7 instance name> --sapi=<nsapi|fastcgi> Script 'configure-webserver7'.sh will provide the following command line input options: --instanceroot Web Server 7 instance top location --instancename Web Server 7 instance name --sapi Web Server 7 SAPI mode (nsapi or fastcgi) This Script will exit with one of these exit codes: 0 SUCCESS 1 FAILURE 2.3 PECL "memsession" extension This extension can store PHP sessions in-memory. This feature is ideal when PHP is loaded within multi-threaded web server like Sun Web Server 7. This extension is critical to deliver better performance with PHP and Sun Web Server 7. This extension is currently available as open source under PECL repository and development will continue to happen there. This project will compile and deliver this project within /usr/php/5.2/zts-modules to allow PHP compiled with Zend Thread safety(ZTS) enabled to load this extension. This extension will be integrated as part of SUNWphp52u-memsession package. 2.4 Directory Naming and Structure Following new directories will be created to add support for PHP and Sun Web Server 7 /etc/php/5.2/nsapi/ -> to deliver PHP configuration when when PHP is running within Web Server 7. /etc/php/5.2/zts-conf.d/ -> to deliver configuration ini files for PHP extensions compiled with ZTS enabled. /usr/php/5.2/nsapi/ -> to deliver PHP glue module to load PHP engine within Sun Web Server 7. /usr/php/5.2/zts-modules/ -> to deliver extensions for php compiled with Zend Thread Safety enabled. NOTE: 'zts' stands for Zend Thread safety. 2.5 Configuration File /etc/php/5.2/nsapi/php.ini -> PHP configuration for Web Server 7 /etc/php/5.2/zts-conf.d/*.ini -> PHP extension configuration ini for Zend Thread safety enabled PHP. 2.6 Packaging and Delivery PHP ZTS enabled runtime and configuration files will delivered within SUNWphp52u and SUNWphp52r respectively. Similarly, ZTS enabled PHP extension for MySQL and PostgreSQL will be delivered within SUNWphp52u-mysql and SUNWphp52u-pgsql packages respectively. PHP NSAPI glue module and its associated configuration to load PHP engine within Sun Web Server 7 will be delivered as part of SUNWphp52u-nsapi and SUNWphp52r-nsapi respectively. PHP Memsession extension for PHP ZTS enabled PHP runtime will be delivered within SUNWphp52u-memsession package. Note that package naming is all Volatile due to OpenSolaris package renaming which occurs outside the control of the project team post-integration. 3. Interfaces 3.1 Interface Stability. PHP, as an Open Source project, is controlled by a group of developers external of, and independent from, SMI. The PHP Group makes no guarantees or promises of ABI or API compatibility between PHP releases. 3.2 Imported Interfaces. NAME STABILITY NOTES ------------------------------------------------------------------------- /usr/mysql/5.1/lib/libmysqlclient.so Committed LSARC/2009/062 /usr/postgres/8.3/libpgsql.so Uncommitted LSARC/2008/004 3.3 Exported Interfaces. 3.3.1 Directory / Files NAME STABILITY NOTES ------------------------------------------------------------------------- /etc/php/5.2/nsapi/php.ini Uncommitted /etc/php/5.2/zts-conf.d/*.ini Uncommitted /usr/php/5.2/bin/configure-webserver7 Uncommitted configure-webserver7.sh command line args Uncommitted Script Arguments configure-webserver7.sh exit codes Uncommitted Script return value 3.3.3 Packages NAME STABILITY NOTES ------------------------------------------------------------------------ SUNWphp52u-nsapi Volatile May become SUNWphp52-nsapi SUNWphp52r-nsapi Volatile May become SUNWphp52-nsapi SUNWphp52u-memsession Volatile May become SUNWphp52-memsession SUNWphp52r-memsession Volatile May become SUNWphp52-memsession 4. References 1. PSARC/2007/641 - Enabling built-in extensions http://arc.opensolaris.org/caselog/PSARC/2007/641/ 2. PSARC/2007/552 - Upgrading PHP 5.2.4 http://arc.opensolaris.org/caselog/PSARC/2007/552/ 3. PSARC/2007/470 - Upgrading PHP 5.2.3 http://arc.opensolaris.org/caselog/PSARC/2007/470/ 4. PSARC/2007/168 - Integrating PHP 5.2.0 http://arc.opensolaris.org/caselog/PSARC/2007/168/ 5. LSARC/2008/538 - Integrating PHP 5.2.6 http://arc.opensolaris.org/caselog/LSARC/2008/538/ 6. LSARC/2009/124 - PHP5 Feature Enhancements http://arc.opensolaris.org/caselog/LSARC/2009/124/ 7. LSARC/2009/564 - Updated PHP to deliver addnl features http://arc.opensolaris.org/caselog/LSARC/2009/564/ 8. LSARC/2009/062 - MySQL 5.1 within OpenSolaris http://arc.opensolaris.org/caselog/LSARC/2009/062/ 9. LSARC/2008/616 - PostgreSQL within OpenSolaris http://arc.opensolaris.org/caselog/LSARC/2008/616/ 6. Resources and Schedule 6.4. Steering Committee requested information 6.4.1. Consolidation C-team Name: sfw 6.5. ARC review type: FastTrack 6.6. ARC Exposure: open