Install ionCube Loader on a CentOS 7

1. Log in to your CentOS 7 VPS via SSH as user root

# ssh root@IP_Address

and update all installed services

# yum update

2. Run the ‘arch’ command in the terminal to check if your system is 32-bit (i686) or 64-bit (x86_64)

# arch
x86_64

3. In our case the system is 64-bit and we will download the 64-bit version of ionCube Loader

# wget http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz

4. If your system is 32-bit download the following archive

# wget http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86.tar.gz

Read more

Share

PHP Session test Script

I’ve just found a quality script to test php session- unless you’re in dark after some php.ini session tweaking done.

To check if sessions really work you can use this code:

<?php
// Start Session
session_start();
// Show banner
echo '<b>Session Support Checker</b><hr />';
// Check if the page has been reloaded
if(!isset($_GET['reload']) OR $_GET['reload'] != 'true') {
   // Set the message
   $_SESSION['MESSAGE'] = 'Session support enabled!<br />';
   // Give user link to check
   echo '<a href="?reload=true">Click HERE</a> to check for PHP Session Support.<br />';
} else {
   // Check if the message has been carried on in the reload
   if(isset($_SESSION['MESSAGE'])) {
      echo $_SESSION['MESSAGE'];
   } else {
      echo 'Sorry, it appears session support is not enabled, or you PHP version is to old. <a href="?reload=false">Click HERE</a> to go back.<br />';
   }
}
?>
Share

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

Read more

Share

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

Or

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

Or

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

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
Share

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
Share

Ozeki PHP Plugin

<?php
$gatewayURL = 'http://192.168.1.100:9333/ozeki?';
$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
file($url);
?>
Share

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

Share