Disabling debug messages
The Ubuntu Server is a popular, free, and open source Linux distribution that we can use to quickly set up a LAMP (Linux, Apache, MySQL, PHP) stack. The ease of installation and long-term support of Ubuntu Server makes it a popular choice among PHP developers. With a clean server installation, we can get the LAMP stack up and running just by executing the following commands:
sudo apt-get update && sudo apt-get upgrade sudo apt-get install lamp-server^
Once these are done, visiting our external server IP address, we should see an Apache page, as shown in the following screenshot:
The HTML we are seeing in the browser originates from the /var/www/html/index.html
file. After replacing index.html
with index.php
, we're good to play with the PHP code.
The reason for this Ubuntu Server-like introduction is to emphasize certain server defaults. Out of all configuration directives, we should never blindly accept defaults for error logging and error displaying directives...