Interstella5555 Posted September 1, 2009 Share Posted September 1, 2009 I am having an issue with my Apache Tomcat server and PHP. Basically, if I have a project such as "http://localhost:8080/phpprojects/test/PhpProject1/index.php" that works, and I edit the path to be incorrect, such as "http://localhost:8080/phpprojects/wrongpath/PhpProject1/index.php" and try requesting that path, Tomcat goes down and the user gets a message saying: type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception java.io.IOException: net.php.servlet.send(Native Method) net.php.servlet.service(servlet.java:190) net.php.servlet.service(servlet.java:214) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) note The full stack trace of the root cause is available in the Apache Tomcat/6.0.18 logs. This only happens when it tries finding a resource that doesn't exist inside the root PHP project folder (the one with META-INF and WEB-INF). So if the typo is with "phpprojects" in the path, then the error message will simply be that the requested resource is not available and it will not crash the server. If anyone has any idea of how to fix it or simply prevent apache from crashing, that would be great. Any input would be a great help. Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/172758-wrong-url-crashes-apache-tomcat/ Share on other sites More sharing options...
corbin Posted September 2, 2009 Share Posted September 2, 2009 In Java an uncaught exception causes program termination. Something is throwing an exception, and nothing is catching it. (Looks like you need to look farther back in the stack trace than what is shown to find it.) Quote Link to comment https://forums.phpfreaks.com/topic/172758-wrong-url-crashes-apache-tomcat/#findComment-910674 Share on other sites More sharing options...
Interstella5555 Posted September 2, 2009 Author Share Posted September 2, 2009 Thanks for the response. I checked my stack trace and this is what I found. Here is the full log for this exception: Sep 2, 2009 9:36:08 AM org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet php threw exception java.io.IOException: at net.php.servlet.send(Native Method) at net.php.servlet.service(servlet.java:190) at net.php.servlet.service(servlet.java:214) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:857) at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:565) at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1509) at java.lang.Thread.run(Unknown Source) SEVERE: Servlet.service() for servlet php threw exception What would I have to do to prevent this exception from being thrown, or to have something handle this exception? Again, thanks for the reply. Quote Link to comment https://forums.phpfreaks.com/topic/172758-wrong-url-crashes-apache-tomcat/#findComment-910981 Share on other sites More sharing options...
Interstella5555 Posted September 3, 2009 Author Share Posted September 3, 2009 I tried upgrading PHP to 5.2.10 but the problem persisted. If anyone can make anything out of my stack trace, it would help me out a lot. I've looked online quite a bit and have not found any type of solution that will help me. Quote Link to comment https://forums.phpfreaks.com/topic/172758-wrong-url-crashes-apache-tomcat/#findComment-911845 Share on other sites More sharing options...
corbin Posted September 3, 2009 Share Posted September 3, 2009 at net.php.servlet.send(Native Method) Well, what happened was an exception was thrown during a call to what was probably an OS level function. I've had that happen before in Java applications I've written when I haven't handled correctly checking if the end client has severed the connection. (Lots of other things can cause it too though.) Unfortunately I'm not much help though because to be honest, I have no idea how to fix it. Quote Link to comment https://forums.phpfreaks.com/topic/172758-wrong-url-crashes-apache-tomcat/#findComment-912059 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.