Why is my web site so sloooooooooow?

I apologize for how slow this web site has been lately.  I don’t visit it myself too often when I am not actively working on wp-SwimTeam so I was somewhat oblivious to it.  My sites are hosted with GoDaddy and I’ve never really had an issue with their shared hosting service.  It is cheap, easy to administer, and for the low volume traffic I tend to get, more than adequate.

I called GoDaddy this morning to see why my sites was loading so slowly – I am seeing page load times of 30-40 seconds which is just plain silly.  It looks like another web site that I happen to be sharing the “shared” server with is consuming all of the resources.  GoDaddy is going to monitor it and see what is up.  I expect it will remain slow for at least a few days.  Hopefully they’ll figure out what it is and do something about it but they did tell me that if the other site isn’t violating their TOS, there isn’t much I can do about it.  They also suggested I look into a WordPress caching plugin.  I don’t have near the volume of data nor traffic to warrant a caching plugin but if the situation persists, I’ll look into it.

Bleh.  Even on a shared server there ought to be some expectation of “reasonable” performance.  I will continue to monitor the performance and see what I can do about it.

Another goofy e-mail from GoDaddy

I had another go-round with GoDaddy yesterday which resulted in another goofy e-mail.  I posted the fsockopen() example they had asked me to which timed out and GoDaddy responded with this:

Dear Mike,

I sincerely apologize for any confusion or frustration. You will need to specify the proxy in your coding. Applications that need to make outbound connections (port 443) will need to be made “proxy aware”. This will require additional coding to varying degrees, depending on the application. You will need to know the ip address and port of the proxy server in order to correctly modify your code. The ip of the proxy server is 64.202.165.130 and connections will be made on port 3128.

You will need to use this when coding with PHP:
curl_setopt ($ch, CURLOPT_HTTPPROXYTUNNEL, TRUE);
curl_setopt ($ch, CURLOPT_PROXYTYPE, CURLPROXY_HTTP);
curl_setopt ($ch, CURLOPT_PROXY, http://64.202.165.130:3128);
curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, FALSE);

I hope this information helps.

Please let us know if we can assist you in any other way.

Sincerely,
Lindsay C.
Online Support Representative

Right back to the cURL requirements which really don’t make any sense for fsockopen().  It really doesn’t matter as I chnaged the code which manages the Google Maps so it no longer needs it.

GoDaddy’s PHP support is questionable

Over the past few days I have had a back and forth e-mail dialog with GoDaddy Support regarding their PHP support (or lack there of).  Some of their responses are just silly.  Since they don’t support allow_url_fopen, I wanted to use cURL.  Well, apparently cURL isn’t supported with their Windows hosting service and even with that, requires a proxy configuration.  So then I decided to use fsockopen() since GoDaddy states it is supported for all PHP hosting plans.

Well fsockopen() times out when I try using it.  I got the following from GoDaddy support:

Dear Mike,

We apologize for the confusion.  While fsockopen() is supported you would need to be on an account that fully supports PHP.  You would need to switch to a Linux Hosting account.  If you do not wish to switch to a Linux Server, you would need to use custom coding.  Unfortunately, we do not provide coding or scripting support through this forum. I recommend performing a search on a search engine. I apologize for any inconvenience this may cause.

Please let us know if we can assist you in any other way.

Sincerely,
 
John B.
Online Support
Technician 

What kind of nonsense is this?  No where is it stated that it isn’t supported.  So respond to them and ask for a list of what is and isn’t supported with respect to running PHP under Windows.  This is what I got back in response – it is just nonsense – it points to me to a Linux configuration, how helpful is that?  Not only does it point to the wrong platform, but what it reports would indicate that what I want to do is supported!

Dear Mike,

As our Windows IIS 7 plans support PHP 5.2.5, please refer to the following link for a full list of supported PHP options:

•  http://gilahacker.com/info.php5

Please let us know if you have any further questions, comments, or concerns. Our service departments and telephone lines are open 24 hours a day, 365 days a year to accommodate your needs anytime.

You can reach us by phone to the following numbers:
(480) 505-8877 Technical Support, Sales and Service
(480) 505-8855 Billing

Or, you can send an email for speedy electronic service to the following address:
support@supportwebsite.com – Technical Support, Sales and Service

We look forward to serving you in the future.

Please let us know if we can help in any other way.

Regards,
Stacey P.
Online Support

It makes one wonder if their support people actualy read what is sent to them. So I responde back to them pointing out that their response was not very helpful and ask my question again as well as another request for what is and isn’t supported with PHP running under Windows.

My most recent response was a request for a code sample to see what isn’t working, hopefully this will resolve the issue once and for all, stay tuned!  The response also included a statement that they, GoDaddy, don’t have a document which articulates the differences between PHP support running under Windows and PHP support under Linux.

Dear Mike,

We apologize for any inconvenience this may have caused you. Currently fsockopen() is supported on your hosting account. Please send us the full URL of a page we can duplicate the error you are having so that we can troubleshoot this error. Unfortunately, we do not provide technical support with third-party scripting issues. However if the issue is being caused by a misconfiguration on our server we would be happy to resolve this for you.

Unfortunately we do not have any documentation available that will show you the difference in the php configuration between out Linux and Windows accounts. We apologize for any inconvenience this may have caused you.

Please let us know if we can help you in any other way.

Sincerely,
Jeremy T
Online Support Technician

More on Phoogle & Google Maps

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.

Now I am not sure what to do other than to pursue a Javascript solution.  GoDaddy is quickly going on my “less than happy with” list.  I wonder if a Linux server would be any easier?

Demo Site is running … sort of

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.  ;-(

I think for now when I find a short code, I will check the allow_url_fopen setting and if it is off, will issue a warning during the short code processing.  There is probably a way to interact with the Google Maps API via Javascript, I guess I will need to look into that.  It is really too bad, the Phoogle solution was really simple to use.