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 Dave - June 18, 2015

Hmm, do you know what your memory limit is? 

It can log a lot of data, like if you load 50 megs of records into a variable.  It will log that.  And it's all getting loaded on the list page.  So there's definitely some optimizations there.  I'm not sure exactly what they'll be but we'll keep an eye on it.

Also, we're going to rename something like "Developer Log" or "Debug Log" so it's less scary for end users who have access to the Admin menu.  Do you think that would have helped for your client? 

Dave Edis - Senior Developer
interactivetools.com

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