|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2002-04-18 19:37 UTC] cunha17 at uol dot com dot 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). PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 14:00:01 2025 UTC |
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=preforkJust as I expected, everything now works normally and consistently the the ext/java extension using the "prefork" MPM with Apache2 and PHP 4.2.1. The various problems reported with the ext/java methods "timing out"/"not loading" after one or a few successful hits clearly appears to be with multithreaded web server installations and PHP (Apache2 with worker MPM, IIS, etc..) My latest, successful configure script: LDFLAGS='-lstdc++' \ ./configure \ --with-apxs2=/usr/local/apache2/bin/apxs \ --with-config-file-path=/usr/local/etc \ --with-tsrm-pthreads \ --enable-memory-limit \ --without-pear \ --disable-posix \ --enable-mbstring \ --enable-calendar \ --enable-wddx \ --enable-sockets \ --enable-ftp \ --with-zlib \ --with-bz2 \ --with-mhash \ --with-iconv \ --with-openssl \ --with-expat-dir \ --with-dom \ --with-dom-xslt \ --with-dom-exslt \ --enable-xslt \ --with-xslt-sablot \ --with-mysql=no \ --with-iodbc \ --with-ldap \ --with-imap \ --with-curl \ --with-png-dir \ --with-jpeg-dir \ --with-freetype-dir \ --with-gd \ --enable-gd-native-ttf \ --with-java=/usr/local/java/jdk1.2.2