Today I spent a couple hours trying to fix the iTunes Watcher script. When I moved from LunarPages to pMachine Hosting, the script stopped working. At first, I couldn’t figure out what the deal was. I thought there was a MySQL problem, so I dropped the tables and reinstalled it, but that didn’t help. I eventually asked Rick (pMachine) and Nevin (pMachine Hosting) for some help. Rick told me that the script wasn’t written well, especially since the author wasn’t referring to arrays correctly, expected the register globals variable to be on and used relative paths.
So I went through all the files and fixed all of it, but it still wasn’t showing artwork. I don’t have access to the Apache error_log for my account by default, so I had to ask for it temporarily. Once I had that I had to use a bunch of echo statements to figure out what was going wrong. I eventually discovered the script was using an Amazon URL with the old formatting. I found out what the new one looked like and added that to the script and it worked!
After all that, I realized I would’ve saved time if I would’ve had a nice PHP IDE for my Mac. I did a search on the Web, and didn’t really find anything nice within my limited budget. I mainly wanted something with a debugger.
Since I already own a copy of BBEdit, I went looking for ways to improve it. I found a nice PHP Glossary which I can already tell I’ll be using a lot.
Does anyone know of either a nice PHP IDE for Mac or nice additions to BBEdit?
Actually, the more I’m playing around with BBEdit and custom error handling, the more I don’t think I need an IDE. I figured out how to assign a keyboard combo to BBEdit’s built-in auto-completion. And since I have the excellent PHP Glossary, it pops up a nice list of all possible choices.
I’ve started creating a little error handling script which takes the error, formats it and sends it to my email address. All I have to do is require it at the beginning of any script to have it work. I’ll flesh the script out some more, but right now it’s already making debugging easier.
I’ve now also got a nice script that looks up a selected PHP function in BBEdit. It’s from Ranchero Software. I assigned a keyboard combo to it too, so now I can quickly lookup what any PHP function does. Very helpful!
Now the only thing I wish BBEdit had was a PHP debugger of somekind. I guess I will have to make do with custom error handling in the meantime.
No, I’m not talking about Huevos, although that is a nice app. I’m talking about an AppleScript that you can use directly in BBEdit. Select a PHP function, use a key combo and up pops my browser with the PHP.net documentation for that function. It’s really handy. I linked to it in my previous comment.
I just found a neat looking piece of software called HyperEdit. It looks pretty promising. The only problem is that I am developing for a linux system and the SERVER variables aren’t simulated. Might have to do some switching around… otherwise, it looks way cool… and at 20 bucks, can’t beat that!
As for me, I like Eclipse with TruStudio plugin.
I bet it’s the best PHP IDE for Mac (though you can use it under Windows and *nix either).
I bet you want a cheap one too, right? The Zend Studio is probably the best one out there, but it is a tad costly at $250.
Project Builder (or whatever they are calling it now) might be an option, but I am not sure what it has as far as PHP debugging.
Rick and I both have PHP/MySQL just installed locally, and we code and debug using code and our browsers. Simple, but it works for us.