Home  >  Article  >  Backend Development  >  Can php use tomcat?

Can php use tomcat?

藏色散人
藏色散人Original
2019-10-12 10:45:343768browse

Can php use tomcat?

Can php use tomcat?

php can run on tomcat, but it requires a little configuration

Extract php to the root directory of tomcat and change the folder name to php

Add the path where php.exe is located to path.

● Make a copy of php.ini-development. Rename php.ini

Open extension_dir = "ext" option

● Modify cgi.force_redirect to cgi.force_redirect = 0

● Modify tomcat/conf/context. xml file

● Add the privileged="true" attribute to ea5df8e8cd78341fd0bad01213e99e64, that is: 5a32ba8bcef76182973dfb83a83efd6f

● In 8459cedd22f378aa35db2cd2b63decac Join


php
org.apache.catalina.servlets.CGIServlet

clientInputTimeout
200


debug
0


executable
D:\tomcat\php\php-cgi.exe


passShellEnvironment
true


cgiPathPrefix
WEB-INF/phpbin

5
 
php
/phpbin/*

Restart tomcat service:

Create a new phpbin folder under webapps\ROOT\WEB-INF

Create a new index.php below

 

For more PHP related knowledge, please visit PHP Chinese website!

The above is the detailed content of Can php use tomcat?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn