Submitted by mindpiss on Fri, 25/01/2013 - 10:25
Let's say you see recurring error messages in your db log file and you want to try and pinpoint the issue to be able to apply a fix.
So, how do you go about debugging your code?
Well, there are many different ways. You could go old-school and use
var_dump();
or
print_r();
.
Or you could go a step further and use
debug_backtrace();
to try and pinpoint the source of the error.
Submitted by mindpiss on Sat, 12/01/2013 - 13:46
I finally bit the bullet and got myself an unmanaged VPS (Virtual Private Server). The main reason being that my current shared hosting account was just way to slow for certain web apps.
Submitted by mindpiss on Sat, 12/01/2013 - 12:17
Here is the body of a host.deny file from my current host:
Submitted by mindpiss on Thu, 13/12/2012 - 17:19
Ok, so most of you will now have heard that the much used and loved unofficial google weather api has closed for good. In my previous post I mentioned this and gave you a couple of alternatives to use instead.
Now here is a follow up ...
Submitted by mindpiss on Thu, 13/12/2012 - 16:43
So I stumbled across this issue the other day. I usually make sure I save all my files as Encoded as UTF-8 without BOM. But somehow, somewhere there may be a file that was saved incorrectly and thus it will give you a validation error on w3c.
Now, how do you go about finding which file is causing the error? Is it a theme file, or is it a custom module or is it a drupal file which you may have modified (I know, hacking drupal core is BAD!)
The solution is: run a shell script to find the file causing the issue.
Find the BOM files:
Submitted by mindpiss on Mon, 27/08/2012 - 16:03
Anyone using the Google Weather API would have noticed some strange behaviour early last week. Namely some 403 errors - then lastly the response code became 'Unsupported API'
Here is an example:
http://www.google.com/ig/api?hl=de&weather=london
Now one should start using different api's to grab required weather data in widgets or other programs. Some I have had a play around with are:
Submitted by mindpiss on Fri, 10/02/2012 - 13:57
I've called this module 'stadtinfo_subpage'.
It creates a tab menu item, registers a path alias for it and lets you change the template to suit you ..