Home > Backend Development > PHP Problem > What to do if Ubuntu's PHP cannot be compiled

What to do if Ubuntu's PHP cannot be compiled

藏色散人
Release: 2023-03-14 12:10:02
Original
1644 people have browsed it

Solution to the problem that Ubuntu's PHP cannot be compiled: 1. Execute "apt-get install apache"; 2. Install PHP through "apt-get install php7.0 libapache2-mod-php7.0"; 3. Just modify the php configuration file.

What to do if Ubuntu's PHP cannot be compiled

The operating environment of this article: ubuntu 16.04 system, php7.0 version, Dell G3 computer.

What should I do if php on Ubuntu cannot be compiled?

ubuntu16.04 php cannot be parsed normally

Install apache2:

apt-get install apache2
Copy after login

Install php7.0 libapache2-mod-php7. 0:

apt-get install php7.0 libapache2-mod-php7.0
Copy after login

You can access the html webpage normally:

What to do if Ubuntus PHP cannot be compiled

But you cannot open the php file. The php file is written as follows:

What to do if Ubuntus PHP cannot be compiled

Processing: Change the above code to the following

What to do if Ubuntus PHP cannot be compiled

.

Or change

What to do if Ubuntus PHP cannot be compiled

Off in the php configuration file to On.

Recommended learning: "PHP Video Tutorial"

The above is the detailed content of What to do if Ubuntu's PHP cannot be compiled. 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