Home >Backend Development >PHP Problem >What should I do if apache cannot parse php?

What should I do if apache cannot parse php?

藏色散人
藏色散人Original
2021-03-25 09:14:314739browse

The solution to the problem that Apache cannot parse PHP: first create a new PHP web page file in the htdocs directory; then find the "httpd.conf" file and configure it; finally configure and set the PHP suffix file.

What should I do if apache cannot parse php?

The operating environment of this article: windows7 system, PHP7.1 version, DELL G3 computer

apache After php is installed, Apache starts normally, but cannot Parse PHP and can parse html. The HTTP 404 on the web page is caused by a setting error. The solution is;

1. In the apache installation directory, there is an htdocs directory. Now, we create a simple php web page file in this directory.

What should I do if apache cannot parse php?

#2. "Browse" the php web page file in the browser. As a result, the content of the php file is displayed, and php is not running.

What should I do if apache cannot parse php?

[Recommended learning: PHP video tutorial]

3. Apache needs to be configured to call "php language module (engine) "To execute the php code. Apache's main configuration file httpd.conf is required, and its location is: apache installation directory/conf/httpd.conf.

What should I do if apache cannot parse php?

4. Find the location of "Load Module": and add this line at the last position of this series of LoadModules: "LoadModule actions_module modules/mod_actions.so ", Among the module files in the php5 language package, the php5 language module name is a fixed name, which is: php5_module, php5 language package.

What should I do if apache cannot parse php?

5. At the end of the apache configuration file, write: LoadModul php5_module "H:/amp/php/php5apache2_2.dll".

What should I do if apache cannot parse php?

#6. Start a new line to set the file with php suffix, which will be executed by this php language module. "AddType application/x-httpd-php .php".

What should I do if apache cannot parse php?

The above is the detailed content of What should I do if apache cannot parse php?. 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