Webalizer not working on Ubuntu

One of my Ubuntu based VPS had Webalizer installed to collect stats from webserver but it was not working because I could see not stats at /webalizer/. If thats the case with you try the following

1) Try running the webalizer crontab

root@backups:~# /etc/cron.daily/webalizer
Error Opening file /usr/share/GeoIP/GeoIP.dat

So we have identified the culprit that geoip-database is not installed.

2) Fix this by installing geoip-database

root@backups:~# apt-get install geoip-database

Continue reading

package-cleanup: command not found

I tried to do package-cleanup and found this

root@ns1 [~]# package-cleanup --problems
-bash: package-cleanup: command not found

If I was on Ubuntu, I would have done “apt-get install package-cleanup” but it does not work that way on CentOS, its actually available in yum-utils package, install it by typing

yum install yum-utils

Enjoy!!

Freshclam daemon not running

Normally, I have two things on every Linux box so that I know whats going on

  1. NAGIOS monitoring (nrpe)
  2. Logwatch

Today, I got something in my logwatch email and it was strange because just the other day, I upgraded the clamav to latest version using epel reo.

 --------------------- clam-update Begin ------------------------

 The ClamAV update process (freshclam daemon) was not running!
 If you no longer wish to run freshclam, deleting the freshclam.log
 file will suppress this error message.

 ---------------------- clam-update End -------------------------

It appears that the latest version has some permission issues on the log file because when I try to run freshclam on command line I get this

root@cpanel [~]# freshclam
ERROR: Can't open /var/log/clamav/freshclam.log in append mode (check permissions!).
ERROR: Problem with internal logger (UpdateLogFile = /var/log/clamav/freshclam.log).

The solution?

The solution is very simple 🙂 just do the following

touch /var/log/clamav/freshclam.log
chown clamav /var/log/clamav/freshclam.log
chmod 666 /var/log/clamav/freshclam.log

and after that, run freshclam (the service that updates the virus-definition for clamav)

root@cpanel [~]# freshclam

Ubuntu – Unable to load dynamic library ‘/usr/lib/php5/20090626+lfs/sqlite.so’

The other day, I was getting this weird error

PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626+lfs/sqlite.so' - /usr/lib/php5/20090626+lfs/sqlite.so: cannot open shared object file: No such file or directory in Unknown on line 0

Fix it by doing this

root@beta:~# rm -fr /etc/php5/conf.d/sqlite.ini

Because this extension does not exist, you can verify it by running this, you will see that there is already sqlite3.ini file there

root@beta:~# ls -lh /usr/lib/php5/20090626+lfs/ | grep sqlite

EasyPaisa Pakistan website showing SQL query

Go to EasyPaisa Pakistan and go to EasyPaisa Shop –> Find an Easypaisa Merchant and once you are there, search for something and hit “Submit”

Telenor EasyPaisa "Find an Easypaisa Merchant" search form

Telenor EasyPaisa "Find an Easypaisa Merchant" search form

On the new page with listing, select Control+A or highlight the page with a mouse to see a “debug info” SQL query right there in white text. I really do wish someone does not use the info to plan an SQL injunction

Telenor EasyPaisa "Find an Easypaisa Merchant" search results with SQL query shown on page

Telenor EasyPaisa "Find an Easypaisa Merchant" search results with SQL query shown on page

FULL VIEW - Telenor EasyPaisa "Find an Easypaisa Merchant" search results with SQL query shown on page

FULL VIEW - Telenor EasyPaisa "Find an Easypaisa Merchant" search results with SQL query shown on page