Forum Moderators: coopster

Message Too Old, No Replies

Users Click Around Site & Scripts are Not Closing

         

MrCaltweet

8:56 pm on Mar 22, 2010 (gmt 0)

10+ Year Member



Basically I've been getting tons of 500 Errors on my site 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.

[edited by: coopster at 10:07 pm (utc) on Mar 22, 2010]
[edit reason] removed personal/specific domain name [/edit]

dunnma

9:32 pm on Mar 22, 2010 (gmt 0)

10+ Year Member



I don't think you can "forget" to close a script. It would error out.

I looked at your visible code and I cannot see an event.php. This would lead me to believe that it is being included on the backside by find_event.php. Every time you enter a letter into the search box it calls find_event.php which in turn could be calling event.php

You should try to do a search for "event.php" in all of your files to see which one is including it and work backwards from there.

You might want to switch over to a better Javascript framework like jQuery.

Hope that helps.

MrCaltweet

9:45 pm on Mar 22, 2010 (gmt 0)

10+ Year Member



event.php is the page that includes the actual event and how would i do a search taht shows what files are including it?..is that on any coding program? I just use dphp or sometimes dreamweaver. Somebody else coded this part so its sort of confusing..

[edited by: coopster at 10:06 pm (utc) on Mar 22, 2010]
[edit reason] no personal urls please [/edit]

dunnma

9:53 pm on Mar 22, 2010 (gmt 0)

10+ Year Member



If you have access to the server you can use grep.

If not you can download all of the files and then do a global search in Dreamweaver.

This looks like your programmer might be using mod_rewrite or something as 9k1 is getting translated into something like event.php?event=9k1.

Is that list above all of your 500 errors?

MrCaltweet

10:10 pm on Mar 22, 2010 (gmt 0)

10+ Year Member



no that list was grabbed from using a "top" command from root...it just says Internal 500 Error when it shows the errors

Readie

11:17 pm on Mar 22, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



As a thought... Perhaps you have file_one.php with an include for file_two.php, and file_two.php has an include for file_one.php.

If you have any files that only need to be called once, try changing to
include_once 'some_file.php';
for them - see if that does anything.

MrCaltweet

11:23 pm on Mar 22, 2010 (gmt 0)

10+ Year Member



so lets say i do..have includes in both..just change them to include_once your saying?f or take it out of one and put include_once in the one i leave it in...just trying to be clear.

thanks

Readie

9:25 am on Mar 23, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Any instance of
include 'some_file.php';
Where the included file is only needed to be included once can be changed to
include_once 'some_file.php';

The same goes for require and require_once

This will prevent any other inclusion of the included file for that page load.