Stefan Kecskes

Never stop learning, because life never stops teaching

PHP Modules

Php modules or extensions are pieces of code for PHP, which extends the basic functions and add or improve the existing functions. Some of them are already bundled with PHP and can be easily enabled or disabled. There are also external PHP modules which can be installed to system and then enabled in PHP. Even though you now have installed the PHP you still may come across some issues. Some of the frameworks or libraries will possibly need use of some module which wasn’t added to php.

Apache Modules

Apache modules Apache modules are software components that enhance the functionality and capabilities of the Apache HTTP Server. These modules are designed to extend and customize the server’s core features, allowing administrators and developers to add additional functionalities as per their requirements. Apache modules can be classified into two main categories: core modules and third-party modules. Although each module started as 3rd party module until it was accepted into core modules.

Setup Virtual Host

Create Virtual Host conf Today we will be creating virtual host on Apache2 web server. As one Apache2 web server can serve multiple websites we can later add more configs and tell Apache2 web server to serve all the websites from single unix instance. I will assume that the name of our webserver is website.dev First create a config file: sudo nano /etc/apache2/conf.d/sites-available/website.dev.conf and paste the following configuration into that config file.

Edit crontab with NANO

What is cron? I often need to add some scheduled job on server. I mean something that runs periodically, like every day or every hour. You simply add a command that will run as scheduled and when I say command it can be anything that your system is capable of running. Therefore, it can be shell command or script or even an java application. But let’s look closer how could we set up our own cron task on linux.

Installing Composer.phar

What is composer? Now we don’t have to reinvent wheel, we can select the tyre, the rim, the gauge. Same way in PHP we don’t have to write everything from scratch but we use Composer will give us these components so that they will work together without compatibility issues. Composer is the dependency manager for PHP. That means that chunks of php code, which are tested and each package solves one some problem are packed into a packages and added to packagist repository.