René H4 Posted July 13, 2019 Share Posted July 13, 2019 I's like to check if my site is running without errors. They are probably blinded out now, whilst it has been running for 1,5 year on 7.2 now. What would I need to do to enable error-reporting (want to do this for just a short time) Running Bootstrap Frozen (May '18) patched up to march this year. My application_top.php starts like this: <?php /* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2014 osCommerce Released under the GNU General Public License */ // start the timer for the page parse time log define('PAGE_PARSE_START_TIME', microtime()); // set the level of error reporting error_reporting(E_ALL & ~E_NOTICE); if (defined('E_DEPRECATED')) { error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED); } Link to comment Share on other sites More sharing options...
241 Posted July 13, 2019 Share Posted July 13, 2019 do you really want to see everything? comment out error_reporting(E_ALL & ~E_NOTICE); if (defined('E_DEPRECATED')) { error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED); } with /* error_reporting(E_ALL & ~E_NOTICE); if (defined('E_DEPRECATED')) { error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED); }*/ error_reporting(E_ALL); ini_set('display_errors','1'); though this may still be overridden via the php.ini master setting No longer giving free advice. Please place deposit in meter slot provided. Individual: [=] SME: [==] Corporation: [===] If deposit does not fit one of the slots provided then you are asking too much! Is your Osc dated try Phoenix raising oscommerce from the ashes. Link to comment Share on other sites More sharing options...
241 Posted July 13, 2019 Share Posted July 13, 2019 @René H4 if it is just the deprecated stuff you want to be able to see then just comment out the deprecated part /* if (defined('E_DEPRECATED')) { error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED); }*/ ini_set('display_errors','1'); No longer giving free advice. Please place deposit in meter slot provided. Individual: [=] SME: [==] Corporation: [===] If deposit does not fit one of the slots provided then you are asking too much! Is your Osc dated try Phoenix raising oscommerce from the ashes. Link to comment Share on other sites More sharing options...
René H4 Posted July 13, 2019 Author Share Posted July 13, 2019 Will try this, thanks! Link to comment Share on other sites More sharing options...
BrockleyJohn Posted July 13, 2019 Share Posted July 13, 2019 If it's a live site, you might be better to use: ini_set("log_errors", 1); ini_set("error_log", __DIR__."/php-error.".date('ymd').".log"); instead of ini_set('display_errors','1'); This will write all the errors to a log file - and create a new file every day if you forget to turn it off again, so it doesn't get too huge! Contact me for work on updating existing stores - whether to Phoenix or the new osC when it's released. Looking for a payment or shipping module? Maybe I've already done it. Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x Link to comment Share on other sites More sharing options...
René H4 Posted July 13, 2019 Author Share Posted July 13, 2019 Sorry guys, but I am confused now. I indeed would like to log. Is this the correct symtax? // set the level of error reporting error_reporting(E_ALL & ~E_NOTICE); /* if (defined('E_DEPRECATED')) { error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED); }*/ ini_set("log_errors", 1); ini_set("error_log", __DIR__."/php-error.".date('ymd').".log"); Link to comment Share on other sites More sharing options...
René H4 Posted July 13, 2019 Author Share Posted July 13, 2019 I ask because my site stops working when I change to the above..... The error message in the log is: AH01071: Got error 'PHP message: PHP Parse error: syntax error, unexpected '??' (T_COALESCE), expecting end of file in /var/www/vhosts/myshop/httpdocs/includes/application_top.php on line 22\n', Link to comment Share on other sites More sharing options...
241 Posted July 13, 2019 Share Posted July 13, 2019 @René H4 try ini_set("error_log", "name_of_directory/php-error.".date('ymd').".log"); No longer giving free advice. Please place deposit in meter slot provided. Individual: [=] SME: [==] Corporation: [===] If deposit does not fit one of the slots provided then you are asking too much! Is your Osc dated try Phoenix raising oscommerce from the ashes. Link to comment Share on other sites More sharing options...
241 Posted July 13, 2019 Share Posted July 13, 2019 @René H4 Did you copy and paste if so try just typing it as sometimes copy and paste introduces errors No longer giving free advice. Please place deposit in meter slot provided. Individual: [=] SME: [==] Corporation: [===] If deposit does not fit one of the slots provided then you are asking too much! Is your Osc dated try Phoenix raising oscommerce from the ashes. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.