What should I do if php cannot execute python?

藏色散人
Release: 2023-03-09 22:24:02
Original
2531 people have browsed it

The solution to the problem that php cannot execute python: first find and open the php-fpm.conf file; then modify the user and group of php-fpm.conf to root.

What should I do if php cannot execute python?

The operating environment of this article: Windows7 system, PHP7.1&&python3.5 version, DELL G3 computer

php cannot execute python?

To use php to execute the python command, I found that the command line can output the results normally, but the browser cannot output the results.

After adding 2>&1 after the command and printing the error message, we found that there was a permission error when importing the third-party library.

So I modified the user and group of php-fpm.conf to root and successfully solved it.

Note that php-fpm cannot be run as the root user by default, but it can be run with the -R parameter.

Recommended learning: "PHP Video Tutorial"

The above is the detailed content of What should I do if php cannot execute python?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template