Home >Backend Development >PHP Problem >What should I do if the linux php script does not run?

What should I do if the linux php script does not run?

藏色散人
藏色散人Original
2020-08-17 09:36:372140browse

The reason why the linux php script does not run is because Apache does not load the php parsing module file. The solution is to add the code "LoadModule php5_module modules/libphp5.so" to httpd.conf.

What should I do if the linux php script does not run?

Recommendation: "PHP Video Tutorial"

The problem of PHP code not executing or parsing under Linux

The reason is: Apache does not load the php parsing module file

Add the following sentences to httpd.conf:

AddType application/x-httpd-php .php
LoadModule php5_module modules/libphp5.so
<IfModule mod_php5.c>
     AddType application/x-httpd-php .php
     AddType application/x-httpd-php-source .phps
</IfModule>

The above is the detailed content of What should I do if the linux php script does not run?. 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