|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #20300 mail() and Java combination causes webserver freeze
Submitted: 2002-11-07 11:22 UTC Modified: 2003-07-18 18:48 UTC
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: mindas at ziedas dot ktu dot lt Assigned:
Status: No Feedback Package: Java related
PHP Version: 4.2.3-12 OS: Linux Debian/GNU testing
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: mindas at ziedas dot ktu dot lt
New email:
PHP Version: OS:


 [2002-11-07 11:22 UTC] mindas at ziedas dot ktu dot lt
i've encountered a strange bug that causes webserver (Apache  1.3.26-1 in particular) to halt. I'm using PHP/Java combination I've built myself on Debian GNU/Linux (testing, kernel version is 2.4.20-pre7).

The killing code is here:

  mail("", "111", "111");
  $system = new Java('java.lang.System');
  mail("", "222", "222");

The first mail is sent successfully, but not the second one.

The most amazing thing is, that eliminating a mail() or Java() call doesn't produce any problems. I mean, they work well separately. But when these calls are together (in my case - even on different PHP classes), it results a webserver lockup.

This has been tested on various PHP compilations starting from PHP 4.2.0 and up to the newest STABLE snapshot build.

The funniest thing is that this bug is ABSENT on my old PHP/Java build (4.1.2-1). Java version is the same on both cases:

mindas@kiras:~$ java -version
java version "1.3.1_02"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1_02-b02)
Java HotSpot(TM) Client VM (build 1.3.1_02-b02, mixed mode)

If you need any more details on this, just drop me a message via e-mail.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-03-21 04:01 UTC] mindas at ziedas dot ktu dot lt
Sorry guys, this time I was unable to build the PHP at all. 
Here's an excerpt: 
(lots of build output before) 
ext/mysql/libmysql/my_tempnam.o(.text+0x40): In function 
: the use of `tempnam' is dangerous, better use `mkstemp' 
make[1]: Leaving directory 
mv: cannot stat `php': No such file or directory 
make: *** [build-cgi-stamp] Error 1 
If there's any tricks of how to fix this, I'd like to know.
 [2003-07-10 21:36 UTC]
Please try using this CVS snapshot:
For Windows:

What was the configure line you used?

 [2003-07-18 18:48 UTC]
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.

PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Tue Nov 24 20:01:23 2020 UTC