Category Archives: PHP

PHP GeoIP: Required database not available at /usr/share/GeoIP/GeoIP.dat

This error is most likely caused by you missing the GeoIP.dat file. Simply download it from Maxmind.com and place it in /usr/share/GeoIP/ (or another path if that is the case) cd /usr/share/GeoIP/ wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz gunzip  GeoIP.dat.gz And that should be … Continue reading

Posted in PHP | Tagged | Leave a comment

sh: phpize: not found

When using pecl, or something else that require phpize, you may get a warning saying that phpize is not found, even when you have PHP installed on your server.  In order to use phpize you need to install the PHP … Continue reading

Posted in PHP, Ubuntu | Tagged , | Leave a comment

Wonder how many would like that PHP function

Oh, and yes. It is fake, something i made last year.

Posted in Development, PHP | Tagged , | Leave a comment

A lesson in PHP stupidity

1:  post_max_size >= 2GB makes PHP overflow, resulting in a negative post_max_size: “POST Content-Length of 0 bytes exceeds the limit of -2147483648 bytes” 2: defining post_max_size (etc) with MB instead of M causes PHP to only read the last character, … Continue reading

Posted in PHP | Tagged | Leave a comment

Display clock each 10 minutes x times forward in PHP

Here is a simple code PHP snippet to display the clock each 10 minutes x times in the format of: php5 test.php 20:40 20:50 21:00 21:10 21:20 21:30 21:40 Etc. <?php $j = 0; for($i=0;$i<10;$i+=1) { $j += (10*60); $hour … Continue reading

Posted in PHP | Tagged , , , | 1 Comment