我正在尝试在过去的一天中设置php-java桥,但无法弄清楚什么不起作用。
我在Debian上运行Apache2和Tomcat7
JSP服务器页面work fine。 但PHP页面produce an error。
我目前正在/var/lib/tomcat7/webapps/JavaBridge
中运行,其中包含:test.php和WEB-INF
WEB-INF / web.xml包含:
<!-- the following 8 lines extend the servlet spec 2.2 "url-pattern" to handle P$
<filter>
<filter-name>PhpCGIFilter</filter-name>
<filter-class>php.java.servlet.PhpCGIFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>PhpCGIFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<!-- the following adds the JSR223 listener. Remove it if you don't want to use $
<listener>
<listener-class>php.java.servlet.ContextLoaderListener</listener-class>
</listener>
<!-- the back end for external (console, Apache/IIS-) PHP scripts; remove it if $
<servlet>
<servlet-name>PhpJavaServlet</servlet-name>
<servlet-class>php.java.servlet.PhpJavaServlet</servlet-class>
</servlet>
<!-- runs PHP scripts in this web app; remove it if you don't need this -->
<servlet>
<servlet-name>PhpCGIServlet</servlet-name>
<servlet-class>php.java.servlet.fastcgi.FastCGIServlet</servlet-class>
<load-on-startup>0</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>PhpJavaServlet</servlet-name>
<url-pattern>*.phpjavabridge</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>PhpCGIServlet</servlet-name>
<url-pattern>*.php</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.php</welcome-file>
</welcome-file-list>
我安装了php-cgi并安装了fastcgi(php5.fcgi,libapache2-mod-fastcgi)
为什么我不能运行PHP页面?