While trying to get a demo site up and running I ran into an issue that has taken me down a path I didn’t expect to head down at this time. But now that I have run into it, I have decided to fix it correctly.
The wp-SwimTeam plugin depends on phpHtmlLib and the 2.x version of the library requires that it be installed in the web site’s root directory. This typically isn’t a big deal but in some cases can be inconvenient. It also requires the library be named phphtmllib as the path is (was) encoded into quite a few of the widgets.
When I uploaded the library to the new demo site, it didn’t run correctly. The demo site is running PHP5 which I immediately suspected as the problem. So I loaded PHP5 and phpHtmlLib into a new virtual machine (I love VMware, it is wonderful for configuring different environments) and all the examples ran just fine. Odd, very odd. Digging into it further, it looks like the hosting provider’s PHP virtual directory support setting is different than what I had locally and affects how include files are handled.
A couple of tests confirmed my suspicions. Since this hosting provider is large, I suspect this PHP configuration is pretty typical and it provided sufficient motivation to go back and fix phpHtmlLib 2.x so it can be loaded with appropriate configured PHP define() statements. If you look through the phpHtmlLib forums you’ll find this is a fairly regularly requested item (including by me) and phpHtmlLib 3 (which requires PHP5) is configured this way.
Over the last couple days I have been updating the phpHtmlLib 2.x branch to support this configuration method and now have it all running correctly in my development area. Before I commit all the changes, and there are a lot of them, I need to verify it all works in the suspect hosting environment.
The trickle down of setting up a demo site resulted in an overhaul to phpHtmlLib. It needed to be done anyway and doing it will allow phpHtmlLib to be loaded as a WordPress plugin eventually.