#18600 [Com]: Unable to create Java Virtual Machine
ID: 18600 Comment by: robert at nospam dot com Reported By: nalves at equifax dot com dot br Status: Bogus Bug Type: Java related Operating System: Windows 2000 PHP Version: 4.3.3 and 5.0.0-dev New Comment: Jdk 1.4.2_02 XP Pro - All patches IIS 5.1 (ISAPI) - Same prob as described ..works once outta x tries Apache 2.0.47 (mod_php) - No probs, works fine Have following extensions enabled: --- php_gd2 php_java php_ldap php_mssql php_xslt Previous Comments: [2003-08-15 21:36:44] [EMAIL PROTECTED] Please do not submit the same bug more than once. An existing bug report already describes this very problem. Even if you feel that your issue is somewhat different, the resolution is likely to be the same. Because of this, we hope you add your comments to the existing bug instead. Thank you for your interest in PHP. See bug #16690 [2003-06-22 19:18:20] benj at puremourning dot co dot uk hi all, i just installed all the latest versions (php 4.3.2) and various forms of the j2sdk (principally j2sdk 1.4.1_03) and i get the same problem. Set up is Apache/1.3.27 (Win32) PHP/4.3.2 (on windows xp) php_java and php_gd2 are the only extensions installed. Whenever i run a page with a call to new Java() the first refresh works, but after roughly 30 seconds i must restart apache to get it to work. has there been any updates on this? I am only experimenting with this extension, but it would be a fantastic help if it worked reliably. my java section of php.ini [Java] java.class.path = H:\php\php-4.3.2-Win32\extensions\php_java.jar java.home = C:\j2sdk1.4.1_03 java.library = C:\j2sdk1.4.1_03\jre\bin\server\jvm.dll java.library.path = H:\php\php-4.3.2-Win32\extensions\ i noticed somthing noone had looked into; i checked the mem usage of apache.exe as i continually refreshed the (java) page, it climbed steadily until it reached somthing like 15000K and then i got the error, and with more refreshes the mem usage remained constant. however after a while (as i ytped this) the mem usage climbed (with no activity) by another 2000K where it is now static. i don't know if that is useful, but it seems to me that its loaded a few too many JVMs and not closed them. kind regards ben jackson [2003-06-09 14:31:20] jlondon at mcg dot edu Getting the same bug. Running Win2k Server, IIS 5, php4.2.3, jsdk1.4.1. I read a while back that running as a CGI would eliminate the error so I tried that but the performance hit was too much to bear since I only used java on one page. Did a little more searching and came up with a little work around. Still not perfect but takes much longer to crash. $descriptorspec = array( 0 = array(pipe, r), // stdin is a pipe that the child will read from 1 = array(pipe, w), // stdout is a pipe that the child will write to 2 = array(file, /temp/error-output.txt, a), // stderr is a file to write to ); $process = proc_open(c:\\php\\cli\\php.exe, $descriptorspec, $pipes); if (is_resource($process)) { // $pipes now looks like this: // 0 = writeable handle connected to child stdin // 1 = readable handle connected to child stdout // Any error output will be appended to /tmp/error-output.txt $size = fwrite($pipes[0], ? \$Login = new Java('CheckLogin'); echo \$Login-CheckLogin(' . $username . ', ' . $password . '); ?); if(!fclose($pipes[0])) echo There was an error closing the pipe; $result = fgets($pipes[1], $size + 1); fclose($pipes[1]); // It is important that you close any pipes before calling // proc_close in order to avoid a deadlock $return_value = proc_close($process); } Basically what I do is create a process and send it the lines of code I would use to create and manipulate the java classes. The process gives me the output and I close the process. It works pretty well and will extend the restart interval from everytime the script runs to every couple of days. For those out there chasing this bug, my method fails on the $return_value = proc_close($process); line. Once it fails it will not work again until IIS is restarted. Until IIS is restarted the process fails on $result = fgets($pipes[1], $size + 1); line. Hope you get this one fixed. This could be a really powerful plugin. -Jake [2003-06-04 21:37:36] jason at ipedo dot com I meet this problem too. Why should it recreate JVM? Since it's module, I think it need only create JVM once. In linux environment, althoug i don't meet the error, the preformence is bad when system recreate JVM. How can i disable recreating the JVM or decrease the
#18600 [Com]: Unable to create Java Virtual Machine
ID: 18600 Comment by: robert at nospam dot com Reported By: nalves at equifax dot com dot br Status: Bogus Bug Type: Java related Operating System: Windows 2000 PHP Version: 4.3.3 and 5.0.0-dev New Comment: ..ah yes, This is under PHP 4.3.4RC2 Previous Comments: [2003-10-29 09:16:41] robert at nospam dot com Jdk 1.4.2_02 XP Pro - All patches IIS 5.1 (ISAPI) - Same prob as described ..works once outta x tries Apache 2.0.47 (mod_php) - No probs, works fine Have following extensions enabled: --- php_gd2 php_java php_ldap php_mssql php_xslt [2003-08-15 21:36:44] [EMAIL PROTECTED] Please do not submit the same bug more than once. An existing bug report already describes this very problem. Even if you feel that your issue is somewhat different, the resolution is likely to be the same. Because of this, we hope you add your comments to the existing bug instead. Thank you for your interest in PHP. See bug #16690 [2003-06-22 19:18:20] benj at puremourning dot co dot uk hi all, i just installed all the latest versions (php 4.3.2) and various forms of the j2sdk (principally j2sdk 1.4.1_03) and i get the same problem. Set up is Apache/1.3.27 (Win32) PHP/4.3.2 (on windows xp) php_java and php_gd2 are the only extensions installed. Whenever i run a page with a call to new Java() the first refresh works, but after roughly 30 seconds i must restart apache to get it to work. has there been any updates on this? I am only experimenting with this extension, but it would be a fantastic help if it worked reliably. my java section of php.ini [Java] java.class.path = H:\php\php-4.3.2-Win32\extensions\php_java.jar java.home = C:\j2sdk1.4.1_03 java.library = C:\j2sdk1.4.1_03\jre\bin\server\jvm.dll java.library.path = H:\php\php-4.3.2-Win32\extensions\ i noticed somthing noone had looked into; i checked the mem usage of apache.exe as i continually refreshed the (java) page, it climbed steadily until it reached somthing like 15000K and then i got the error, and with more refreshes the mem usage remained constant. however after a while (as i ytped this) the mem usage climbed (with no activity) by another 2000K where it is now static. i don't know if that is useful, but it seems to me that its loaded a few too many JVMs and not closed them. kind regards ben jackson [2003-06-09 14:31:20] jlondon at mcg dot edu Getting the same bug. Running Win2k Server, IIS 5, php4.2.3, jsdk1.4.1. I read a while back that running as a CGI would eliminate the error so I tried that but the performance hit was too much to bear since I only used java on one page. Did a little more searching and came up with a little work around. Still not perfect but takes much longer to crash. $descriptorspec = array( 0 = array(pipe, r), // stdin is a pipe that the child will read from 1 = array(pipe, w), // stdout is a pipe that the child will write to 2 = array(file, /temp/error-output.txt, a), // stderr is a file to write to ); $process = proc_open(c:\\php\\cli\\php.exe, $descriptorspec, $pipes); if (is_resource($process)) { // $pipes now looks like this: // 0 = writeable handle connected to child stdin // 1 = readable handle connected to child stdout // Any error output will be appended to /tmp/error-output.txt $size = fwrite($pipes[0], ? \$Login = new Java('CheckLogin'); echo \$Login-CheckLogin(' . $username . ', ' . $password . '); ?); if(!fclose($pipes[0])) echo There was an error closing the pipe; $result = fgets($pipes[1], $size + 1); fclose($pipes[1]); // It is important that you close any pipes before calling // proc_close in order to avoid a deadlock $return_value = proc_close($process); } Basically what I do is create a process and send it the lines of code I would use to create and manipulate the java classes. The process gives me the output and I close the process. It works pretty well and will extend the restart interval from everytime the script runs to every couple of days. For those out there chasing this bug, my method fails on the $return_value = proc_close($process); line. Once it fails it will not work again until IIS is restarted. Until IIS is restarted the process fails on $result = fgets($pipes[1], $size + 1); line. Hope you get this one fixed. This could be a really powerful plugin. -Jake [2003-06-04 21:37:36] jason at ipedo dot com I meet this problem too. Why should it recreate JVM? Since it's module, I think it need only create JVM
#18600 [Com]: Unable to create Java Virtual Machine
ID: 18600 Comment by: rburke at dot gouv dot qc dot ca Reported By: nalves at equifax dot com dot br Status: Open Bug Type: Java related Operating System: Windows 2000 PHP Version: 4.3.3 and 5.0.0-dev New Comment: I do have the save problem, Unable to Create Java Virtual Machine after about 30 sec. Is there any solution ?? Previous Comments: [2003-07-20 06:07:27] tan_ai_leen9 at hotmail dot com Has this bug solved? What's the solutions? [2003-06-22 19:18:20] benj at puremourning dot co dot uk hi all, i just installed all the latest versions (php 4.3.2) and various forms of the j2sdk (principally j2sdk 1.4.1_03) and i get the same problem. Set up is Apache/1.3.27 (Win32) PHP/4.3.2 (on windows xp) php_java and php_gd2 are the only extensions installed. Whenever i run a page with a call to new Java() the first refresh works, but after roughly 30 seconds i must restart apache to get it to work. has there been any updates on this? I am only experimenting with this extension, but it would be a fantastic help if it worked reliably. my java section of php.ini [Java] java.class.path = H:\php\php-4.3.2-Win32\extensions\php_java.jar java.home = C:\j2sdk1.4.1_03 java.library = C:\j2sdk1.4.1_03\jre\bin\server\jvm.dll java.library.path = H:\php\php-4.3.2-Win32\extensions\ i noticed somthing noone had looked into; i checked the mem usage of apache.exe as i continually refreshed the (java) page, it climbed steadily until it reached somthing like 15000K and then i got the error, and with more refreshes the mem usage remained constant. however after a while (as i ytped this) the mem usage climbed (with no activity) by another 2000K where it is now static. i don't know if that is useful, but it seems to me that its loaded a few too many JVMs and not closed them. kind regards ben jackson [2003-06-19 17:19:18] dev2682 at hotmail dot com Hi! all, I tried Java - PHP extension with just simple java class which is doing millon calculations. I haven't got any problem. And I was thinking to use this extension for my new web project but, after reading all these bugs I am not sure. So, please let me know how stable this is?? I am using, OS=Windows XP 5.1 on x86 , IIS 5, PHP 4.3.2 and java version 1.4.1_02 Dev [2003-06-09 14:31:20] jlondon at mcg dot edu Getting the same bug. Running Win2k Server, IIS 5, php4.2.3, jsdk1.4.1. I read a while back that running as a CGI would eliminate the error so I tried that but the performance hit was too much to bear since I only used java on one page. Did a little more searching and came up with a little work around. Still not perfect but takes much longer to crash. $descriptorspec = array( 0 = array(pipe, r), // stdin is a pipe that the child will read from 1 = array(pipe, w), // stdout is a pipe that the child will write to 2 = array(file, /temp/error-output.txt, a), // stderr is a file to write to ); $process = proc_open(c:\\php\\cli\\php.exe, $descriptorspec, $pipes); if (is_resource($process)) { // $pipes now looks like this: // 0 = writeable handle connected to child stdin // 1 = readable handle connected to child stdout // Any error output will be appended to /tmp/error-output.txt $size = fwrite($pipes[0], ? \$Login = new Java('CheckLogin'); echo \$Login-CheckLogin(' . $username . ', ' . $password . '); ?); if(!fclose($pipes[0])) echo There was an error closing the pipe; $result = fgets($pipes[1], $size + 1); fclose($pipes[1]); // It is important that you close any pipes before calling // proc_close in order to avoid a deadlock $return_value = proc_close($process); } Basically what I do is create a process and send it the lines of code I would use to create and manipulate the java classes. The process gives me the output and I close the process. It works pretty well and will extend the restart interval from everytime the script runs to every couple of days. For those out there chasing this bug, my method fails on the $return_value = proc_close($process); line. Once it fails it will not work again until IIS is restarted. Until IIS is restarted the process fails on $result = fgets($pipes[1], $size + 1); line. Hope you get this one fixed. This could be a really powerful plugin. -Jake [2003-06-04 21:37:36] jason at ipedo dot com I meet this problem too. Why should it recreate JVM? Since it's module, I think it need only create JVM once. In linux environment, althoug i don't meet the error, the preformence is bad
#18600 [Com]: Unable to create Java Virtual Machine
ID: 18600 Comment by: tan_ai_leen9 at hotmail dot com Reported By: nalves at equifax dot com dot br Status: Open Bug Type: Java related Operating System: Windows 2000 PHP Version: 4.3.3 and 5.0.0-dev New Comment: Has this bug solved? What's the solutions? Previous Comments: [2003-06-22 19:18:20] benj at puremourning dot co dot uk hi all, i just installed all the latest versions (php 4.3.2) and various forms of the j2sdk (principally j2sdk 1.4.1_03) and i get the same problem. Set up is Apache/1.3.27 (Win32) PHP/4.3.2 (on windows xp) php_java and php_gd2 are the only extensions installed. Whenever i run a page with a call to new Java() the first refresh works, but after roughly 30 seconds i must restart apache to get it to work. has there been any updates on this? I am only experimenting with this extension, but it would be a fantastic help if it worked reliably. my java section of php.ini [Java] java.class.path = H:\php\php-4.3.2-Win32\extensions\php_java.jar java.home = C:\j2sdk1.4.1_03 java.library = C:\j2sdk1.4.1_03\jre\bin\server\jvm.dll java.library.path = H:\php\php-4.3.2-Win32\extensions\ i noticed somthing noone had looked into; i checked the mem usage of apache.exe as i continually refreshed the (java) page, it climbed steadily until it reached somthing like 15000K and then i got the error, and with more refreshes the mem usage remained constant. however after a while (as i ytped this) the mem usage climbed (with no activity) by another 2000K where it is now static. i don't know if that is useful, but it seems to me that its loaded a few too many JVMs and not closed them. kind regards ben jackson [2003-06-19 17:19:18] dev2682 at hotmail dot com Hi! all, I tried Java - PHP extension with just simple java class which is doing millon calculations. I haven't got any problem. And I was thinking to use this extension for my new web project but, after reading all these bugs I am not sure. So, please let me know how stable this is?? I am using, OS=Windows XP 5.1 on x86 , IIS 5, PHP 4.3.2 and java version 1.4.1_02 Dev [2003-06-09 14:31:20] jlondon at mcg dot edu Getting the same bug. Running Win2k Server, IIS 5, php4.2.3, jsdk1.4.1. I read a while back that running as a CGI would eliminate the error so I tried that but the performance hit was too much to bear since I only used java on one page. Did a little more searching and came up with a little work around. Still not perfect but takes much longer to crash. $descriptorspec = array( 0 = array(pipe, r), // stdin is a pipe that the child will read from 1 = array(pipe, w), // stdout is a pipe that the child will write to 2 = array(file, /temp/error-output.txt, a), // stderr is a file to write to ); $process = proc_open(c:\\php\\cli\\php.exe, $descriptorspec, $pipes); if (is_resource($process)) { // $pipes now looks like this: // 0 = writeable handle connected to child stdin // 1 = readable handle connected to child stdout // Any error output will be appended to /tmp/error-output.txt $size = fwrite($pipes[0], ? \$Login = new Java('CheckLogin'); echo \$Login-CheckLogin(' . $username . ', ' . $password . '); ?); if(!fclose($pipes[0])) echo There was an error closing the pipe; $result = fgets($pipes[1], $size + 1); fclose($pipes[1]); // It is important that you close any pipes before calling // proc_close in order to avoid a deadlock $return_value = proc_close($process); } Basically what I do is create a process and send it the lines of code I would use to create and manipulate the java classes. The process gives me the output and I close the process. It works pretty well and will extend the restart interval from everytime the script runs to every couple of days. For those out there chasing this bug, my method fails on the $return_value = proc_close($process); line. Once it fails it will not work again until IIS is restarted. Until IIS is restarted the process fails on $result = fgets($pipes[1], $size + 1); line. Hope you get this one fixed. This could be a really powerful plugin. -Jake [2003-06-04 21:37:36] jason at ipedo dot com I meet this problem too. Why should it recreate JVM? Since it's module, I think it need only create JVM once. In linux environment, althoug i don't meet the error, the preformence is bad when system recreate JVM. How can i disable recreating the JVM or decrease the frequence of creating JVM? [2003-05-27 17:36:44] dave at unicon dot net Has anything been
#18600 [Com]: Unable to create Java Virtual Machine
ID: 18600 Comment by: benj at puremourning dot co dot uk Reported By: nalves at equifax dot com dot br Status: Open Bug Type: Java related Operating System: Windows 2000 PHP Version: 4.2.3 New Comment: hi all, i just installed all the latest versions (php 4.3.2) and various forms of the j2sdk (principally j2sdk 1.4.1_03) and i get the same problem. Set up is Apache/1.3.27 (Win32) PHP/4.3.2 (on windows xp) php_java and php_gd2 are the only extensions installed. Whenever i run a page with a call to new Java() the first refresh works, but after roughly 30 seconds i must restart apache to get it to work. has there been any updates on this? I am only experimenting with this extension, but it would be a fantastic help if it worked reliably. my java section of php.ini [Java] java.class.path = H:\php\php-4.3.2-Win32\extensions\php_java.jar java.home = C:\j2sdk1.4.1_03 java.library = C:\j2sdk1.4.1_03\jre\bin\server\jvm.dll java.library.path = H:\php\php-4.3.2-Win32\extensions\ i noticed somthing noone had looked into; i checked the mem usage of apache.exe as i continually refreshed the (java) page, it climbed steadily until it reached somthing like 15000K and then i got the error, and with more refreshes the mem usage remained constant. however after a while (as i ytped this) the mem usage climbed (with no activity) by another 2000K where it is now static. i don't know if that is useful, but it seems to me that its loaded a few too many JVMs and not closed them. kind regards ben jackson Previous Comments: [2003-06-19 17:19:18] dev2682 at hotmail dot com Hi! all, I tried Java - PHP extension with just simple java class which is doing millon calculations. I haven't got any problem. And I was thinking to use this extension for my new web project but, after reading all these bugs I am not sure. So, please let me know how stable this is?? I am using, OS=Windows XP 5.1 on x86 , IIS 5, PHP 4.3.2 and java version 1.4.1_02 Dev [2003-06-09 14:31:20] jlondon at mcg dot edu Getting the same bug. Running Win2k Server, IIS 5, php4.2.3, jsdk1.4.1. I read a while back that running as a CGI would eliminate the error so I tried that but the performance hit was too much to bear since I only used java on one page. Did a little more searching and came up with a little work around. Still not perfect but takes much longer to crash. $descriptorspec = array( 0 = array(pipe, r), // stdin is a pipe that the child will read from 1 = array(pipe, w), // stdout is a pipe that the child will write to 2 = array(file, /temp/error-output.txt, a), // stderr is a file to write to ); $process = proc_open(c:\\php\\cli\\php.exe, $descriptorspec, $pipes); if (is_resource($process)) { // $pipes now looks like this: // 0 = writeable handle connected to child stdin // 1 = readable handle connected to child stdout // Any error output will be appended to /tmp/error-output.txt $size = fwrite($pipes[0], ? \$Login = new Java('CheckLogin'); echo \$Login-CheckLogin(' . $username . ', ' . $password . '); ?); if(!fclose($pipes[0])) echo There was an error closing the pipe; $result = fgets($pipes[1], $size + 1); fclose($pipes[1]); // It is important that you close any pipes before calling // proc_close in order to avoid a deadlock $return_value = proc_close($process); } Basically what I do is create a process and send it the lines of code I would use to create and manipulate the java classes. The process gives me the output and I close the process. It works pretty well and will extend the restart interval from everytime the script runs to every couple of days. For those out there chasing this bug, my method fails on the $return_value = proc_close($process); line. Once it fails it will not work again until IIS is restarted. Until IIS is restarted the process fails on $result = fgets($pipes[1], $size + 1); line. Hope you get this one fixed. This could be a really powerful plugin. -Jake [2003-06-04 21:37:36] jason at ipedo dot com I meet this problem too. Why should it recreate JVM? Since it's module, I think it need only create JVM once. In linux environment, althoug i don't meet the error, the preformence is bad when system recreate JVM. How can i disable recreating the JVM or decrease the frequence of creating JVM? [2003-05-27 17:36:44] dave at unicon dot net Has anything been resolved for this usiong the non-cgi approach? I have found something I did not see in other comments. It seems that I get the fatal error after a set amount of seconds. Maybe due to some
#18600 [Com]: Unable to create Java Virtual Machine
ID: 18600 Comment by: dev2682 at hotmail dot com Reported By: nalves at equifax dot com dot br Status: Open Bug Type: Java related Operating System: Windows 2000 PHP Version: 4.2.3 New Comment: Hi! all, I tried Java - PHP extension with just simple java class which is doing millon calculations. I haven't got any problem. And I was thinking to use this extension for my new web project but, after reading all these bugs I am not sure. So, please let me know how stable this is?? I am using, OS=Windows XP 5.1 on x86 , IIS 5, PHP 4.3.2 and java version 1.4.1_02 Dev Previous Comments: [2003-06-09 14:31:20] jlondon at mcg dot edu Getting the same bug. Running Win2k Server, IIS 5, php4.2.3, jsdk1.4.1. I read a while back that running as a CGI would eliminate the error so I tried that but the performance hit was too much to bear since I only used java on one page. Did a little more searching and came up with a little work around. Still not perfect but takes much longer to crash. $descriptorspec = array( 0 = array(pipe, r), // stdin is a pipe that the child will read from 1 = array(pipe, w), // stdout is a pipe that the child will write to 2 = array(file, /temp/error-output.txt, a), // stderr is a file to write to ); $process = proc_open(c:\\php\\cli\\php.exe, $descriptorspec, $pipes); if (is_resource($process)) { // $pipes now looks like this: // 0 = writeable handle connected to child stdin // 1 = readable handle connected to child stdout // Any error output will be appended to /tmp/error-output.txt $size = fwrite($pipes[0], ? \$Login = new Java('CheckLogin'); echo \$Login-CheckLogin(' . $username . ', ' . $password . '); ?); if(!fclose($pipes[0])) echo There was an error closing the pipe; $result = fgets($pipes[1], $size + 1); fclose($pipes[1]); // It is important that you close any pipes before calling // proc_close in order to avoid a deadlock $return_value = proc_close($process); } Basically what I do is create a process and send it the lines of code I would use to create and manipulate the java classes. The process gives me the output and I close the process. It works pretty well and will extend the restart interval from everytime the script runs to every couple of days. For those out there chasing this bug, my method fails on the $return_value = proc_close($process); line. Once it fails it will not work again until IIS is restarted. Until IIS is restarted the process fails on $result = fgets($pipes[1], $size + 1); line. Hope you get this one fixed. This could be a really powerful plugin. -Jake [2003-06-04 21:37:36] jason at ipedo dot com I meet this problem too. Why should it recreate JVM? Since it's module, I think it need only create JVM once. In linux environment, althoug i don't meet the error, the preformence is bad when system recreate JVM. How can i disable recreating the JVM or decrease the frequence of creating JVM? [2003-05-27 17:36:44] dave at unicon dot net Has anything been resolved for this usiong the non-cgi approach? I have found something I did not see in other comments. It seems that I get the fatal error after a set amount of seconds. Maybe due to some time out? Thanks [2003-05-24 07:40:55] asifrrana at hotmail dot com Has anyone found a good (not using cgi-bin) resolution to this problem yet? I just downloaded the latest release 4.3.2 with JDK1.4.0 on Windows 2000 and I am still getting the same error Fatal error: Unable to create Java Virtual Machine [2003-05-22 04:11:11] Mike at 123456 dot net Hi everybody, I experience the problem of the Unable to create Java Virtual Machine, on a Windows 2000, with easyphp, after some search, my conclusion is that you couldn't use (for the moment) php as a module in Apache, you must for that use it in cgi mode (I tried it and it work fine, and change from module to cgi mode doesn't affect usage of PHP). My configuration is : Windows 2000 Apache 2.0.45 J2SDK 1.4.1_02 PHP 4.3.2 RC3 You must install J2SK, Apache, and then php (the tutorial indicate how to install in cgi mode), you can go to the following adress for installation (a very good tutorial) : http://hotwired.lycos.com/webmonkey/00/44/index4a_page8.html?tw=programming after that just configure you php.ini with the following values : [Java] extension=php_java.dll java.home = C:\j2sdk1.4.1_02\jre\bin java.library = C:\j2sdk1.4.1_02\jre\bin\server\jvm.dll java.library.path = C:\php4\extensions java.class.path =
#18600 [Com]: Unable to create Java Virtual Machine
ID: 18600 Comment by: jlondon at mcg dot edu Reported By: nalves at equifax dot com dot br Status: Open Bug Type: Java related Operating System: Windows 2000 PHP Version: 4.2.3 New Comment: Getting the same bug. Running Win2k Server, IIS 5, php4.2.3, jsdk1.4.1. I read a while back that running as a CGI would eliminate the error so I tried that but the performance hit was too much to bear since I only used java on one page. Did a little more searching and came up with a little work around. Still not perfect but takes much longer to crash. $descriptorspec = array( 0 = array(pipe, r), // stdin is a pipe that the child will read from 1 = array(pipe, w), // stdout is a pipe that the child will write to 2 = array(file, /temp/error-output.txt, a), // stderr is a file to write to ); $process = proc_open(c:\\php\\cli\\php.exe, $descriptorspec, $pipes); if (is_resource($process)) { // $pipes now looks like this: // 0 = writeable handle connected to child stdin // 1 = readable handle connected to child stdout // Any error output will be appended to /tmp/error-output.txt $size = fwrite($pipes[0], ? \$Login = new Java('CheckLogin'); echo \$Login-CheckLogin(' . $username . ', ' . $password . '); ?); if(!fclose($pipes[0])) echo There was an error closing the pipe; $result = fgets($pipes[1], $size + 1); fclose($pipes[1]); // It is important that you close any pipes before calling // proc_close in order to avoid a deadlock $return_value = proc_close($process); } Basically what I do is create a process and send it the lines of code I would use to create and manipulate the java classes. The process gives me the output and I close the process. It works pretty well and will extend the restart interval from everytime the script runs to every couple of days. For those out there chasing this bug, my method fails on the $return_value = proc_close($process); line. Once it fails it will not work again until IIS is restarted. Until IIS is restarted the process fails on $result = fgets($pipes[1], $size + 1); line. Hope you get this one fixed. This could be a really powerful plugin. -Jake Previous Comments: [2003-06-04 21:37:36] jason at ipedo dot com I meet this problem too. Why should it recreate JVM? Since it's module, I think it need only create JVM once. In linux environment, althoug i don't meet the error, the preformence is bad when system recreate JVM. How can i disable recreating the JVM or decrease the frequence of creating JVM? [2003-05-27 17:36:44] dave at unicon dot net Has anything been resolved for this usiong the non-cgi approach? I have found something I did not see in other comments. It seems that I get the fatal error after a set amount of seconds. Maybe due to some time out? Thanks [2003-05-24 07:40:55] asifrrana at hotmail dot com Has anyone found a good (not using cgi-bin) resolution to this problem yet? I just downloaded the latest release 4.3.2 with JDK1.4.0 on Windows 2000 and I am still getting the same error Fatal error: Unable to create Java Virtual Machine [2003-05-22 04:11:11] Mike at 123456 dot net Hi everybody, I experience the problem of the Unable to create Java Virtual Machine, on a Windows 2000, with easyphp, after some search, my conclusion is that you couldn't use (for the moment) php as a module in Apache, you must for that use it in cgi mode (I tried it and it work fine, and change from module to cgi mode doesn't affect usage of PHP). My configuration is : Windows 2000 Apache 2.0.45 J2SDK 1.4.1_02 PHP 4.3.2 RC3 You must install J2SK, Apache, and then php (the tutorial indicate how to install in cgi mode), you can go to the following adress for installation (a very good tutorial) : http://hotwired.lycos.com/webmonkey/00/44/index4a_page8.html?tw=programming after that just configure you php.ini with the following values : [Java] extension=php_java.dll java.home = C:\j2sdk1.4.1_02\jre\bin java.library = C:\j2sdk1.4.1_02\jre\bin\server\jvm.dll java.library.path = C:\php4\extensions java.class.path = C:\php4\extensions\php_java.jar;C:\MyClasses; Don't forget to affect the extension_dir value like : extension_dir=C:\php4\extensions And now it's work. [2003-05-16 10:37:30] fj at hilab dot it I personally have experienced the same problem with the 1.4.0_02 SDK externally connected to php4.3.1 under Win2K. I had very frequently the aforementioned 'Unable to create Java Virtual Machine' error and after a number of tests I
#18600 [Com]: Unable to create Java Virtual Machine
ID: 18600 Comment by: jason at ipedo dot com Reported By: nalves at equifax dot com dot br Status: Open Bug Type: Java related Operating System: Windows 2000 PHP Version: 4.2.3 New Comment: I meet this problem too. Why should it recreate JVM? Since it's module, I think it need only create JVM once. In linux environment, althoug i don't meet the error, the preformence is bad when system recreate JVM. How can i disable recreating the JVM or decrease the frequence of creating JVM? Previous Comments: [2003-05-27 17:36:44] dave at unicon dot net Has anything been resolved for this usiong the non-cgi approach? I have found something I did not see in other comments. It seems that I get the fatal error after a set amount of seconds. Maybe due to some time out? Thanks [2003-05-24 07:40:55] asifrrana at hotmail dot com Has anyone found a good (not using cgi-bin) resolution to this problem yet? I just downloaded the latest release 4.3.2 with JDK1.4.0 on Windows 2000 and I am still getting the same error Fatal error: Unable to create Java Virtual Machine [2003-05-22 04:11:11] Mike at 123456 dot net Hi everybody, I experience the problem of the Unable to create Java Virtual Machine, on a Windows 2000, with easyphp, after some search, my conclusion is that you couldn't use (for the moment) php as a module in Apache, you must for that use it in cgi mode (I tried it and it work fine, and change from module to cgi mode doesn't affect usage of PHP). My configuration is : Windows 2000 Apache 2.0.45 J2SDK 1.4.1_02 PHP 4.3.2 RC3 You must install J2SK, Apache, and then php (the tutorial indicate how to install in cgi mode), you can go to the following adress for installation (a very good tutorial) : http://hotwired.lycos.com/webmonkey/00/44/index4a_page8.html?tw=programming after that just configure you php.ini with the following values : [Java] extension=php_java.dll java.home = C:\j2sdk1.4.1_02\jre\bin java.library = C:\j2sdk1.4.1_02\jre\bin\server\jvm.dll java.library.path = C:\php4\extensions java.class.path = C:\php4\extensions\php_java.jar;C:\MyClasses; Don't forget to affect the extension_dir value like : extension_dir=C:\php4\extensions And now it's work. [2003-05-16 10:37:30] fj at hilab dot it I personally have experienced the same problem with the 1.4.0_02 SDK externally connected to php4.3.1 under Win2K. I had very frequently the aforementioned 'Unable to create Java Virtual Machine' error and after a number of tests I discovered that such error never happened the first time I restarted the php engine by restarting the Apache server. This made me think that the JVM is left in an abnormal state after the php interpreter exits the page. For this reason I inserted an explicit call to the System.exit(0) at the very end of the page and this solved all the problems! The only side effect is that now it is mandatory to call the flush() php function, or the page will not be completely shown... [2003-05-07 16:35:51] db_farr at excite dot com isnt there a way to close the instantiated class and release the resources? like the unset() command seems that would clear any resource retention problem and allow php to reinstantiate the jvm. The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/18600 -- Edit this bug report at http://bugs.php.net/?id=18600edit=1
#18600 [Com]: Unable to create Java Virtual Machine
ID: 18600 Comment by: dave at unicon dot net Reported By: nalves at equifax dot com dot br Status: Open Bug Type: Java related Operating System: Windows 2000 PHP Version: 4.2.3 New Comment: Has anything been resolved for this usiong the non-cgi approach? I have found something I did not see in other comments. It seems that I get the fatal error after a set amount of seconds. Maybe due to some time out? Thanks Previous Comments: [2003-05-24 07:40:55] asifrrana at hotmail dot com Has anyone found a good (not using cgi-bin) resolution to this problem yet? I just downloaded the latest release 4.3.2 with JDK1.4.0 on Windows 2000 and I am still getting the same error Fatal error: Unable to create Java Virtual Machine [2003-05-22 04:11:11] Mike at 123456 dot net Hi everybody, I experience the problem of the Unable to create Java Virtual Machine, on a Windows 2000, with easyphp, after some search, my conclusion is that you couldn't use (for the moment) php as a module in Apache, you must for that use it in cgi mode (I tried it and it work fine, and change from module to cgi mode doesn't affect usage of PHP). My configuration is : Windows 2000 Apache 2.0.45 J2SDK 1.4.1_02 PHP 4.3.2 RC3 You must install J2SK, Apache, and then php (the tutorial indicate how to install in cgi mode), you can go to the following adress for installation (a very good tutorial) : http://hotwired.lycos.com/webmonkey/00/44/index4a_page8.html?tw=programming after that just configure you php.ini with the following values : [Java] extension=php_java.dll java.home = C:\j2sdk1.4.1_02\jre\bin java.library = C:\j2sdk1.4.1_02\jre\bin\server\jvm.dll java.library.path = C:\php4\extensions java.class.path = C:\php4\extensions\php_java.jar;C:\MyClasses; Don't forget to affect the extension_dir value like : extension_dir=C:\php4\extensions And now it's work. [2003-05-16 10:37:30] fj at hilab dot it I personally have experienced the same problem with the 1.4.0_02 SDK externally connected to php4.3.1 under Win2K. I had very frequently the aforementioned 'Unable to create Java Virtual Machine' error and after a number of tests I discovered that such error never happened the first time I restarted the php engine by restarting the Apache server. This made me think that the JVM is left in an abnormal state after the php interpreter exits the page. For this reason I inserted an explicit call to the System.exit(0) at the very end of the page and this solved all the problems! The only side effect is that now it is mandatory to call the flush() php function, or the page will not be completely shown... [2003-05-07 16:35:51] db_farr at excite dot com isnt there a way to close the instantiated class and release the resources? like the unset() command seems that would clear any resource retention problem and allow php to reinstantiate the jvm. [2003-05-01 14:35:34] sohelnmerchant at yahoo dot com Hi, I am using PHP as a SAPI modlue in Apache (as it was recommended in the readme file that its unsafe to use PHP in CGI mode) on windows. Whenever I try to use a java class I keep on getting this problem Unable to create Java Virtual Machine. Some people have sggested to use CGI version instead of SAPI. But I dont wanna use it for the reasons mentioned above. I am wondering, if there exist any patch which can eliminate this problem. Thanks, Sohel Merchant. The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/18600 -- Edit this bug report at http://bugs.php.net/?id=18600edit=1
#18600 [Com]: Unable to create Java Virtual Machine
ID: 18600 Comment by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Open Bug Type: Java related Operating System: Windows 2000 PHP Version: 4.2.3 New Comment: I get the same problem; The way I reproduced it is: 1. load a page with a Java call; 2. press and hold the refresh button. 3. It will eventually fail. It seems that PHP is attempting to create a new JVM for each request (unfortunately, this is required for a cgi install; it shouldn't be for a SAPI install). My guess is that either Apache or PHP runs into resource limits (e.g. does not release the JVM after it completes the request; creates too many threads; etc...). It would probably be better if PHP used a JVM pool; this wouldn't make much difference in a cgi install, but would help SAPI installs. I have no idea whether this is feasible or not; I've never actually taken the time to give the source a looksy... Previous Comments: [2003-01-17 03:56:29] [EMAIL PROTECTED] Hi all, How my servlet will call my php program. Any pointer appreciated. Surendra. [2003-01-08 17:14:33] [EMAIL PROTECTED] I HAVE A NEC 95 WINDOWS NOTEBOOK AND CANNOT INSTALL THE JAVA VIRTUAL MACHINE PLUG IT COMES BACK AND TELLS ME THIS THE PUBLISHERCANNOT BE DETERMINED DUE TO TO PROBLEMSAND THIS AS WELL TRUST PROVIDER IS UNKNOWN OR NOT CONFIGURED PROPERLY CAN U PLEASE TELL ME WHAT I CAN DO TO REMEDY THIS?? THANK YOU PETER FIORE. [2003-01-07 03:51:23] [EMAIL PROTECTED] THANKS TO [EMAIL PROTECTED] , The solution to resolve Unable to Create Java Virtual Machine is to configure APACHE or IIS not using sapi for php but CGI THANKS THANKS THANKS go there for configuration http://hotwired.lycos.com/webmonkey/00/44/index4a_page9.html?tw=programming [2002-12-12 09:19:13] [EMAIL PROTECTED] Hi there, I'm confirming Cédric's knowledge - java is running correctly from within PHP on Apache only when PHP is running as a CGI and not as a SAPI module. When running PHP as Apache SAPI Module after the restart Apache only fist access to php page using java is running OK, all next reloads of this page caused Fatal error: Unable to create Java Virtual Machine in ... I think this could be still not solved bug. Thanks Alberto BTW I'm running on: OS:Win2000 Server SP2 Apache:1.3.27 PHP Version 4.3.0-dev (Build Date Dec 12 2002 10:14:28) Java version=1.4.1_01 Java vendor=Sun Microsystems Inc. [2002-12-06 05:06:27] [EMAIL PROTECTED] Hi, using cgi-bin instead of as a module hm,isn't this a performance and computer resources issue ? Thx Alberto The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/18600 -- Edit this bug report at http://bugs.php.net/?id=18600edit=1
#18600 [Com]: Unable to create Java Virtual Machine
ID: 18600 Comment by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Open Bug Type: Java related Operating System: Windows 2000 PHP Version: 4.2.3 New Comment: Hi all, How my servlet will call my php program. Any pointer appreciated. Surendra. Previous Comments: [2003-01-08 17:14:33] [EMAIL PROTECTED] I HAVE A NEC 95 WINDOWS NOTEBOOK AND CANNOT INSTALL THE JAVA VIRTUAL MACHINE PLUG IT COMES BACK AND TELLS ME THIS THE PUBLISHERCANNOT BE DETERMINED DUE TO TO PROBLEMSAND THIS AS WELL TRUST PROVIDER IS UNKNOWN OR NOT CONFIGURED PROPERLY CAN U PLEASE TELL ME WHAT I CAN DO TO REMEDY THIS?? THANK YOU PETER FIORE. [2003-01-07 03:51:23] [EMAIL PROTECTED] THANKS TO [EMAIL PROTECTED] , The solution to resolve Unable to Create Java Virtual Machine is to configure APACHE or IIS not using sapi for php but CGI THANKS THANKS THANKS go there for configuration http://hotwired.lycos.com/webmonkey/00/44/index4a_page9.html?tw=programming [2002-12-12 09:19:13] [EMAIL PROTECTED] Hi there, I'm confirming Cédric's knowledge - java is running correctly from within PHP on Apache only when PHP is running as a CGI and not as a SAPI module. When running PHP as Apache SAPI Module after the restart Apache only fist access to php page using java is running OK, all next reloads of this page caused Fatal error: Unable to create Java Virtual Machine in ... I think this could be still not solved bug. Thanks Alberto BTW I'm running on: OS:Win2000 Server SP2 Apache:1.3.27 PHP Version 4.3.0-dev (Build Date Dec 12 2002 10:14:28) Java version=1.4.1_01 Java vendor=Sun Microsystems Inc. [2002-12-06 05:06:27] [EMAIL PROTECTED] Hi, using cgi-bin instead of as a module hm,isn't this a performance and computer resources issue ? Thx Alberto [2002-12-05 15:15:35] [EMAIL PROTECTED] I had the same bug but after having looking a lot, I find a solution. You just have to configure php as a cgi-bin instead of as a module and it works perfectly. Hoping it will help you to fix the bug in the module. Cédric. The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/18600 -- Edit this bug report at http://bugs.php.net/?id=18600edit=1
#18600 [Com]: Unable to create Java Virtual Machine
ID: 18600 Comment by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Open Bug Type: Java related Operating System: Windows 2000 PHP Version: 4.2.3 New Comment: I HAVE A NEC 95 WINDOWS NOTEBOOK AND CANNOT INSTALL THE JAVA VIRTUAL MACHINE PLUG IT COMES BACK AND TELLS ME THIS THE PUBLISHERCANNOT BE DETERMINED DUE TO TO PROBLEMSAND THIS AS WELL TRUST PROVIDER IS UNKNOWN OR NOT CONFIGURED PROPERLY CAN U PLEASE TELL ME WHAT I CAN DO TO REMEDY THIS?? THANK YOU PETER FIORE. Previous Comments: [2003-01-07 03:51:23] [EMAIL PROTECTED] THANKS TO [EMAIL PROTECTED] , The solution to resolve Unable to Create Java Virtual Machine is to configure APACHE or IIS not using sapi for php but CGI THANKS THANKS THANKS go there for configuration http://hotwired.lycos.com/webmonkey/00/44/index4a_page9.html?tw=programming [2002-12-12 09:19:13] [EMAIL PROTECTED] Hi there, I'm confirming Cédric's knowledge - java is running correctly from within PHP on Apache only when PHP is running as a CGI and not as a SAPI module. When running PHP as Apache SAPI Module after the restart Apache only fist access to php page using java is running OK, all next reloads of this page caused Fatal error: Unable to create Java Virtual Machine in ... I think this could be still not solved bug. Thanks Alberto BTW I'm running on: OS:Win2000 Server SP2 Apache:1.3.27 PHP Version 4.3.0-dev (Build Date Dec 12 2002 10:14:28) Java version=1.4.1_01 Java vendor=Sun Microsystems Inc. [2002-12-06 05:06:27] [EMAIL PROTECTED] Hi, using cgi-bin instead of as a module hm,isn't this a performance and computer resources issue ? Thx Alberto [2002-12-05 15:15:35] [EMAIL PROTECTED] I had the same bug but after having looking a lot, I find a solution. You just have to configure php as a cgi-bin instead of as a module and it works perfectly. Hoping it will help you to fix the bug in the module. Cédric. [2002-12-04 08:44:52] [EMAIL PROTECTED] Hi, many thanks Sebastian for the response. I've downloaded php4-win32-200212041130.zip from snaps.php.net, but after PHP update Apache didn't start and configuration test detected following problem: Syntax error on line 174 of C:/Program Files/Apache Group/Apache2/conf/httpd.conf: Cannot load C:/PHP/sapi/php4apache2.dll into server: The specified procedure could not be found. httpd.conf has on the line 174: LoadModule php4_module c:/php/sapi/php4apache2.dll Question is what is the recomended version of Win32 Apache2 to work corectly with latest PHP 4.4.x-dev? Thank you, Alberto The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/18600 -- Edit this bug report at http://bugs.php.net/?id=18600edit=1
#18600 [Com]: Unable to create Java Virtual Machine
ID: 18600 Comment by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Open Bug Type: Java related Operating System: Windows 2000 PHP Version: 4.2.3 New Comment: THANKS TO [EMAIL PROTECTED] , The solution to resolve Unable to Create Java Virtual Machine is to configure APACHE or IIS not using sapi for php but CGI THANKS THANKS THANKS go there for configuration http://hotwired.lycos.com/webmonkey/00/44/index4a_page9.html?tw=programming Previous Comments: [2002-12-12 09:19:13] [EMAIL PROTECTED] Hi there, I'm confirming Cédric's knowledge - java is running correctly from within PHP on Apache only when PHP is running as a CGI and not as a SAPI module. When running PHP as Apache SAPI Module after the restart Apache only fist access to php page using java is running OK, all next reloads of this page caused Fatal error: Unable to create Java Virtual Machine in ... I think this could be still not solved bug. Thanks Alberto BTW I'm running on: OS:Win2000 Server SP2 Apache:1.3.27 PHP Version 4.3.0-dev (Build Date Dec 12 2002 10:14:28) Java version=1.4.1_01 Java vendor=Sun Microsystems Inc. [2002-12-06 05:06:27] [EMAIL PROTECTED] Hi, using cgi-bin instead of as a module hm,isn't this a performance and computer resources issue ? Thx Alberto [2002-12-05 15:15:35] [EMAIL PROTECTED] I had the same bug but after having looking a lot, I find a solution. You just have to configure php as a cgi-bin instead of as a module and it works perfectly. Hoping it will help you to fix the bug in the module. Cédric. [2002-12-04 08:44:52] [EMAIL PROTECTED] Hi, many thanks Sebastian for the response. I've downloaded php4-win32-200212041130.zip from snaps.php.net, but after PHP update Apache didn't start and configuration test detected following problem: Syntax error on line 174 of C:/Program Files/Apache Group/Apache2/conf/httpd.conf: Cannot load C:/PHP/sapi/php4apache2.dll into server: The specified procedure could not be found. httpd.conf has on the line 174: LoadModule php4_module c:/php/sapi/php4apache2.dll Question is what is the recomended version of Win32 Apache2 to work corectly with latest PHP 4.4.x-dev? Thank you, Alberto [2002-12-04 06:20:14] [EMAIL PROTECTED] I tried the php4-win32-STABLE-200212040930 snapshot, but I still got problems with a simple java program (the one in the docs). After some reloads I got a PHP has encountered an Access Violation at 77FCBEE8 After that: Fatal error: Unable to create Java Virtual Machine in c:\inetpub\wwwroot\estatisticos\admin\java.php on line 3 At least the problem occurs only to java applications, not all php pages. Nelio The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/18600 -- Edit this bug report at http://bugs.php.net/?id=18600edit=1
#18600 [Com]: Unable to create Java Virtual Machine
ID: 18600 Comment by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Open Bug Type: Java related Operating System: Windows 2000 PHP Version: 4.2.3 New Comment: Hi, using cgi-bin instead of as a module hm,isn't this a performance and computer resources issue ? Thx Alberto Previous Comments: [2002-12-05 15:15:35] [EMAIL PROTECTED] I had the same bug but after having looking a lot, I find a solution. You just have to configure php as a cgi-bin instead of as a module and it works perfectly. Hoping it will help you to fix the bug in the module. Cédric. [2002-12-04 08:44:52] [EMAIL PROTECTED] Hi, many thanks Sebastian for the response. I've downloaded php4-win32-200212041130.zip from snaps.php.net, but after PHP update Apache didn't start and configuration test detected following problem: Syntax error on line 174 of C:/Program Files/Apache Group/Apache2/conf/httpd.conf: Cannot load C:/PHP/sapi/php4apache2.dll into server: The specified procedure could not be found. httpd.conf has on the line 174: LoadModule php4_module c:/php/sapi/php4apache2.dll Question is what is the recomended version of Win32 Apache2 to work corectly with latest PHP 4.4.x-dev? Thank you, Alberto [2002-12-04 06:20:14] [EMAIL PROTECTED] I tried the php4-win32-STABLE-200212040930 snapshot, but I still got problems with a simple java program (the one in the docs). After some reloads I got a PHP has encountered an Access Violation at 77FCBEE8 After that: Fatal error: Unable to create Java Virtual Machine in c:\inetpub\wwwroot\estatisticos\admin\java.php on line 3 At least the problem occurs only to java applications, not all php pages. Nelio [2002-12-04 02:18:05] [EMAIL PROTECTED] 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. [2002-12-02 05:11:03] [EMAIL PROTECTED] Hi, I'm reporting the same error using: Win2k Server apache_2.0.36-win32-x86-no_ssl.msi php4-win32-latest.zip (PHP Version 4.2.3) j2sdk-1_4_1_01-windows-i586.exe or (jdk-1_2_2_014-windows-i586.exe) ... I've got periods of errors and periods of success when instantiating $system = new Java(java.lang.System); from within PHP. Error message is: Fatal error: Unable to create Java Virtual Machine in ... I see a lot of such bug reports around but still no solution ;-(. Any ideas? Thanx Alberto The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/18600 -- Edit this bug report at http://bugs.php.net/?id=18600edit=1
#18600 [Com]: Unable to create Java Virtual Machine
ID: 18600 Comment by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Open Bug Type: Java related Operating System: Windows 2000 PHP Version: 4.2.3 New Comment: I had the same bug but after having looking a lot, I find a solution. You just have to configure php as a cgi-bin instead of as a module and it works perfectly. Hoping it will help you to fix the bug in the module. Cédric. Previous Comments: [2002-12-04 08:44:52] [EMAIL PROTECTED] Hi, many thanks Sebastian for the response. I've downloaded php4-win32-200212041130.zip from snaps.php.net, but after PHP update Apache didn't start and configuration test detected following problem: Syntax error on line 174 of C:/Program Files/Apache Group/Apache2/conf/httpd.conf: Cannot load C:/PHP/sapi/php4apache2.dll into server: The specified procedure could not be found. httpd.conf has on the line 174: LoadModule php4_module c:/php/sapi/php4apache2.dll Question is what is the recomended version of Win32 Apache2 to work corectly with latest PHP 4.4.x-dev? Thank you, Alberto [2002-12-04 06:20:14] [EMAIL PROTECTED] I tried the php4-win32-STABLE-200212040930 snapshot, but I still got problems with a simple java program (the one in the docs). After some reloads I got a PHP has encountered an Access Violation at 77FCBEE8 After that: Fatal error: Unable to create Java Virtual Machine in c:\inetpub\wwwroot\estatisticos\admin\java.php on line 3 At least the problem occurs only to java applications, not all php pages. Nelio [2002-12-04 02:18:05] [EMAIL PROTECTED] 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. [2002-12-02 05:11:03] [EMAIL PROTECTED] Hi, I'm reporting the same error using: Win2k Server apache_2.0.36-win32-x86-no_ssl.msi php4-win32-latest.zip (PHP Version 4.2.3) j2sdk-1_4_1_01-windows-i586.exe or (jdk-1_2_2_014-windows-i586.exe) ... I've got periods of errors and periods of success when instantiating $system = new Java(java.lang.System); from within PHP. Error message is: Fatal error: Unable to create Java Virtual Machine in ... I see a lot of such bug reports around but still no solution ;-(. Any ideas? Thanx Alberto [2002-11-28 07:19:46] [EMAIL PROTECTED] Hi I'm asking it again: Is anyone using sablotron (ext/xslt) together with the java extension, then you're in bad luck, because: sablotron 0.97 and jdk = 1.3 does not work together. Sablotron 0.97 is not out yet, but there is an RC1 in their CVS (didn't find a link to download it), which should solve the problem.. try not loading the sablotron extension and see if it solves the problem unix people which have problem with even starting up, should try the symlink trick: make a symlink from java.so to libphp_java.so and see if that works. chregu The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/18600 -- Edit this bug report at http://bugs.php.net/?id=18600edit=1
#18600 [Com]: Unable to create Java Virtual Machine
ID: 18600 Comment by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Open Bug Type: Java related Operating System: Windows 2000 PHP Version: 4.2.3 New Comment: Hi, many thanks Sebastian for the response. I've downloaded php4-win32-200212041130.zip from snaps.php.net, but after PHP update Apache didn't start and configuration test detected following problem: Syntax error on line 174 of C:/Program Files/Apache Group/Apache2/conf/httpd.conf: Cannot load C:/PHP/sapi/php4apache2.dll into server: The specified procedure could not be found. httpd.conf has on the line 174: LoadModule php4_module c:/php/sapi/php4apache2.dll Question is what is the recomended version of Win32 Apache2 to work corectly with latest PHP 4.4.x-dev? Thank you, Alberto Previous Comments: [2002-12-04 06:20:14] [EMAIL PROTECTED] I tried the php4-win32-STABLE-200212040930 snapshot, but I still got problems with a simple java program (the one in the docs). After some reloads I got a PHP has encountered an Access Violation at 77FCBEE8 After that: Fatal error: Unable to create Java Virtual Machine in c:\inetpub\wwwroot\estatisticos\admin\java.php on line 3 At least the problem occurs only to java applications, not all php pages. Nelio [2002-12-04 02:18:05] [EMAIL PROTECTED] 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. [2002-12-02 05:11:03] [EMAIL PROTECTED] Hi, I'm reporting the same error using: Win2k Server apache_2.0.36-win32-x86-no_ssl.msi php4-win32-latest.zip (PHP Version 4.2.3) j2sdk-1_4_1_01-windows-i586.exe or (jdk-1_2_2_014-windows-i586.exe) ... I've got periods of errors and periods of success when instantiating $system = new Java(java.lang.System); from within PHP. Error message is: Fatal error: Unable to create Java Virtual Machine in ... I see a lot of such bug reports around but still no solution ;-(. Any ideas? Thanx Alberto [2002-11-28 07:19:46] [EMAIL PROTECTED] Hi I'm asking it again: Is anyone using sablotron (ext/xslt) together with the java extension, then you're in bad luck, because: sablotron 0.97 and jdk = 1.3 does not work together. Sablotron 0.97 is not out yet, but there is an RC1 in their CVS (didn't find a link to download it), which should solve the problem.. try not loading the sablotron extension and see if it solves the problem unix people which have problem with even starting up, should try the symlink trick: make a symlink from java.so to libphp_java.so and see if that works. chregu [2002-11-05 05:43:54] [EMAIL PROTECTED] I am also seeing this bug, unfortunatly I'm running apache 1.x on Solaris 8. Works fine for a little while, then stops working after a number of requests. I can stop the symtoms by turning off keep-alive in apache or by reducing the requests per child to a very low number. Of course, none of these solutions are acceptable. I am trying to test 4.3.0pre2 just now but having compilation errors. More later. The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/18600 -- Edit this bug report at http://bugs.php.net/?id=18600edit=1
#18600 [Com]: Unable to create Java Virtual Machine
ID: 18600 Comment by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Feedback Bug Type: Java related Operating System: Windows 2000 PHP Version: 4.2.3 New Comment: Hi, I'm reporting the same error using: Win2k Server apache_2.0.36-win32-x86-no_ssl.msi php4-win32-latest.zip (PHP Version 4.2.3) j2sdk-1_4_1_01-windows-i586.exe or (jdk-1_2_2_014-windows-i586.exe) ... I've got periods of errors and periods of success when instantiating $system = new Java(java.lang.System); from within PHP. Error message is: Fatal error: Unable to create Java Virtual Machine in ... I see a lot of such bug reports around but still no solution ;-(. Any ideas? Thanx Alberto Previous Comments: [2002-11-28 07:19:46] [EMAIL PROTECTED] Hi I'm asking it again: Is anyone using sablotron (ext/xslt) together with the java extension, then you're in bad luck, because: sablotron 0.97 and jdk = 1.3 does not work together. Sablotron 0.97 is not out yet, but there is an RC1 in their CVS (didn't find a link to download it), which should solve the problem.. try not loading the sablotron extension and see if it solves the problem unix people which have problem with even starting up, should try the symlink trick: make a symlink from java.so to libphp_java.so and see if that works. chregu [2002-11-05 05:43:54] [EMAIL PROTECTED] I am also seeing this bug, unfortunatly I'm running apache 1.x on Solaris 8. Works fine for a little while, then stops working after a number of requests. I can stop the symtoms by turning off keep-alive in apache or by reducing the requests per child to a very low number. Of course, none of these solutions are acceptable. I am trying to test 4.3.0pre2 just now but having compilation errors. More later. [2002-10-31 08:51:16] [EMAIL PROTECTED] Yeah the only real issue I can see here is that this is a Windows specific issue. I've looked through the the DSP file, and read up on specific linking issues in Windows... everything looks right from the end of PHP. I'm guessing this can be one of (or possibly all of) these things: A) specific to a JVM version - in which case we'd need to find out which one works, and then update the specific hooks into PHP to use the newer versions. B) Windows not liking Java at all - not much we can do about that. C) specific to PHP alone - in which case someone with more Windows dev experience will have to take a look at this. As I don't see any real issue with the way we're linking and calling things (beyond the really resource intensive comments). [2002-10-31 07:44:50] [EMAIL PROTECTED] I found this problem using Apache 1.x on Win2k. PHP 4.2.3 causes the JVM create failure (although I couldn't get any access violations). Under IIS4 , the access violation causes some serious problems, albeit intermittently. I found that starting small with Java-inclusive scripts allowed some java work to be done (such as retrieving JVM versions, etc). However, when I started some more serious Java work with some custom classes I got both the JVM create failure and an access violation which crashed IIS. A reboot was necessary to bring IIS back up (Win2k wouldn't even let me force kill the process!!). I took a look at the latest snapshot posted below, but this caused an immediate crash in Apache upon starting the service. Any other suggestions? [2002-09-27 12:00:04] [EMAIL PROTECTED] just to add to the list of symptoms. First time I run a script, I get Warning: Unknown list entry type in request shutdown (0) in Unknown on line 0 when the script is ending. The next time I try to load the same script, I get Fatal error: Unable to create Java Virtual Machine in c:\web\qvc\reports\test.php on line 2 win2k, j2sdk1.4, php 4.2.3. Does that help? The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/18600 -- Edit this bug report at http://bugs.php.net/?id=18600edit=1
#18600 [Com]: Unable to create Java Virtual Machine
ID: 18600 Comment by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Open Bug Type: Java related Operating System: Windows 2000 PHP Version: 4.2.3 New Comment: I am also seeing this bug, unfortunatly I'm running apache 1.x on Solaris 8. Works fine for a little while, then stops working after a number of requests. I can stop the symtoms by turning off keep-alive in apache or by reducing the requests per child to a very low number. Of course, none of these solutions are acceptable. I am trying to test 4.3.0pre2 just now but having compilation errors. More later. Previous Comments: [2002-10-31 08:51:16] [EMAIL PROTECTED] Yeah the only real issue I can see here is that this is a Windows specific issue. I've looked through the the DSP file, and read up on specific linking issues in Windows... everything looks right from the end of PHP. I'm guessing this can be one of (or possibly all of) these things: A) specific to a JVM version - in which case we'd need to find out which one works, and then update the specific hooks into PHP to use the newer versions. B) Windows not liking Java at all - not much we can do about that. C) specific to PHP alone - in which case someone with more Windows dev experience will have to take a look at this. As I don't see any real issue with the way we're linking and calling things (beyond the really resource intensive comments). [2002-10-31 07:44:50] [EMAIL PROTECTED] I found this problem using Apache 1.x on Win2k. PHP 4.2.3 causes the JVM create failure (although I couldn't get any access violations). Under IIS4 , the access violation causes some serious problems, albeit intermittently. I found that starting small with Java-inclusive scripts allowed some java work to be done (such as retrieving JVM versions, etc). However, when I started some more serious Java work with some custom classes I got both the JVM create failure and an access violation which crashed IIS. A reboot was necessary to bring IIS back up (Win2k wouldn't even let me force kill the process!!). I took a look at the latest snapshot posted below, but this caused an immediate crash in Apache upon starting the service. Any other suggestions? [2002-09-27 12:00:04] [EMAIL PROTECTED] just to add to the list of symptoms. First time I run a script, I get Warning: Unknown list entry type in request shutdown (0) in Unknown on line 0 when the script is ending. The next time I try to load the same script, I get Fatal error: Unable to create Java Virtual Machine in c:\web\qvc\reports\test.php on line 2 win2k, j2sdk1.4, php 4.2.3. Does that help? [2002-09-25 05:02:59] [EMAIL PROTECTED] FYI have tried it now on another system under Apache 2 / Windows NT 4. Exactly the same problem: runs for a limited time period then reports Unable to load virtual machine. Made sure Sablotron is not running also. [2002-09-21 13:05:14] [EMAIL PROTECTED] One further comment - just tried is with JRE 1.3.0 - exactly the same problem. The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/18600 -- Edit this bug report at http://bugs.php.net/?id=18600edit=1
#18600 [Com]: Unable to create Java Virtual Machine
ID: 18600 Comment by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Open Bug Type: Java related Operating System: Windows 2000 PHP Version: 4.2.3 New Comment: FYI have tried it now on another system under Apache 2 / Windows NT 4. Exactly the same problem: runs for a limited time period then reports Unable to load virtual machine. Made sure Sablotron is not running also. Previous Comments: [2002-09-21 13:05:14] [EMAIL PROTECTED] One further comment - just tried is with JRE 1.3.0 - exactly the same problem. [2002-09-21 12:56:21] [EMAIL PROTECTED] Experiencing very similar problems to the first posted here - looks like some kind of timeout issue. Running Windows XP, PHP 4.2.2, j2sdk1.4.0_02, Apache/1.3.26 Running the first sample PHP/Java script from the manual, PHP successfully loads the Java Virtual machine straight after an Apache restart. After that I can run the script as long as it was run in roughly the last 30-60 seconds. If I wait longer that this time period, the script can no longer load the JVM. If you want to re-create the PHP environment, I'm using Firepages phpdev5: http://www.firepages.com.au/dev5.htm ini settings; [Java] java.class.path = c:\phpdev5\php\extensions\php_java.jar;c:\phpdev5\classes java.home = C:\Programme\Java\j2sdk1.4.0_02\jre java.library = C:\Programme\Java\j2sdk1.4.0_02\jre\bin\server\jvm.dll java.library.path = c:\phpdev5\php\extensions [2002-09-09 14:50:46] [EMAIL PROTECTED] Yes, it's PHP. The message shown is similar to 'PHP has encountered an Access Violation at 77FCB2B9'. Nelio [2002-09-09 14:17:35] [EMAIL PROTECTED] Well thats a good step, we got rid of one of the errors. The access violation though doesn't sound good. Is it still PHP doing the violation or is it the JDK? [2002-09-09 13:36:36] [EMAIL PROTECTED] I tested with 4.3.0 (dev), and I got almost the same errors. The 'access violation' message is still there, and after some reloads, I could hang the IIS, and I had to restart it. During these tests I couldn't get the 'unable to create java virtual machime' message. The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/18600 -- Edit this bug report at http://bugs.php.net/?id=18600edit=1
#18600 [Com]: Unable to create Java Virtual Machine
ID: 18600 Comment by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Open Bug Type: Java related Operating System: Windows 2000 PHP Version: 4.2.3 New Comment: Experiencing very similar problems to the first posted here - looks like some kind of timeout issue. Running Windows XP, PHP 4.2.2, j2sdk1.4.0_02, Apache/1.3.26 Running the first sample PHP/Java script from the manual, PHP successfully loads the Java Virtual machine straight after an Apache restart. After that I can run the script as long as it was run in roughly the last 30-60 seconds. If I wait longer that this time period, the script can no longer load the JVM. If you want to re-create the PHP environment, I'm using Firepages phpdev5: http://www.firepages.com.au/dev5.htm ini settings; [Java] java.class.path = c:\phpdev5\php\extensions\php_java.jar;c:\phpdev5\classes java.home = C:\Programme\Java\j2sdk1.4.0_02\jre java.library = C:\Programme\Java\j2sdk1.4.0_02\jre\bin\server\jvm.dll java.library.path = c:\phpdev5\php\extensions Previous Comments: [2002-09-09 14:50:46] [EMAIL PROTECTED] Yes, it's PHP. The message shown is similar to 'PHP has encountered an Access Violation at 77FCB2B9'. Nelio [2002-09-09 14:17:35] [EMAIL PROTECTED] Well thats a good step, we got rid of one of the errors. The access violation though doesn't sound good. Is it still PHP doing the violation or is it the JDK? [2002-09-09 13:36:36] [EMAIL PROTECTED] I tested with 4.3.0 (dev), and I got almost the same errors. The 'access violation' message is still there, and after some reloads, I could hang the IIS, and I had to restart it. During these tests I couldn't get the 'unable to create java virtual machime' message. [2002-09-09 09:54:46] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php4-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-latest.zip Updating version. As I asked before though, can you test an unstable build of PHP, aka the code we are considering to be PHP 4.3.0 at the URLs provided above? [2002-09-09 07:32:23] [EMAIL PROTECTED] As soon as I knew about version 4.2.3, I got it and tried to see if the bug was fixed. Unfortunatelly, after few tests, I got the message 'PHP has encountered an Access Violation at 77FCB2B9'. So far I couldn't get the message 'Unable to create java virtual machine', but I didn't run a lot of tests. Also, after a few reloads at my test page, I couldn't get no more results (the request seemed to return nothing at all!). Other php pages that don't use the java lib still work fine. Nelio Pereira The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/18600 -- Edit this bug report at http://bugs.php.net/?id=18600edit=1
#18600 [Com]: Unable to create Java Virtual Machine
ID: 18600 Comment by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Open Bug Type: Java related Operating System: Windows 2000 PHP Version: 4.2.3 New Comment: One further comment - just tried is with JRE 1.3.0 - exactly the same problem. Previous Comments: [2002-09-21 12:56:21] [EMAIL PROTECTED] Experiencing very similar problems to the first posted here - looks like some kind of timeout issue. Running Windows XP, PHP 4.2.2, j2sdk1.4.0_02, Apache/1.3.26 Running the first sample PHP/Java script from the manual, PHP successfully loads the Java Virtual machine straight after an Apache restart. After that I can run the script as long as it was run in roughly the last 30-60 seconds. If I wait longer that this time period, the script can no longer load the JVM. If you want to re-create the PHP environment, I'm using Firepages phpdev5: http://www.firepages.com.au/dev5.htm ini settings; [Java] java.class.path = c:\phpdev5\php\extensions\php_java.jar;c:\phpdev5\classes java.home = C:\Programme\Java\j2sdk1.4.0_02\jre java.library = C:\Programme\Java\j2sdk1.4.0_02\jre\bin\server\jvm.dll java.library.path = c:\phpdev5\php\extensions [2002-09-09 14:50:46] [EMAIL PROTECTED] Yes, it's PHP. The message shown is similar to 'PHP has encountered an Access Violation at 77FCB2B9'. Nelio [2002-09-09 14:17:35] [EMAIL PROTECTED] Well thats a good step, we got rid of one of the errors. The access violation though doesn't sound good. Is it still PHP doing the violation or is it the JDK? [2002-09-09 13:36:36] [EMAIL PROTECTED] I tested with 4.3.0 (dev), and I got almost the same errors. The 'access violation' message is still there, and after some reloads, I could hang the IIS, and I had to restart it. During these tests I couldn't get the 'unable to create java virtual machime' message. [2002-09-09 09:54:46] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php4-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-latest.zip Updating version. As I asked before though, can you test an unstable build of PHP, aka the code we are considering to be PHP 4.3.0 at the URLs provided above? The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/18600 -- Edit this bug report at http://bugs.php.net/?id=18600edit=1