Can't access error log in 2.64

5 posts by 2 authors in: Forums > CMS Builder
Last Post: June 18, 2015   (RSS)

By gkornbluth - June 17, 2015 - edited: June 17, 2015

Hi All,

I'm getting a 500 error (IE) and a blank page (Firefox)  when I try to access the error log (2.64).

I tried restoring an earlier database (when the error log was working), re-uploading the error log action handler and .ini files but no luck.

I can look at the error log in PHPMyAdmin and it shows 960 records.

Any ideas?

Thanks,

Jerry Kornbluth

The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

By Dave - June 18, 2015

Try showing only 5 records at a time with this link: ?menu=_error_log&perPage=5

Maybe it's running out of memory? 

Dave Edis - Senior Developer
interactivetools.com

By gkornbluth - June 18, 2015

Good catch, Mr Dave...

the perPage limit worked, and the last number of errors were in fact out of memory errors.

Since the error log seems to have a tendency to grow over time, is there any way that you can include a fixed per page limit of say 100 in the works for a future version update?

Or would you suggest a different approach?

Thanks as always,

Jerry Kornbluth

The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

By gkornbluth - June 18, 2015

Hi Dave,

The entry says 128MB

Renaming it to Developer log would be a bit less onerous

In CMSB V2.6.4 I've also added a check box in a single record table (called  "Organization Information") and added the code below to  /lib/menus/header_functions.php (based on your code suggestion in post 2236345) to allow me to easily hide or show the error log link in the admin menu.

Best,

Jerry Kornbluth

<?php 
   $libraryPath 
'cmsAdmin/lib/viewer_functions.php';
 
$dirsToCheck = array('/path_to_your_server/','','../','../../','../../../');
  foreach (
$dirsToCheck as $dir) { if (@include_once("$dir$libraryPath")) { break; }}
  if (!
function_exists('getRecords')) { die("Couldn't load viewer library, check filepath in sourcecode."); }
  
 list(
$organization_informationRecords$organization_informationMetaData) = getRecords(array(
    
'tableName'   => 'organization_information',
    
'where'       => ''// load first record
    
'limit'       => '1',
  ));
  
$organization_informationRecord = @$organization_informationRecords[0]; // get first record
 
?>

<?php $no_error_log 1 ?>
 <?php $no_error_log $organization_informationRecord['no_error_log'?>
 <?php if ($no_error_log == ):?>
 
  <?php  array_pop($adminMenus); // remove "Error Log" from menu   
  
?>
  <?php endif?>
  <?php

  
return $adminMenus;
}

?>

The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php