Using phpinfo to Display Info (Including Version Number) of your php (Linux)

An easy and quick way to find out what php version your apache server is using is to use the phpinfo() function. To do this we will create a file with <?php phpinfo() ?> in it and access it through our server by opening it in a browser. Deciding Where to Put the PHP File…

Installing Different Versions of php Using yum on Linux (CentOS 6)

I will be installing the yum default version of php. Check You Don’t Have php Installed [ahmed@amayem ~]$ rpm -q php package php is not installed Or [ahmed@amayem ~]$ yum list installed | grep php [ahmed@amayem ~]$ We don’t have php installed let’s check what is available: Checking Available php Packages in Default yum Repositories…

Viewing the Apache Modules Available on your Disk (Linux (CentOS 6))

If you wish to see the Apache modules available on your disk, perhaps to see the spelling when modifying the httpd.conf, then go to the following directory: [ahmed@amayem ~]$ cd /etc/httpd/ [ahmed@amayem httpd]$ ls conf conf.d logs modules run The modules directory is what we are after: [ahmed@amayem httpd]$ cd modules [ahmed@amayem modules]$ ls libphp5.so…

Installing Latest Version of MySQL on Linux (CentOS 6) Production Server

Checking if MySQL is Already Installed [ahmed@amayem ~]$ rpm -q mysql-server package mysql-server is not installed Or you can do it this way: [ahmed@amayem ~]$ yum list installed | grep mysql [ahmed@amayem ~]$ Downloading the MySQL Yum Repository Release Package: Choose your operating system from http://dev.mysql.com/downloads/repo/yum/ In my case it was CentOS 6, which means…

Solving the Mystery of the Regular Expression Special Operator Star * Not Matching Anything (Matching the Null String)

When using regular expressions the * special operator is very useful. An expression followed by * matches a sequence of 0 or more matches of the expression. When the whole expression is followed by a * we get some intersting behaviour that people may not have expected. We will explore such behaviour in this post.…