Hiding Apache and PHP Server Signature

Revealing web server signature with server/PHP version info can be a security risk as you are essentially telling attackers known vulnerabilities of your system. Thus it is recommended you disable all web server signatures as part of server hardening process.signature

Disable Apache Web Server Signature

Disabling Apache web server signature can be achieved by editing Apache config file.

On Debian, Ubuntu or Linux Mint:

$ sudo vi /etc/apache2/apache2.conf

Continue reading “Hiding Apache and PHP Server Signature” »


Remove apache, phpmyadmin etc from ubuntu 16.04

You can remove the packages in Ubuntu by executing the commands:

dpkg --purge phpmyadmin
dpkg --purge mysql-server
dpkg --purge apache2.2-common


You have option also to remove the following packages:

sudo apt-get remove apache2*
sudo apt-get remove phpmyadmin 
sudo apt-get remove mysql-server
sudo apt-get remove php5


sudo apt-get --purge apache2*
sudo apt-get --purge phpmyadmin 
sudo apt-get --purge mysql-server
sudo apt-get --purge php5

Install ioncube on Linux server

  1. Begin by downloading the latest loaders to your computer from http://www.ioncube.com/loaders.php
  2. Extract the contents of the archived file on your local PC to a folder of your choice.
  3. Upload the folder IONCUBE via FTP to your domain webspace
  4. Now establish an SSH connection with server using a suitable client (e.g. Putty for PC’s or Terminal on Mac). This is usually done using the command: SSH rootusername@yourserver.com (you will then be asked for your password).
  5. You will need to browse to the public folder where you uploaded the IONCUBE directory (search internet for change and view directory commands in Unix).
  6. Move the ioncube folder to a permanent location by entering: mv ioncube /usr/local
  7. Next, you need to locate the php.ini file, to do this enter: locate php.ini – You should find it is in /usr/local/lib/php.ini. Now that you know the location of php.ini you need to edit it. pico /usr/local/lib/php.ini
  8. Now find where other zend extentions are in the file: ctrl + w: zend_extension
  9. Paste in your new line for ioncube loader: zend_extension = /usr/local/ioncube/ioncube_loader_lin_x.so (Replace x with your version of PHP eg. 4.4)
  10. Save the changes: ctrl + X then Y and enter
  11. Restart the web server to take effect: /etc/init.d/httpd restart

That’s it! Ioncube should now be installed & working on your server. To verify the installation was successful, check the PHP Info output for your server and you should see a new section which reads:

Additional Modules
Module Name ionCube Loader

Update PHP 5.1 to PHP 5.4 in CentOS


Update Yum repos
For 32 bit CentOS-
For 64 bit CentOS-
rpm -Uvh remi-release-5*.rpm epel-release-5*.rpm
Now it’s time to update our PHP to the latest one
yum –enablerepo=remi update php php-*
/etc/init.d/httpd restart
And that’s it!
You can check your installed PHP version executing:
php -v

Ozeki PHP Plugin

$gatewayURL = '';
$request = 'login=sendmail';
$request .= '&password=mypassword';
$request .= '&action=sendMessage';
$request .= '&messageType=SMS:TEXT';
$request .= '&recepient='.urlencode('01711673093');
$request .= '&messageData='.urlencode("PHP Hello World");

$url = $gatewayURL . $request;

//Open the URL to send the message

Update PHP 5.4 on Debian 6 Squeeze

Set up Dotdeb

First add Dotdeb to your Apt sources:

sudo vim /etc/apt/sources.list
deb http://packages.dotdeb.org squeeze all
deb-src http://packages.dotdeb.org squeeze all
deb http://packages.dotdeb.org squeeze-php54 all
deb-src http://packages.dotdeb.org squeeze-php54 all

Save & Exit. Now go for the next- Continue reading “Update PHP 5.4 on Debian 6 Squeeze” »


Install Phalcon framework in Debain 6/7

This repo can be used additionally to the squeeze-php54 repo of dotdeb.org.

Add the following into /etc/apt/sources.list

deb http://debrepo.frbit.com/ frbit-squeeze main

Add the key, update apt and install packages

wget -O – http://debrepo.frbit.com/frbit.gpg | sudo apt-key add –
aptitude update
aptitude install php5-igbinary php5-mongo php5-oauth php5-phalcon php5-runkit php5-stats php5-stomp php5-yaf php5-yaml


PHP enable error reporting

You can set PHP error reporting on in php.ini file (in case you have access to this file). Set the following lines:

error_reporting = E_ALL
display_errors = On

If you have no access to php.ini file but you can modify .htaccess file on your server (in root of your public_hml folder – your Joomla! site), try to add the following code there (on some servers this option is disabled, so you need to ask your webhosting operator):

# Displaying PHP errors
php_flag display_errors on
php_value error_reporting 6143