Category Archives: Development
HttpClient: Target host must not be null, or set in parameters
If you have the following code failing: HttpGet httpget = new HttpGet(“www.host.com”); Then the error is pretty easy to solve: The problem is that you have not added a protocol to the URL, so change it to: HttpGet httpget = … Continue reading
java.util.concurrent.CopyOnWriteArrayList not found in java.net.URLClassLoader
Simply said: You are most likely trying to run a java app on a too old version of Java, try upgrading to java 1.6 and see if that helps.
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
java.io.FileNotFoundException: no segments* file found (Solr)
You will receive that error from Solr when you (for example) have removed the index data, but not the index folder itself. Simply remote the folder that are supposed to contain the index data, and Solr will then recreate the … Continue reading
The hierarchy of the type Foo is inconsistent
You can get the error: The hierarchy of the type *classname* is inconsistent If you are trying to compile a class that requires another class not available. Normally due to compilation errors in the dependent classes. So fix the classes … Continue reading
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
The markup declarations contained or pointed to by the document type declaration must be well-formed.
This error is caused by the DTD file not being valid. You have most likely created a DTD-file containing: <!DOCTYPE…. [ ... ]> Simply remove the first and last line delcaring the DTD data, since those are only to be … Continue reading
Wonder how many would like that PHP function
Oh, and yes. It is fake, something i made last year.
Simple Apache trick to increase Google Speed Test score
Google Speed Test will (unless set up) complain if you have not set up images to take use of browser caching. To get the browser to start caching static content you can add the following to your Apache vhost file: … Continue reading
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