OS: Linux (kernel 2.4.26-HN-1.6-P4)
PHP: 4.3.7
MySQL: 4.0.18
It’s a shared host. Truthfully, it’s inadequate for my site, and I depend on a lot of mirrors to make it all work, but it’s all I can afford.
With regard to the scripts: I could give you the source code if you wanted, but there’s a lot of it. I can give a general description, though: almost every script starts with a bunch of includes - a file that defines all the functions, one that checks if the user is logged in, etc. After that, it’s just the usual stuff - validate inputs, query the database. From there it goes one of two ways: if validation fails, then a function is called that includes the open script (just outputs the beginning of the page), writes an error message, then includes the close script. Otherwise, the open script is included, then most of the output is done by a few functions then the close script is included. Generally speaking, there aren’t more than 10 queries per page (except on a few infrequently run ones that have to change a lot of stuff in the database). At the moment, I use a persistent connection and all of the data is in one database, but I’ve tried alternatives. There’s no recursion and for the most part loops only cycle through MySQL results, so I don’t -think- it’s an unterminated loop thing. For reasons stated before, I don’t think it’s a MySQL performance thing. It happens on just about every page, so I assume it’s something that happens in one of my includes or a function I use a lot.
I hope that helps. If there’s any other information you need or you’d like to see some code, just let me know. Thanks for offering your help.