Bug #16690 Updated: Java support in PHP with Apache2 multithreaded server doesn´t work

From: Date: Tue, 11 Jun 2002 20:53:01 +0000
Subject: Bug #16690 Updated: Java support in PHP with Apache2 multithreaded server doesn´t work
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-10159@lists.php.net to get a copy of this message
 ID:               16690
 Updated by:       robert@ud.com
 Reported By:      cunha17@uol.com.br
 Status:           Open
 Bug Type:         Apache2 related
 Operating System: Linux 2.4 glibc 2.2.3
 PHP Version:      4.2.0
 New Comment:

This exact problem appears for me too on similar and different setups.

I get JVM timeouts on both Apache2(worker MPM)/Linux and Windows/IIS.
The commonality is that they are both multi-threaded (same as
reported).

Working setups where JVM works one or a few times and then "dies".

- Linux RH7.2/Apache 2.0.36 (worker MPM)/PHP 4.2.1/Sun JDK 1.4.0_01
(the "bleeding edge")
- Windows 2000/IIS/PHP 4.2.1/Sun JDK 1.3.1


Previous Comments:
------------------------------------------------------------------------

[2002-04-18 19:56:10] cunha17@uol.com.br

To get things working, I compiled PHP with these options:
./configure --with-bz2 --enable-ftp \
--with-gd --with-ttf --enable-gd-native-ttf --with-jpeg-dir \
--with-freetype-dir \
--with-png-dir --with-zlib-dir \
--with-tiff-dir \
--with-java --with-ldap \
--with-mcrypt --with-mhash \
--with-pdflib --without-mysql \
--with-pgsql --with-snmp --enable-shared \
--enable-calendar --with-dom --with-openssl \
--with-iconv=/usr/local/lib/libiconv.so \
--with-apxs2 --enable-experimental-zts

and Apache2 with these:
./configure --enable-ssl \
            --enable-module=so \
            --enable-modules=all \
            --enable-mods-shared=all \
            --with-mpm=prefork

------------------------------------------------------------------------

[2002-04-18 19:37:09] cunha17@uol.com.br

I want Java support in PHP pages, and I had it with PHP 4.1, Apache 1.3
and J2SDK 1.3. 

When I tried to build PHP 4.2.0RC4 with J2SDK 1.4.0 and Apache 2.0.35
the first problems were some seg faults in PHP. I found out (using PHP
as CGI to get error messages) that I "MUST" compile PHP with
--enable-experimental-zts or otherwise it misses php_core_globals.

After some undocumented php.ini configurations(available throght
PHPBUILDER), I could finally get all three pieces working together, but
only once. If I call a page more than once, PHP reports that it can´t
create the Virtual Machine. I searched throght php.net and somebody
posted a response that PHP creates one VM per thread. So, if my Apache2
is multithreaded, PHP is creating many VM per processes, i thought. 

That´s it. When I compiled Apache2 with "prefork" (not multithreaded),
my Java-enabled PHP pages worked just fine.

I´m reporting this bug, since PHP must work with Apache2 "worker"
(multithreaded).


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=16690&edit=1



Thread (13 messages)

« previous php.bugs (#10159) next »