PHP

Short tutorials for installing and configuring PHP on a Linux server and programming in PHP

How to Log PHP Errors and Warnings

You don’t want to keep the debug mode enabled to display the errors and warnings on your website but still want to see what you’re missing? Or maybe just want to write some info to a log for debugging purposes?…

Change Active Version of PHP

If you have several version of PHP installed, you can switch between them at anytime. To change between them you use the update-alternatives command which will display available versions and let you choose which one you want active.

Install PHP 8 on Ubuntu 20.04

In Ubuntu 20.04 the standard version of PHP is 7.4. You might want to install the newest version which is 8.0 (as of April 2021). Before installing it, you need to update your repository to get the packages: Now let’s…

Change PHP Upload Size

To change the PHP maximum upload size, you need to edit the php.ini file and then restart the webserver. Depending on your Linux distribution, the php.ini will be located at a different location:CentOS / Red Hat: / Debian: …

Install PHP 7 on Ubuntu 20.04

If you have a server, you probably want to install PHP.A while ago I thought PHP is really primitive (I only used Java/JSP) but WordPress has changed that forever. Install PHP and PHP MySQL library (you will probably need it)…