HostOnNet Blog

Author Archives: admin

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


Password Protect a Folder with .htaccess

To password protect a folder in Apache, create a password file [root@server12 ~]# htpasswd -c /path/to/.htpasswd admin New password: Re-type new password: Adding password for user admin [root@server12 ~]# This is create a password with user user “admin”. This file


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


pre style for wordpress

Edit style.css, add following at the end


Using host command

host command is used for dns lookup To see MX records used by hostonnet.com, run Example To see MX and A records, run Example


Missing Dependency: libjpeg.so.62 is needed by package xulrunner-1.9.2.22-1.el5_7.i386 (updates)

On a cpanel sever, when running yum update, i get following error xulrunner-1.9.2.22-1.el5_7.i386 from updates has depsolving problems –> Missing Dependency: libjpeg.so.62 is needed by package xulrunner-1.9.2.22-1.el5_7.i386 (updates) ghostscript-8.70-6.el5_7.3.i386 from updates has depsolving problems –> Missing Dependency: libjpeg.so.62 is needed


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:


Host X is blocked because of many connection errors; unblock with ‘mysqladmin flush-hosts’

I got following error in a PHP Application Warning: mysql_connect() [function.mysql-connect]: Host ‘server10.hosthat.com’ is blocked because of many connection errors; unblock with ‘mysqladmin flush-hosts’ in /home/hon/public_html/cp/admin/approve.php on line 6 Unable to connect to mysql server This is because MySQL server


Disable Unused Apache Modules

On server12 Apache installation, i commented out following modules, that is not required for web server. #LoadModule ldap_module modules/mod_ldap.so #LoadModule authnz_ldap_module modules/mod_authnz_ldap.so #LoadModule dav_module modules/mod_dav.so #LoadModule status_module modules/mod_status.so #LoadModule info_module modules/mod_info.so #LoadModule dav_fs_module modules/mod_dav_fs.so #LoadModule vhost_alias_module modules/mod_vhost_alias.so #LoadModule userdir_module modules/mod_userdir.so


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