A quick fix this morning for a client with a drupal issue, mq4 files were opening as plain text in the browser window instead of presenting a download file prompt.
This is due to the server configuration, apache mime-types. It is usually easily fixed in an .htaccess file.
AddType application/octet-stream mq4
If that doesn’t sort the issue after clearing the browser cache, you can also try adding:
<Files *.mq4>
ForceType application/octet-stream
Header set Content-Disposition attachment
</Files>
See also:
Drupal Mime-Types
Apache mod_mime
Apache htaccess directives
Posted in Coding.
Tagged with apache, drupal.
By Leah
– 30/08/2009
First I have to say that I am easily amused. One thing I love most about Twitter is the way it will turn up something in my feed that makes me smile, the more randomly nonsensical it is, the better.
[Read more]
Posted in Web & Internet.
Tagged with blastfromthepast, twitter.
By Leah
– 19/08/2009
Recently I needed to empty the Drupal sessions and cache tables which had grown to some million rows and were causing weekly database errors on a busy health community website.
I searched for a quick way to easily clear the table and found that truncate does the job and the permissions to do this was there even though it was not listed in the options of phpmyadmin.
TRUNCATE TABLE `drupal_sessions`
I also added a Drupal plugin to do database maintenance weekly to prevent this happening again. Sure enough, the site has been behaving and performing much better since, knock on wood.
Posted in Coding.
Tagged with drupal, mysql, phpmyadmin.
By Leah
– 17/08/2009