I’m very thankful for the internet. Actually, if it weren’t for the very existence of the internet… I suppose I wouldn’t encounter half the challenges and problems that I do…. in code of course.

I come from a Web development background and for the better part of the last 9 years I’ve spent countless hours reading through ColdFusion code (mostly). In 2010 so far, almost every job I’ve done has involved PHP in some form or another. If it was adding a feature to a previously coded site.. or building a site from scratch (it was direct requirements!)…. this year it’s been PHP.

I’ve been learning in 2010. On many levels actually.

So here I am reading through drupal code, learning how things are organized and where methods are calling other methods… still getting familiar with reading the code. I programmed a plugin for a Drupal module and everything was going well. Then after adding some processing to a form with file upload I had a problem. After submitting the form, it was a blank screen.

Great!” – is what I was thinking.

One thing I totally loved about ColdFusion was the debugging information that you could easily get. In development it really helped pinpoint exactly at what point in the code the problem lied.

So…. did some research. A week seems to always have hours devoted to the act of “googling”…. I’m not sure if there’s anything, some library that can be added to a PHP installation that would give all the goodies that ColdFusion would show for debugging purposes… as previously mentioned.. I’m a bit less knowledgeable in PHP. If someone out there reading this by chance knows of some settings, php library or something to enhance debugging info… please feel free to leave some information in a comment.

Basically, what I found were just a couple of simple changes I could make in my php.ini file. And no, this is not on a production server!

I changed :

display_errors = On

And :

error_reporting = E_ALL & ~E_NOTICE

This gave me just enough debugging information to tell me where to look.

I should also mention that while Drupal has a logging system the errors that were occurring were not showing up in those log files. Otherwise I would have been quite happy with Drupal’s built in log files.

Feels good to learn.

[ad code=6 align=center]