Tomcat running PHP

Source: Internet
Author: User
Tomcat runs PHP XML code in the Tomcat installation directory conf/web.xml The following code comment out of CGI org.apache.catalina.servlets.CGIServlet debug 0 Cgipathprefix web-inf/cgi passshellenvironment True executable E:\Program Files\php\php-cgi.exe 5 cgi/cgi-bin/* The Tomcat installation directory conf/web.xml The following code comment out of the CGI org.apache.catalina.servlets.CGIServlet debug 0 cgipathprefix web-inf/cgi Passshellenvironment true executable E:\Program files\php\php-cgi.exe 5 cgi/cgi-bin/* Java code Server started will prompt for security Java.lang. Security exception said unable to load Org.apache.catalina.servlets.CGIServlet to conf under context.xml change to bottom web-inf/web.xml The server boot will prompt for security Java.lang. Security exception said unable to load Org.apache.catalina.servlets.CGIServlet to conf under context.xml change to bottom web-inf/ Web. XML Java code Create a new CGI directory in your project/web-inf/based on the top web. XML, write a helloworld.php run the Browse http://localhost:8080/project name/cgi-bin/ hello.php, php-cgi's own security anomalies and errors.

This PHP CGI binary is compiled with force-cgi-redirect enabled. This means. A page would only be served up if the Redirect_status CGI variable are set, e.g. via an Apache Action direct Ive.

For more information as-to-behaviour exists, see the Http://php.net/security.cgi-bin ">manual page for CGI sec Urity.

For more information about changing this behaviour or re-enabling this webserver, consult the installation file that came With this distribution, or visit http://php.net/install.windows ">the manual page.

That's what the version.php wrote:

This PHP CGI binary is compiled with force-cgi-redirect enabled. This means. A page would only be served up if the Redirect_status CGI variable are set, e.g. via an Apache Action direct Ive.

For more information as-to-behaviour exists, see the Http://php.net/security.cgi-bin ">manual page for CGI sec Urity.

For more information about changing this behaviour or re-enabling this webserver, consult the installation file that came With this distribution, or visit http://php.net/install.windows ">the manual page.

Workaround php.ini cgi.force_redirect = 1 change to cgi.force_redirect=0 and then restart the server to run. I tested Phpcms in Tomcat run, OK, a bit slow Short_open_tag = On also changed this, forget why changed to on the Short_open_tag specifies whether PHP code can be used to start the abbreviation of the sign is this way My goal is to integrate Discuz this is a discuz Java interface http://code.google.com/p/discuz-ucenter-api-for-java/php CMS garbled problem http:// bbs.phpcms.cn/viewthread.php?tid=110921 Modify the include/common.inc.php file, find the following code: if (GZIP && extension_loaded (' Zlib ') ini_set (' zlib.output_compression ', ' on '); Change ' on ' to ' OFF '
  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.