Daily Archives: May 30, 2010

Hotlink protection: How-To prevent people from stealing your images

Create an .htaccess file in your public_html directory with the following code: RewriteEngine on RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http://(www.)?domain.com.*$ [NC] RewriteRule .(gif|jpg)$ – [F] Where domain.com is your domain.

Repairing corrupted mysql database

Please follow the following steps to repair the database:Login to server with root access Stop mysql using following command /etc/init.d/mysql stop Run following command to check all teh tables in teh database

Child pid xxx exit signal Segmentation fault (11)

Sometimes apache is crashing and all or some PHP pages are showing blank when you browse it. Also apache error logs shows following errors. ==================================== [Thu May 13 03:11:03 2010] [notice] child

Maximum file limit reach while starting Apache

To fix this error, Login to shell using root and make the following changes. root@shameer[~]#nano /etc/sysctl.conf Add following line as fs.file-max = 22992 Then run following command from shell to active changes.

Private PHP Error Logging by using .htaccess file

To enable private PHP error logging, First disable PHP errors. To do it, add following lines into .htaccess file. # Disable php errors php_flag display_startup_errors off php_flag display_errors off php_flag html_errors off