How to Get the Details About Your PHP Installation on CentOS 5/CentOS 6/RHEL 5/RHEL 6

In this post, i will show on how to get the details about your PHP installation. This steps has been tested on CentOS 5.7, but it may working on CentOS 5.1, CentOS 5.2, CentOS 5.4, CentOS 5.5, CentOS 5.6, Red Hat Enterprise Linux 5 (RHEL 5) and Red Hat Enterprise Linux 6 (RHEL 6). Assumed that the document root of the default web site on apache httpd server is /var/www/html. Follow the following steps :

1. Create a small PHP file (info.php) in that document root directory :

[root@CentOS57 ~]# vi /var/www/html/info.php

2. Insert this in info.php :

<?php
phpinfo();
?>

3. Navigate the following URL on your browser :
As an example :
http://192.168.1.45/info.php

How to Install wget on CentOS 6.2

If your CentOS 6.2 server has been installed with minimal installation, wget command will not exist. Wget is a free network utility for linux to download files from the Web. Therefore, there is simple step to install the wget command utility into your CentOS 6.2 server.

Symptom/error message:

    [root@centos6 ~]# wget http://prdownloads.sourceforge.net/webadmin/webmin-1.570-1.noarch.rpm
    bash: wget: command not found
    

Install wget using yum install command:

    [root@centos6 ~]# yum install wget
    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile
     * base: mirror.issp.co.th
     * extras: mirror.yourconnect.com
     * updates: mirror.yourconnect.com
    base                                                                     | 3.7 kB     00:00
    extras                                                                   | 3.5 kB     00:00
    updates                                                                  | 3.5 kB     00:00
    Setting up Install Process
    Resolving Dependencies
    --> Running transaction check
    ---> Package wget.i686 0:1.12-1.4.el6 will be installed
    --> Finished Dependency Resolution
    
    Dependencies Resolved
    
    ================================================================================================
     Package             Arch                Version                      Repository           Size
    ================================================================================================
    Installing:
     wget                i686                1.12-1.4.el6                 base                481 k
    
    Transaction Summary
    ================================================================================================
    Install       1 Package(s)
    
    Total download size: 481 k
    Installed size: 1.8 M
    Is this ok [y/N]: y
    Downloading Packages:
    wget-1.12-1.4.el6.i686.rpm                                               | 481 kB     00:04
    warning: rpmts_HdrFromFdno: Header V3 RSA/SHA256 Signature, key ID c105b9de: NOKEY
    Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
    Importing GPG key 0xC105B9DE:
     Userid : CentOS-6 Key (CentOS 6 Official Signing Key) 
     Package: centos-release-6-2.el6.centos.7.i686 (@anaconda-CentOS-201112130233.i386/6.2)
     From   : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
    Is this ok [y/N]: y
    Running rpm_check_debug
    Running Transaction Test
    Transaction Test Succeeded
    Running Transaction
    Warning: RPMDB altered outside of yum.
      Installing : wget-1.12-1.4.el6.i686                                                       1/1
    
    Installed:
      wget.i686 0:1.12-1.4.el6
    
    Complete!