Re: Display Log Files [Support Thread]
I've just submitted v2.1.0 of Display Log Files to the plugin section for review; I'll post back here when it's available.
That version:
- Corrects a programming error that resulted in the selected log-file's contents not displaying under PHP 7.1.x and later.
- Enhances the plugin, moving all configurable elements into your admin's Configuration->Logging, addressing the request from @NCRS 1962.
Re: Display Log Files [Support Thread]
Quote:
Originally Posted by
lat9
I've just submitted v2.1.0 of
Display Log Files to the plugin section for review; I'll post back here when it's available.
That version:
- Corrects a programming error that resulted in the selected log-file's contents not displaying under PHP 7.1.x and later.
- Enhances the plugin, moving all configurable elements into your admin's Configuration->Logging, addressing the request from @NCRS 1962.
I've updated the plugin to v2.1.1 (just submitted to the plugins); v2.1.0 mistakenly removed the file-sort functionality.
Re: Display Log Files [Support Thread]
Quote:
Originally Posted by
lat9
I've just submitted v2.1.0 of
Display Log Files to the plugin section for review; I'll post back here when it's available.
That version:
- Corrects a programming error that resulted in the selected log-file's contents not displaying under PHP 7.1.x and later.
- Enhances the plugin, moving all configurable elements into your admin's Configuration->Logging, addressing the request from @NCRS 1962.
Quote:
Originally Posted by
lat9
I've updated the plugin to v2.1.1 (just submitted to the plugins); v2.1.0 mistakenly removed the file-sort functionality.
v2.1.1 is now available for download from the Zen Cart Plugins area.
Re: Display Log Files [Support Thread]
This is a great module! Like how it has a notification at the top of admin.
I have an issue which is driving me crazy right now, well for quite a while it has been doing this since php 7 change.
It shows Paypal logs, but no other error log types for the last 6 months. But in June it showed one 'mydebug.....' log regarding whos online. And I know for certain it should have a whole heap of error logs.
Sorry to pose this question in this thread. I asked the server people and they say its not server settings, and Dr Byte kindly helped with some advice which they were not able to utilise to help pinpoint what it is.
The mod works great, I like how you can filter out the paypal logs also. Many thanks for this!
Re: Display Log Files [Support Thread]
@HeathenMagic, the PayPal logs (and many of the other processing/trace type logs) are written using a different method than the myDEBUG*.log files. They're written as a "regular" file that happens to have a .log file-extension.
The myDEBUG*.log files are created using PHP's error-handling, as modified by the built-in Zen Cart /includes/extra_configures/enable_error_logging.php script. If you're not receiving these error-indicator logs, then there's something in your PHP configuration that's preventing them from being written to the /logs directory.
You can see your site's PHP error configuration using Tools->Server/Version Info; I've attached the settings for one of my "localhost/XAMPP" setups that contain the error-related settings that might be messed:
Code:
display_errors Off On
display_startup_errors On On
doc_root no value no value
docref_ext no value no value
docref_root no value no value
enable_dl On On
enable_post_data_reading On On
error_append_string no value no value
error_log C:/xampp/htdocs/zc155e/logs/myDEBUG-adm-1499810033-259371.log C:\xampp-5.6.15\php\logs\php_error_log
Re: Display Log Files [Support Thread]
Quote:
Originally Posted by
lat9
@HeathenMagic, the PayPal logs (and many of the other processing/trace type logs) are written using a different method than the myDEBUG*.log files. They're written as a "regular" file that happens to have a .log file-extension.
The myDEBUG*.log files are created using PHP's error-handling, as modified by the built-in Zen Cart /includes/extra_configures/enable_error_logging.php script. If you're not receiving these error-indicator logs, then there's something in your PHP configuration that's preventing them from being written to the /logs directory.
You can see your site's PHP error configuration using
Tools->Server/Version Info; I've attached the settings for one of my "localhost/XAMPP" setups that contain the error-related settings that might be messed:
Code:
display_errors Off On
display_startup_errors On On
doc_root no value no value
docref_ext no value no value
docref_root no value no value
enable_dl On On
enable_post_data_reading On On
error_append_string no value no value
error_log C:/xampp/htdocs/zc155e/logs/myDEBUG-adm-1499810033-259371.log C:\xampp-5.6.15\php\logs\php_error_log
Many thanks for your reply and your help with this! I think comparing with your example, the error_log setting in my config looks suspect:-
Quote:
display_errors Off On
display_startup_errors On On
doc_root /home/*****/public_html /home/*****/public_html
docref_ext no value no value
docref_root no value no value
enable_dl On On
enable_post_data_reading On On
error_append_string no value no value
error_log /home/*****/logs/******_com.php.error.log /home/*****logs/*******_com.php.error.log
I replaced sensitive words with * as I think is advised. I will contact them to change 'error_log' setting, I can't find that directory it mentions. I think that must be the cause. Fingers crossed
Re: Display Log Files [Support Thread]
Quote:
Originally Posted by
HeathenMagic
Many thanks for your reply and your help with this! I think comparing with your example, the error_log setting in my config looks suspect:-
I replaced sensitive words with * as I think is advised. I will contact them to change 'error_log' setting, I can't find that directory it mentions. I think that must be the cause. Fingers crossed
The "error_log" setting is changed to have a different file name (the numeric suffixes at the end of the log file name) on each page-load (both admin and storefront). Those values are set with the PHP ini_set function which is apparently disabled on your site. Check with your webhost and ask them to re-enable the use of that function.
Re: Display Log Files [Support Thread]
Quote:
Originally Posted by
lat9
The "error_log" setting is changed to have a different file name (the numeric suffixes at the end of the log file name) on each page-load (both admin and storefront). Those values are set with the PHP ini_set function which is apparently disabled on your site. Check with your webhost and ask them to re-enable the use of that function.
When you're viewing your site's Server/Version Information, search for disable_functions; most likely ini_set is in that list. Ask your webhost what can be done to remove that restriction.
Re: Display Log Files [Support Thread]
Thanks again for your help with this. I contacted them but they said the following:-
Quote:
The PHP function "ini_set" is not disable on your server. Please view the snippet below.
=========================
root@server [/home/gemtree/public_html]# grep disable_functions /opt/cpanel/ea-php70/root/etc/php.ini
disable_functions =
root@server [/home/gemtree/public_html]#
=========================
Though it contradicts what is set in php settings:-
Quote:
disable_functions no value no value
I think it should say 'ini_set' as you mentioned.
Re: Display Log Files [Support Thread]
Take the following contents, put them into a file named something.php in your store's root directory; then run www.yourstore.com/something.php.
It will let you know if the error-log file name was properly set.
Code:
<?php
require 'includes/application_top.php';
$current_error_log = ini_get('error_log');
echo "The current error-log file is $current_error_log.<br />";
if ($current_error_log != $debug_logfile_path) {
echo "The current error log is not set correctly, it should be $debug_logfile_path; retrying ....<br />";
ini_set('error_log', $debug_logfile_path);
echo "Reset error_log to " . ini_get('error_log') . '<br />';
}
require 'includes/application_bottom.php';