TOMCAT 6 中的 PHP - 异常 [英] PHP in TOMCAT 6 - Exception

查看:32
本文介绍了TOMCAT 6 中的 PHP - 异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在尝试将 PHP 集成到 APACHE TOMCAT 6 中,方法是针对 问题 在 TOMCAT 6 中运行 PHP 应用程序.我遇到了配置问题.

I have been trying to integrate PHP in APACHE TOMCAT 6 by following second answer for the QUESTION RUN PHP APP IN TOMCAT 6. I am facing troubles with the configuration.

  1. 首先我得到异常 java.lang.UnsatisfiedLinkError: no php5srvlt in java.library.path.我通过将在 step 12 中生成的 php5srvlt.jar 放置在 tomcat\lib 中解决了这个问题.

  1. First I got Exception java.lang.UnsatisfiedLinkError: no php5srvlt in java.library.path. which I resolved by placing php5srvlt.jar, generated in step 12, in tomcat\lib.

在那之后我面对

java.lang.UnsatisfiedLinkError: net.php.servlet.send(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;Z)V
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:723) 

异常.

我试图为此找到解决方案,但只能接近这个问题.但是,我不想再做一次整件事,因为我已经尝试过好几次了.我尝试使用 TOMCAT 8.0.15,但失败了.现在,只是按照我安装了 TOMCAT 6 并尝试集成 PHP 的说明进入接收器.

I tried to find solutions for this but could only get close to this QUESTION. But, I do not want to do the whole thing once again, because I have tried several times. I tried with TOMCAT 8.0.15, but failed. Now, just to go in sink with the instructions I have installed TOMCAT 6 and trying to integrate PHP.

我正在为对 tomcat/webapps/PHP/test.php 提出的请求放置日志文件.

I am placing log file for the request made for tomcat/webapps/PHP/test.php.

LOCALHOST.YYYY-MM-DD.log

Dec 29, 2014 12:15:46 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet php threw exception
java.lang.UnsatisfiedLinkError: net.php.servlet.send(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;Z)V
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:723)
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:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:879)
at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:617)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1778)
at java.lang.Thread.run(Thread.java:744)

TEST.PHP

<?php 
echo "HELLO WORLD";
?>

编辑

我误以为我遇到了问题 1,因为我在 tomcat/lib 中没有 php5srvlt.jar.但是,实际上,problem 1 出现在我启动服务器后第一次请求页面时.后来我看到问题2.

I mistook that I was getting problem 1 because i did not have php5srvlt.jar in tomcat/lib. But, in fact, problem 1 appears when i request the page for the first time after starting the server. and later on I see problem 2.

我从此处 php 和 pecl 版本必须相同,但即使使用相同的版本号,我仍然遇到相同的错误 5.2.5

I've learned from here that php and pecl version must be same, but still I get the same error even after working with same version numbers 5.2.5

推荐答案

错误信息 表示您缺少这种 .. 脆弱装置所需的 .dll 文件.

当应用程序尝试加载本地库(如 Linux 中的 .so、Windows 中的 .dll 或 Mac 中的 .dylib 等本机库但该库不存在时,将引发 UnsatisfiedLinkError.

The UnsatisfiedLinkError is thrown when an application attempts to load a native library like .so in Linux, .dll on Windows or .dylib in Mac and that library does not exist.

但是请 - 重新考虑您实际在做什么.在 Tomcat 中运行 PHP 上下文(几乎)没有充分的理由.

But please - reconsider what you're actually doing. There is (almost) no good reason for running a PHP context inside Tomcat.

这篇关于TOMCAT 6 中的 PHP - 异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆