Re: Display Log Files [Support Thread]
You're right, it was an upgrade. Making the changes above, I now get:
Parse error: syntax error, unexpected $end in /home/xxxxxx/ohwowthatscool.com/myadmin/display_logs.php on line 309
You were also right, the defines for my logs directory was missing in the configure files. I added:
define('DIR_FS_LOGS', DIR_FS_LOGS . 'logs/');
to both configures, but I'm still getting the error from line 309. For the heck of it, I went back to your orignal code on display_logs.php since I added the define statements, and I'm back to getting the 500 error.
Thank you for trying to help.
Re: Display Log Files [Support Thread]
Quote:
Originally Posted by
lat9
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 ...
These changes fixed the 500 error on 1.50.
Thanks for this addition!
Re: Display Log Files [Support Thread]
Quote:
Originally Posted by
jlizotte
You're right, it was an upgrade. Making the changes above, I now get:
Parse error: syntax error, unexpected $end in /home/xxxxxx/ohwowthatscool.com/myadmin/display_logs.php on line 309
It's actually the last line of your file: <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
(I had commented out the changes I made above.)
Again, thanks for your help. I can muddle through PHP with direction, but only know enough to figure out the most basic parts of it.
Re: Display Log Files [Support Thread]
OK. I got this working. I had to add a fifth "}" at the end of your modification above. It's working great now!
Thank you, lat9, for your help, and for a great contribution. Happy holidays!
Re: Display Log Files [Support Thread]
Quote:
Originally Posted by
jlizotte
You're right, it was an upgrade. Making the changes above, I now get:
Parse error: syntax error, unexpected $end in /home/xxxxxx/ohwowthatscool.com/myadmin/display_logs.php on line 309
You were also right, the defines for my logs directory was missing in the configure files. I added:
define('DIR_FS_LOGS', DIR_FS_LOGS . 'logs/');
to both configures, but I'm still getting the error from line 309. For the heck of it, I went back to your orignal code on display_logs.php since I added the define statements, and I'm back to getting the 500 error.
Thank you for trying to help.
Should be:
define('DIR_FS_LOGS', DIR_FS_CATALOG . 'logs/');
Re: Display Log Files [Support Thread]
Quote:
Originally Posted by
DrByte
Should be:
define('DIR_FS_LOGS', DIR_FS_CATALOG . 'logs/');
Oops. Many thanks, Sir!
Re: Display Log Files [Support Thread]
Quote:
Originally Posted by
DrByte
Should be:
define('DIR_FS_LOGS', DIR_FS_CATALOG . 'logs/');
Er, my v1.5.1 copy of configure.php has a comment that reads:
Code:
//the following path is a COMPLETE path to the /logs/ folder eg: /var/www/vhost/accountname/public_html/store/logs ... and no trailing slash
Re: Display Log Files [Support Thread]
The updated version is available here, as v1.0.0a for the next week or so; then I'll resubmit to the Plugins area. Just click the "Download Now" button.
Re: Display Log Files [Support Thread]
I've repackaged v1.0.0a as v1.0.1 and submitted the update to the Zen Cart Plugins area ...
Re: Display Log Files [Support Thread]
I have added the debug-file file-size to the listing of the debug file. I find this very handy in finding potentially the same errors. If anyone else is interested, I will upload this "upgraded version"