HTTP compression of static content with .htaccess

I was originally using mod_deflate however I had the following issues Content-length was not populated which meant I couldn’t implement an AJAX progress bar Weird error net::ERR_INVALID_CHUNKED_ENCODING on OS X with Chrome on transfers bigger than 1MB – I couldn’t find any other platforms effected by this. Unnecessary server load Things to note. The header… Continue reading HTTP compression of static content with .htaccess

Dreamhost php-cgi use different php.ini per directory

The popular gallery webapp still uses dated short PHP open tags <?, this makes it difficult to deploy in a subdirectory of a site that uses XHTML which requires short_open_tag=off to use &lt?xml… headers, leading to the following error. Parse error: syntax error, unexpected T_STRING in /home/foo/example.com/index.php on line 3 This problem is further complicated… Continue reading Dreamhost php-cgi use different php.ini per directory

HTTP 500s on dreamhost shared hosting

I finally got to the bottom of the occasional HTTP 500 (internal server) errors on weathersupermarket. The apache error log simply contains “premature end of script headers”, which isn’t much help. It turns out on shared hosting servers a background process monitors resource usage (CPU + RAM?) and kills off anything using too much. The… Continue reading HTTP 500s on dreamhost shared hosting