php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #18869 include and include_once fail under load in iPlanet/NSAPI
Submitted: 2002-08-12 12:27 UTC Modified: 2002-08-14 20:31 UTC
From: fillmore at NRCan dot gc dot ca Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 4.2.2 OS: Solaris 8
Private report: No CVE-ID: None
 [2002-08-12 12:27 UTC] fillmore at NRCan dot gc dot ca
A site was developed with scripts that use "include" and "include_once",
and it worked fine until the client load increased.  The symptoms include
various parser errors that seem to indicate that code from an include file
was truncated or corrupted.  The errors are reproduceable using a web
load generator.   Assuming that the problem may be caused by code that
is not thread-safe, I configured iPlanet web server to limit the number
of threads for PHP to 1 - this fixed the problem.  However, PHP should
really be thread-safe when running in an iPlanet 4.1/NSAPI environment.

Here are the obj.conf changes to fix the problem:

Init fn="thread-pool-init" name="php-thread-pool" 
     MinThreads="1" MaxThreads="1" QueueSize="300"
Init fn="load-modules"funcs="php4_init,php4_close,php4_execute,php4_auth_trans"
     shlib="/suitespot/bin/libphp4.so" pool="php-thread-pool"

Here is the config call:
CC=gcc ./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/ph
p/etc --with-nsapi=/suitespot --enable-libgcc --enable-dbase --with-xml

Thanks,
   Bob Fillmore

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-08-12 12:32 UTC] rasmus@php.net
PHP should be threadsafe, but chances are some of the 3rd party libs you have linked in are not.  It is the same problem the threaded version of Apache2 has.  A lot of UNIX libraries are simply not threadsafe and we don't have a good handle on which ones are and which ones aren't.

Having said that, the NSAPI code has not had extensive testing, so there could very well be a bug lurking.  Try Apache instead.
 [2002-08-13 08:53 UTC] fillmore at NRCan dot gc dot ca
A colleague pointed out this bug entry to me:
  http://bugs.php.net/bug.php?id=16037
We recoded our scripts to use the string variable
substitution syntax suggested by that bug report,
and reran our load tests without disabling multithreading,
and it now works!  I think that this proves that there
is something wrong in the PHP script engine.
    - Bob
 [2002-08-13 08:55 UTC] kalowsky@php.net
Marking as duplicate of Bug #16037
 [2002-08-14 20:31 UTC] zeev@php.net
This bug has been fixed in CVS.

 In case this was a PHP problem, snapshots of the sources are packaged
 every three hours; this change will be in the next snapshot. You can grab
 the snapshot at http://snaps.php.net/.
 
 In case this was a documentation problem, the fix will show up soon at
 http://www.php.net/manual/.

 In case this was a PHP.net website problem, the change will show
 up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed May 07 09:01:27 2025 UTC