HostOnNet Blog

Category Archives: PHP

Install PHP 5.5 on Ubuntu 12.x

To install PHP 5.5.x on Ubuntu, add PPA To install PHP 5, run For updating existing version of PHP, run PHP Version before upgrade After Upgrade XCache is exta, i installed it with After PHP Upgrade.


PHP Fatal error: Class ‘DOMDocument’ not found in LocalisationCache.php

While install MediaWiki 1.20.4, i got error PHP Fatal error: Class ‘DOMDocument’ not found in LocalisationCache.php This is because PHP is not compiled with XML support, to fix install php-xml package. [root@lin wiki]# yum install php-xml Loaded plugins: fastestmirror, presto


phpmyadmin auto login

Install phpMyAdmin in RHEL/CentOS/Ubuntu/Debian To set phpmyadmin to auto login, edit config.inc.php Find $cfg[‘Servers’][$i][‘auth_type’] = ‘cookie’; Replace with $cfg[‘Servers’][$i][‘auth_type’] = ‘config’; Find $cfg[‘Servers’][$i][‘host’] = ‘localhost’; Add Below $cfg[‘Servers’][$i][‘user’] = ‘root’; $cfg[‘Servers’][$i][‘password’] = ‘YOUR_MYSQL_ROOT_PW_HERE’;


PHP Errors to File

To log all PHP Errors to log file, edit php.ini file, add error_log = /var/log/php-errors.log To turn off displaying errors to browser, change value of display_errors to Off display_errors = Off


Develop Java Project in ZendStudio

I recently started doing some small java projects. I have installed Eclipse/intelliJ. I prefer Eclipse as it compile program on saving. Since my project contains many independent programs i like this feature. I am already using ZendStudio 8. This is


Hide X-Powered-By: PHP

On a web site, HTTP headers show PHP version like X-Powered-By: PHP/5.1.6 [root@server12 ~]# curl -I http://netfree.netfreehost.com HTTP/1.1 200 OK Server: nginx/1.1.0 Date: Sun, 11 Sep 2011 20:00:40 GMT Content-Type: text/html Connection: keep-alive X-Powered-By: PHP/5.1.6 Cache-Control: no-cache, pre-check=0, post-check=0 Expires:


Installing ioncube loader on CentOS

Download latest Ioncube loader for your OS from http://www.ioncube.com/loaders.php For CentOS 64 bit I coped ioncube_loader_lin_5.2.so as PHP version installed on the server was PHP 5.2 Now edit php.ini file. To find location of php.ini, run In my case, php.ini


PHP function to find file extension

To find file extension with PHP, use pathinfo function


PHP Tutorial Day 1

To run PHP programs you need a web server installed on your computer. For windows, it is better install Zend Server Community edition. Once you installed, you can start creating php programs. You need to upload Programs to DocumentRoot of


Can’t connect to local MySQL server through socket

While running symfony jobeet tutorial, i got following error This is fixed by editing config/databases.yaml Find line Replace with