when site doesnt show i get thiserror in logs
[15-Oct-2019 22:10:13 UTC] PHP Fatal error: Maximum execution time of 30 seconds exceeded in /var/www/clients/client1/web16/web/includes/functions/extra_functions/pzen_marcus_template_functions.php on line 397
[15-Oct-2019 22:10:13 UTC] Request URI: /index.php?main_page=index, IP address: 35.137.65.183
--> PHP Fatal error: Maximum execution time of 30 seconds exceeded in /var/www/clients/client1/web16/web/includes/functions/extra_functions/pzen_marcus_template_functions.php on line 397.
and here is line 397
line 392 - 396
Code:
// Check for additional matching images
$file_extension = $products_image_extension;
$products_image_match_array = array();
if ($dir = @dir($products_image_directory)) {
while ($file = $dir->read()) {
from line 397 -443
Code:
if (!is_dir($products_image_directory . $file)) {
//-bof-image_handler-lat9 *** 1 of 4 ***
// if (substr($file, strrpos($file, '.')) == $file_extension) {
// if(preg_match('/\Q' . $products_image_base . '\E/i', $file) == 1) {
// if ($file != $products_image) {
// -----
// Some additional-image-display plugins (like Fual Slimbox) have some additional checks to see
// if the file is "valid"; this notifier "accomodates" that processing, providing these parameters:
//
// $p1 ... (r/o) ... An array containing the variables identifying the current image.
// $p2 ... (r/w) ... A boolean indicator, set to true by any observer to note that the image is "acceptable".
//
$current_image_match = false;
$zco_notifier->notify(
'NOTIFY_MODULES_ADDITIONAL_IMAGES_FILE_MATCH',
array(
'file' => $file,
'file_extension' => $file_extension,
'products_image' => $products_image,
'products_image_base' => $products_image_base
),
$current_image_match
);
if ($current_image_match || substr($file, strrpos($file, '.')) == $file_extension) {
if ($current_image_match || preg_match('/\Q' . $products_image_base . '\E/i', $file) == 1) {
if ($current_image_match || $file != $products_image) {
//-eof-image_handler-lat9 *** 1 of 4 ***
if ($products_image_base . str_replace($products_image_base, '', $file) == $file) {
// echo 'I AM A MATCH ' . $file . '<br>';
$images_array[] = $file;
} else {
// echo 'I AM NOT A MATCH ' . $file . '<br>';
}
}
}
}
}
}
if (count($images_array) > 0) {
sort($images_array);
}
$dir->close();
}
}
$zco_notifier->notify('NOTIFY_MODULES_ADDITIONAL_PRODUCT_IMAGES_LIST', NULL, $images_array);
Bookmarks