|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #61817 if php file is exist, net.php.servlet.send(Native Met
Submitted: 2012-04-22 17:34 UTC Modified: 2015-07-16 05:38 UTC
From: johnsun dot hu at 163 dot com Assigned:
Status: Not a bug Package: Built-in web server
PHP Version: 5.4.0 OS: win7
Private report: No CVE-ID: None
 [2012-04-22 17:34 UTC] johnsun dot hu at 163 dot com

   I setup success for Jbossweb 2.1.9 whith pecl-5.2.5-win32 and PHP 5.2.17, use php-java, and visit http://localhost/phpinfo.php successfully.

   but when visit http://localhost/phpinfo1.php which is not exist, the page return infomation:
   type Exception report
   description The server encountered an internal error () that prevented it from fulfilling this request.
	net.php.servlet.send(Native Method)
   note The full stack trace of the root cause is available in the JBoss Web/2.1.9.GA logs.
and log file "jbossweb-stderr.2012-04-22.log" is:
java.lang.ClassNotFoundException: org.apache.catalina.servlets.php.Handler
	at$ Source)
	at$ Source)
	at Method)
	at Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at org.apache.catalina.core.DefaultInstanceManager.loadClass(
	at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(
	at org.apache.catalina.core.DefaultInstanceManager.newInstance(
	at org.apache.catalina.core.StandardWrapper.loadServlet(
	at org.apache.catalina.core.StandardWrapper.load(
	at org.apache.catalina.core.StandardContext.loadOnStartup(
	at org.apache.catalina.core.StandardContext.start(
	at org.apache.catalina.core.ContainerBase.addChildInternal(
	at org.apache.catalina.core.ContainerBase.addChild(
	at org.apache.catalina.core.StandardHost.addChild(
	at org.apache.catalina.startup.HostConfig.deployDescriptor(
	at org.apache.catalina.startup.HostConfig.deployDescriptors(
	at org.apache.catalina.startup.HostConfig.deployApps(
	at org.apache.catalina.startup.HostConfig.start(
	at org.apache.catalina.startup.HostConfig.lifecycleEvent(
	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(
	at org.apache.catalina.core.ContainerBase.start(
	at org.apache.catalina.core.StandardHost.start(
	at org.apache.catalina.core.ContainerBase.start(
	at org.apache.catalina.core.StandardEngine.start(
	at org.apache.catalina.core.StandardService.start(
	at org.apache.catalina.core.StandardServer.start(
	at org.apache.catalina.startup.Catalina.start(
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.apache.catalina.startup.Bootstrap.start(
	at org.apache.catalina.startup.Bootstrap.main(

Servlet.service() for servlet php threw exception 
	at net.php.servlet.send(Native Method)
	at net.php.servlet.service(
	at net.php.servlet.service(
	at javax.servlet.http.HttpServlet.service(
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(
	at org.apache.catalina.core.StandardWrapperValve.invoke(
	at org.apache.catalina.core.StandardContextValve.invoke(
	at org.apache.catalina.core.StandardHostValve.invoke(
	at org.apache.catalina.valves.ErrorReportValve.invoke(
	at org.apache.catalina.core.StandardEngineValve.invoke(
	at org.apache.catalina.connector.CoyoteAdapter.service(
	at org.apache.coyote.http11.Http11AprProcessor.process(
	at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(
	at Source)


Jbossweb is down.

if I visist http://localhost/index1.jsp which is not exist, the page return infomation:
   HTTP Status 404 - /index1.jsp
   type Status report
   message /index1.jsp
   description The requested resource (/index1.jsp) is not available.
   JBoss Web/2.1.9.GA

so I think the php-java servlet has a bug.

I setup php-java progress:

1. download & unzip PHP (5.2.6) to a directory, c:\php-5.2.6-Win32
2. download PECL 5.2.5 Win32 binaries (PECL 5.2.6 does not include the files required.)
3. rename php.ini-dist to php.ini in c:\php-5.2.6-Win32
4. add extension=php_java.dll in Dynamic Extensions section in php.ini
5. extract php5servlet.dll from PECL 5.2.5 to c:\php-5.2.6-Win32
6. extract php_java.dll from PECL 5.2.5 to c:\php-5.2.6-Win32\ext
7. create a directory named forphp (any name you like) in jboss\webapps directory
8. extract phpsrvlt.jar from PECL 5.2.5 to jboss\webapps\forphp\WEB-INF\lib
9. unzip phpsrvlt.jar
10. modify both net\php\ and net\php\ to library=php5servlet
11. pack php5srvlt.jar
12. creat web.xml in jboss\webapps\forphp\WEB-INF as following:

<web-app version="2.4" xmlns=""
xmlns:xsi=" "
xsi:schemaLocation=" ">



13. add php path to the system variable named path
14. create phptest.php for testing under jboss\webapps\forphp as following

<?php phpinfo(); ?>

15. startup jboss


can you help me?




Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2012-04-22 20:51 UTC]
PHP 5.2 is not supported anymore. That Java module is not supported anymore. Sorry.
 [2012-04-22 20:51 UTC]
-Status: Open +Status: Not a bug
 [2015-06-16 10:55 UTC] andrewjames085 at gmail dot com
Thanks for nice post.
 [2015-06-17 10:32 UTC] jamesmartin057 at gmail dot com
This page delivers best resource which helps me in my job. I am working in app development company where Professional web application developers USA work in the team. I read this blog weekly and learned many things from here. (
 [2015-07-16 05:20 UTC] marksteve952 at gmail dot com
I was searching this material from last three days and finally i find this bug here. I stuck in my job, I really need to understand the exact solution which i find it here.
 [2015-07-16 05:38 UTC]
-Block user comment: No +Block user comment: Yes
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Feb 25 12:01:27 2024 UTC