Home arrow BsnTech Blog arrow Computers arrow Zoom Media Gallery 2.5.1 RC4 Freezes or Crashes Apache2
Zoom Media Gallery 2.5.1 RC4 Freezes or Crashes Apache2
Wednesday, 24 December 2008

After getting a little bit of time to research the new problem causing Apache2 to crash or freeze up and use 100% CPU utilization, I believe I have found at least part of the problem.

The Zoom Media Gallery 2.5.1 RC4 does not check to ensure that the Page Number is legit.  I kept checking the server-status on Apache and each of the times, I kept noticing that the website address including an address with a negative page number.  How could it be possible for a page number to be negative?  I don't know, but ask Google!  Google keeps spidering the web sites here and many times has a negative page  number - which doesn't make any sense.

To head off this issue, I inserted a few lines of code into the zoom.php file in the /components/com_zoom directory.  I created these lines directly under the:

//error reporting(E_ALL)

comment around line 34 - just before the:

// Create zOOm Image Gallery object

Here is the code to insert:

// Check to ensure the Page number is valid (not negative) or throw an error
$PageCheck = mosGetParam($_REQUEST,'PageNo');
if ($PageCheck < 1 && isset($PageCheck)) {
     echo ('Page number cannot be zero or negative.');
     exit;
}

I am not 100% sure yet if this will fix all the problems with Zoom Media Gallery 2.5.1 RC4 and the 100% CPU utilization with Apache, but I know this will help curtail the problem.  When I tried to put the same URL that caused an Apache process to use 100% of the CPU into my web browser, it sat there until the five minute timeout period for scripts (I set a five minute, or 300 second timeout period in the php.ini file under max_execution_time).
Comments
Add New
Write comment
Name:
Email:
 
Website:
Title:
 
:angry::0:confused::cheer:B):evil::silly::dry::lol::kiss::D:pinch:
:(:shock::X:side::):P:unsure::woohoo::huh::whistle:;):s
:!::?::idea::arrow:
 
Please input the anti-spam code that you can read in the image.
 
Hosted and maintained by
Server: Decatur