The members of the WordPress Hackers mailing list are really helpful and usually a very clever bunch. I posted my dilema last night and received a couple suggestions, one of which was to abandon cURL and use Snoopy because it is embedded with WordPress and therefore would always be avaialble.
Sounds like a good idea so I check it out. While I don’t care for the way the class is implemented (direct access to class variables), it if works, I don’t really care. So I set it up and sure enough, it works in my development area. Off the production server and nope, it doesn’t work either. Snoopy depends on fsockopen which GoDaddy says is supported on all PHP hosting plans but it times out so I am guess what they have stated in their help system isn’t true.
The overhaul of phpHtmlLib is largely complete, I just need to validate a few more things before I call it done. One of the things I did during the overhaul was to add some things to the library so it will load as a WordPress plugin. This will make installation and configutation much easier. The changes to phpHtmlLib made the migration from PEAR to the WordPress database abstraction class much easier.
The nice folks at WinSwim are interested in what I am doing with this plugin and have offered to host a demo site. You can find it at: http://wp.winswim.com The demo site is running for the most part, if you are interested in trying it out, go ahead and register with the demo site then drop me an e-mail so I can change your permissions so you can actually do something other than register sample swimmers.
I say the demo site is running “sort of” because just about everything is working although there are a few bugs I know of (e.g. defining age groups). The one thing which isn’t working and it is driving me nuts is the ability to display a Google Map. This is a really nice feature that my own team used quite a bit this year.
I have encapsulated a class called Phoogle within wp-SwimTeam and it worked just fine in my development area and on the MacDolphins site. Phoogle relies on a PHP configuration option known as allow_url_fopen which basically allows PHP to open a web page on an external site and read the content like it would a local file. It’s a nice feature but one that a lot of web hosting providers turn off. In fact, the host for the demo site has it turned off.
There is another technology called cURL which for all practical purposes, accomplishes what allow_url_fopen does although it is a little more involved. I enhanced Phoogle to use cURL if allow_url_fopen is disabled and it worked just fine in my development area. Great! The change was pretty simple too. Uploaded to the production server and nothing. It doesn’t work there. It turns out that GoDaddy (the web hosting provider) has a goofy cURL implementation which requires the use of a proxy.
After a much trial and error and a couple e-mails with GoDaddy support, all I have accomplished is a partial cURL request. I am unable to get a complete response which prevents the map from being displayed. I then got another e-mail from GoDaddy telling me that cURL is only supported on their Linux hosting environments not under Windows (even though it is enabled in PHP.ini). Bleh. ;-(