HostOnNet Blog

Category Archives: PHP

How to add a phpinfo file in your site to check PHP information

This article describes about creating a phpinfo.php file on your site. You can use a phpinfo() page to view the current PHP information for your server such as: Information about PHP compilation options and extensions PHP version Server information and

PHP Script to verify TLS 1.2

Many payment providers recently moved to more secure SSL protocol TLS 1.2. Many of these providers will sent you mail asking you to make sure your web server support TLS 1.2 Checklist: Preparing for the system upgrade to TLS 1.2

Display Errors in PHP Script

Some web servers have PHP display_errors turned off by default for security reason. This is good for security, but make debug very hard. To display errors in PHP script, add following code to PHP script

PHP execute shell commands with exec

PHP exec command is used to execute system commands. I wanted to run “composer install” on a server with out SSH access. I created following script, uploaded to server.

Install PHP from source for local Development

Install PHP 5.6 on Ubuntu 16.04 Install PHP 5.6 on CentOS 7 Install PHP 7.0 on CentOS 7 Server Display Errors in PHP Script CentOS 7 PHP mail() function not working PHP-FPM Enable PHP-FPM in Nginx on Ubuntu/Debian Useful PHP

Install Composer

Composer is PHP package manager. Something like npm, pip etc.. used by other languages. To install composer, run Install dependency using composer List Installed Packages Update Packages

Find Server Main IP

Many IP scripts require you to white list your sever IP before you can use API. On a server, there can be multiple IP address. But only main IP is used for out going traffic. So you need to find


Installing ioncube on Ubuntu Installing IonCube for cPanel/WHM/Webmail Installing ioncube loader on CentOS

How to remove captcha from WHMCS domain checker

We can disable captcha through Setup > General > Security Tabs will disable captcha globally. But if do this,that will increase the spam support tickets. Follow the stpes if you want to remove captcha only from Domain Checker page( Remove

How to install Apache MySQL and PHP on Cent OS 6.6

Following tutorial describes how to install Apache MySQL and PHP on a Cent OS based server. First we need to identify the version of OS using on the server. For that, login to the server as root user and run