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

What should I do if apache2 cannot parse php?

藏色散人
Release: 2023-03-17 21:30:02
Original
4153 people have browsed it

The solution to the problem that apache2 cannot parse php: 1. Install the lib file through "sudo apt-get install libapache2-mod-php7.4"; 2. Modify the configuration file and go to "require" in "set handler" all denied" to "granted"; 3. Restart apche2.

What should I do if apache2 cannot parse php?

The operating environment of this tutorial: linux5.9.8 system, php7.4 version, DELL G3 computer

Why apache2 cannot parse php manage?

apache2 does not parse php under linux

Before installing the web environment in kali or ubuntu

apache2 can run normally. But it just can’t parse php

The following are the solutions

1. Install the lib file

sudo apt-get install libapache2-mod-php7.4
Copy after login

Just keep the big version consistent

2.Modify the configuration file

cd /etc/apache2/mods-enabled
sudo vim php7.4.conf  这个地方改成你对应的版本
Copy after login

What should I do if apache2 cannot parse php?

In the set handler, the require all denied is changed to granted

and the following php|ar string of regular rules is also changed to granted

Then restart apche2

and it will be fine.

Recommended learning: "PHP Video Tutorial"

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

Related labels:
php
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