Home  >  Article  >  Backend Development  >  What to do if Ubuntu’s PHP cannot be compiled

What to do if Ubuntu’s PHP cannot be compiled

藏色散人
藏色散人Original
2021-12-10 10:34:441438browse

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

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

apt-get install php7.0 libapache2-mod-php7.0

You can access the html webpage normally:

What to do if Ubuntu’s PHP cannot be compiled

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

What to do if Ubuntu’s PHP cannot be compiled

Processing: Change the above code to the following

What to do if Ubuntu’s PHP cannot be compiled

.

Or change

What to do if Ubuntu’s 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!

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