Get the App
SLTechnology News&Howtos  ›  Servers  › 

Error prompt on how to turn on PHP under Ubuntu 14.04

Shulou Source: shulou.com Published: 2022-06-01 22:01:10 09月19日 Update

This article mainly explains the error tips on how to open PHP under Ubuntu 14.04. friends who are interested may wish to have a look. The method introduced in this paper is simple, fast and practical. Next, let's let the editor take you to learn the error tips on how to open PHP under Ubuntu 14.04.

Stripped-down steps:

1. Modify php configuration file php.ini

The code is as follows:

Sudo gedit / etc/php5/apache2/php.ini

Change display_errors = Off to display_errors = On

Change error_reporting = xxx to error_reporting = E_ALL | E_STRICT

2. Restart apache

The code is as follows:

Sudo / etc/init.d/apache2 restart

OK! Enjoy it!

Detailed version steps

1. Open the php.ini file.

Take my ubuntu as an example, this file is in the: / etc/php5/apache2 directory.

two。 Search and modify the following line to change the off value to On

The code is as follows:

Display_errors = Off

3. Search for downlink

The code is as follows:

Error_reporting = E_ALL & ~ E_NOTICE

Or search for:

The code is as follows:

Error_reporting = E_ALL & ~ E_DEPRECATED

Modify to

The code is as follows:

Error_reporting = E_ALL | E_STRICT

4. Modify the httpd.conf of Apache

Take my Ubuntu as an example, this file is in the: / etc/apache2/ directory, this is a blank file.

Add the following two lines:

The code is as follows:

Php_flag display_errors on

Php_value error_reporting 2039

5. Restart Apache and you will OK.

Restart command:

The code is as follows:

: sudo / etc/init.d/apache2 restart

At this point, I believe you have a deeper understanding of "error tips on how to open PHP under Ubuntu 14.04". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Tags: Code files errors prompts searches contents steps directories learning utility deeper interests commands practicality practicality simplicity of operation methods more friends blank Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno macOS Shulou Tech Info Huawei MariaDB MySQL