
Originally Posted by
jlizotte
Ok. I renamed my admin and uploaded the files. Getting a 500 server error. I do have a logs and cache directory, but I'm getting this error in my debugs:
PHP Warning: dir(DIR_FS_LOGS) [<a href='function.dir'>function.dir</a>]: failed to open dir: No such file or directory in /home/xxxxxx/ohwowthatscool.com/myadmin/display_logs.php on line 41
[23-Dec-2012 08:34:23] PHP Fatal error: Call to a member function read() on a non-object in /home/xxxxxx/ohwowthatscool.com/myadmin/display_logs.php on line 42
Any idea what the problem might be? The error reads like it is looking for function.dir.
(Running this on 1.5.1) White screen of death when I choose Display Logs from the admin menu, then it generates the debug in my cache folder.
Thanks.
The error message indicates that the constant DIR_FS_LOGS is not defined so that the PHP dir function is choking. Running on v1.5.1, you should have the DIR_FS_LOGS constant defined in both /YOUR_ADMIN/includes/configure.php and /includes/configure.php. I'm guessing that this was an upgrade to v1.5.1 for your site.
That said, the plugin shouldn't be giving you the white-screen-of-death. I don't seem to have an issue with or without the DIR_FS_LOGS constant on v1.5.1 because the Zen Cart init handlers 'fix' it. It's another story on v1.5.0, however, where I'm seeing what you're seeing.
Make the changes highlighted in red to /YOUR_ADMIN/display_logs.php, starting at line 39:
Code:
foreach(array(DIR_FS_LOGS, DIR_FS_SQL_CACHE, DIR_FS_CATALOG . '/includes/modules/payment/paypal/logs') as $logFolder) {
$logFolder = rtrim($logFolder, '/');
$dir = @dir($logFolder);
if ($dir != NULL) {
while ($file = $dir->read()) {
if ( ($file != '.') && ($file != '..') && substr($file, 0, 1) != '.') {
if (preg_match('/^(myDEBUG-|AIM_Debug_|SIM_Debug_|FirstData_Debug_|Linkpoint_Debug_|Paypal|paypal|ipn_|zcInstall).*\.log$/', $file)) {
$hash = sha1 ($logFolder . '/' . $file);
$logFiles[$hash] = array ( 'name' => $logFolder . '/' . $file,
'mtime' => filemtime($logFolder . '/' . $file)
);
}
}
}
}
I'll hold off on resubmission to the Plugins for a bit, just in case ...
Bookmarks