Users Click Around Site & Scripts are Not Closing

Basically I’ve been getting tons of 500 Errors on my site Caltweet and after going back and forth with my Host admin i’ve narrowed the culprit down to sloppy coding from a programmer I hired.

Here is what the server admin said:

"This has something to do with the coding on the site. For some reason, as you click around on the site, it is not closing out the scripts correctly. When I was doing a simply search for events in Houston, the following processes were all created:

caltweet 17601 0.0 0.4 117264 10648 ? S 15:15 0:00 /usr/bin/php /home/caltweet/public_html/tags.php
caltweet 17659 0.0 0.4 119592 11296 ? S 15:15 0:00 /usr/bin/php /home/caltweet/public_html/event.php
caltweet 17930 0.0 0.4 119592 11296 ? S 15:15 0:00 /usr/bin/php /home/caltweet/public_html/event.php
caltweet 18255 0.0 0.4 119596 11300 ? S 15:16 0:00 /usr/bin/php /home/caltweet/public_html/event.php
caltweet 18302 0.0 0.4 119592 11300 ? S 15:16 0:00 /usr/bin/php /home/caltweet/public_html/event.php
caltweet 18326 0.0 0.4 119592 11296 ? S 15:16 0:00 /usr/bin/php /home/caltweet/public_html/event.php
caltweet 19552 0.0 0.4 119592 11296 ? S 15:16 0:00 /usr/bin/php /home/caltweet/public_html/event.php
caltweet 19553 0.0 0.4 119592 11296 ? S 15:16 0:00 /usr/bin/php /home/caltweet/public_html/event.php
caltweet 19554 0.0 0.4 119592 11296 ? S 15:16 0:00 /usr/bin/php /home/caltweet/public_html/event.php
caltweet 19739 0.0 0.4 119596 11300 ? S 15:16 0:00 /usr/bin/php /home/caltweet/public_html/event.php
caltweet 19800 0.0 0.4 119596 11304 ? S 15:16 0:00 /usr/bin/php /home/caltweet/public_html/event.php
caltweet 20096 0.0 0.4 117524 10776 ? S 15:16 0:00 /usr/bin/php /home/caltweet/public_html/event.php
caltweet 20368 0.0 0.4 119592 11296 ? S 15:16 0:00 /usr/bin/php /home/caltweet/public_html/event.php
caltweet 20389 0.0 0.4 119596 11304 ? S 15:16 0:00 /usr/bin/php /home/caltweet/public_html/event.php
caltweet 20390 0.0 0.4 119596 11292 ? S 15:16 0:00 /usr/bin/php /home/caltweet/public_html/event.php
caltweet 20392 0.0 0.4 119596 11296 ? S 15:16 0:00 /usr/bin/php /home/caltweet/public_html/event.php
caltweet 20405 0.0 0.4 119596 11300 ? S 15:16 0:00 /usr/bin/php /home/caltweet/public_html/event.php
caltweet 20406 0.0 0.4 119596 11304 ? S 15:16 0:00 /usr/bin/php /home/caltweet/public_html/event.php
caltweet 20409 0.0 0.4 119592 11292 ? S 15:16 0:00 /usr/bin/php /home/caltweet/public_html/event.php
caltweet 21838 0.0 0.4 119596 11300 ? S 15:16 0:00 /usr/bin/php /home/caltweet/public_html/event.php
caltweet 21845 0.0 0.4 119592 11296 ? S 15:16 0:00 /usr/bin/php /home/caltweet/public_html/event.php
caltweet 21858 0.0 0.4 119596 11300 ? S 15:16 0:00 /usr/bin/php /home/caltweet/public_html/event.php
caltweet 21861 0.0 0.4 119592 11292 ? S 15:16 0:00 /usr/bin/php /home/caltweet/public_html/event.php
caltweet 21869 0.0 0.4 119592 11300 ? S 15:16 0:00 /usr/bin/php /home/caltweet/public_html/event.php
caltweet 21904 0.0 0.4 119596 11308 ? S 15:16 0:00 /usr/bin/php /home/caltweet/public_html/event.php
caltweet 21915 0.0 0.4 119592 11296 ? S 15:16 0:00 /usr/bin/php /home/caltweet/public_html/event.php
caltweet 22113 0.0 0.4 119596 11300 ? S 15:16 0:00 /usr/bin/php /home/caltweet/public_html/event.php
caltweet 23561 0.0 0.4 117528 10764 ? S 15:17 0:00 /usr/bin/php /home/caltweet/public_html/event.php
caltweet 23647 0.0 0.4 119592 11296 ? S 15:17 0:00 /usr/bin/php /home/caltweet/public_html/event.php
caltweet 23655 0.0 0.4 119596 11300 ? S 15:17 0:00 /usr/bin/php /home/caltweet/public_html/event.php
caltweet 23657 0.0 0.4 119596 11296 ? S 15:17 0:00 /usr/bin/php /home/caltweet/public_html/event.php
caltweet 23673 0.0 0.4 119648 11444 ? S 15:17 0:00 /usr/bin/php /home/caltweet/public_html/create.php
caltweet 23713 0.0 0.4 119592 11300 ? S 15:17 0:00 /usr/bin/php /home/caltweet/public_html/event.php
caltweet 23727 0.0 0.4 119592 11292 ? S 15:17 0:00 /usr/bin/php /home/caltweet/public_html/event.php
caltweet 23730 0.0 0.4 119592 11300 ? S 15:17 0:00 /usr/bin/php /home/caltweet/public_html/event.php
caltweet 23734 0.0 0.4 117528 10764 ? S 15:17 0:00 /usr/bin/php /home/caltweet/public_html/event.php
caltweet 23743 0.0 0.4 119592 11296 ? S 15:17 0:00 /usr/bin/php /home/caltweet/public_html/event.php
caltweet 23753 0.0 0.4 117528 10764 ? S 15:17 0:00 /usr/bin/php /home/caltweet/public_html/event.php
caltweet 23759 0.0 0.4 117524 10760 ? S 15:17 0:00 /usr/bin/php /home/caltweet/public_html/event.php
caltweet 23768 0.0 0.4 119596 11300 ? S 15:17 0:00 /usr/bin/php /home/caltweet/public_html/event.php
caltweet 23788 0.0 0.4 117528 10944 ? S 15:17 0:00 /usr/bin/php /home/caltweet/public_html/event.php
caltweet 23811 0.0 0.4 117528 10764 ? S 15:17 0:00 /usr/bin/php /home/caltweet/public_html/event.php
caltweet 23819 0.0 0.4 117524 10760 ? S 15:17 0:00 /usr/bin/php /home/caltweet/public_html/event.php
caltweet 23820 0.0 0.4 119596 11300 ? S 15:17 0:00 /usr/bin/php /home/caltweet/public_html/event.php
caltweet 23839 0.0 0.4 119592 11300 ? S 15:17 0:00 /usr/bin/php /home/caltweet/public_html/event.php
caltweet 23862 0.1 0.4 117524 10756 ? S 15:17 0:00 /usr/bin/php /home/caltweet/public_html/event.php
caltweet 23866 0.0 0.4 117528 10936 ? S 15:17 0:00 /usr/bin/php /home/caltweet/public_html/event.php
caltweet 23884 0.0 0.4 117524 10760 ? S 15:17 0:00 /usr/bin/php /home/caltweet/public_html/event.php
caltweet 23888 0.0 0.4 117528 10760 ? S 15:17 0:00 /usr/bin/php /home/caltweet/public_html/event.php
caltweet 23930 0.0 0.4 119596 11300 ? S 15:17 0:00 /usr/bin/php /home/caltweet/public_html/event.php
caltweet 23934 0.0 0.4 119596 11300 ? S 15:17 0:00 /usr/bin/php /home/caltweet/public_html/event.php
caltweet 23936 0.0 0.4 117524 10756 ? S 15:17 0:00 /usr/bin/php /home/caltweet/public_html/event.php
caltweet 23955 0.0 0.4 119592 11296 ? S 15:17 0:00 /usr/bin/php /home/caltweet/public_html/event.php
caltweet 23958 0.0 0.4 119596 11300 ? S 15:17 0:00 /usr/bin/php /home/caltweet/public_html/event.php
caltweet 23981 0.0 0.4 119596 11296 ? S 15:17 0:00 /usr/bin/php /home/caltweet/public_html/event.php
caltweet 23987 0.1 0.4 117264 10556 ? S 15:17 0:00 /usr/bin/php /home/caltweet/public_html/calendar.php
caltweet 24033 0.1 0.4 117528 10776 ? S 15:17 0:00 /usr/bin/php /home/caltweet/public_html/event.php

What could cause the scripts NOT to close?? a simple ?> not being in place or what?

Thnx for any help.

Your website launches external processes? Those aren’t cron jobs or something?

With that many copies of event.php running I’d say they’re contending with each other for some resource (like all trying to update the same database table), which is why they’re not ending… not because of the code syntax. A design flaw.

well i didn’t mean external processes…im new to programming need to watch what im saying…lol. We do have cron job that auto updates users twitter statuses.

So what do you mean a design flaw?? like user interface or the structure of the database?? go in to detail and if so is it something that can be fixed or what?

thanks for all feed back

That list you pasted is the output of ps, and shows php processes, not webpages. Is that not your auto updater script? Normally webpage requests just show up as the httpd process, they don’t spawn copies of the php interpreter.

thats an output from the “top” command ran on root from my hosting provider hostgator.

People are telling me this might have something to do with running fast/cgi on an apache server.