Page 1 of 2 12 LastLast
Results 1 to 10 of 14
  1. #1
    Join Date
    Oct 2004
    Location
    Northeastern MN, USA
    Posts
    82
    Plugin Contributions
    0

    Default "Warning: An error occurred" and no debug logs

    I upgraded from 1.3.8 to 1.5.1 a few months ago and just recently the following started happening:

    - After order confirmation, the user gets the "Warning: An error occurred, please refresh" message. The user hits refresh and the order gets submitted twice.

    - Only one item from the order gets stored in the database, though all items get listed in PayPal or in Linkpoint.

    I tried looking in both /cache/ and /logs/ for MyDebugxxxxxx.log and there aren't any in either place.

    I'm not sure where to go next.
    -emiLy & Ryan Quick
    TheECstore.com

  2. #2
    Join Date
    Jul 2009
    Location
    picaflor-azul.com
    Posts
    6,930
    Plugin Contributions
    45

    Default Re: "Warning: An error occurred" and no debug logs

    Make sure that you have the permissions set on your logs folder to be writeable.

    Thanks,

    Anne

  3. #3
    Join Date
    Oct 2004
    Location
    Northeastern MN, USA
    Posts
    82
    Plugin Contributions
    0

    Default Re: "Warning: An error occurred" and no debug logs

    The logs directory is writeable.
    -emiLy & Ryan Quick
    TheECstore.com

  4. #4
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,486
    Plugin Contributions
    88

    Default Re: "Warning: An error occurred" and no debug logs

    Check to see that your host hasn't disabled the ability to control the error-reporting capabilities of PHP. Take this code:
    Code:
    <?php
      define('DIR_FS_LOGS', 'c:/xampp/htdocs/test/logs');
      
      $debug_logfile_path = DIR_FS_LOGS . '/myDEBUG-' . time() . '-' . mt_rand(1000,999999) . '.log';
    
    /**
     * Error reporting level to log
     * Default: E_ALL ^E_NOTICE
     */
      $errors_to_log = (version_compare(PHP_VERSION, 5.3, '>=') ? E_ALL & ~E_DEPRECATED & ~E_NOTICE : version_compare(PHP_VERSION, 5.4, '>=') ? E_ALL & ~E_DEPRECATED & ~E_NOTICE & ~E_STRICT : E_ALL & ~E_NOTICE);
    
    
    ///// DO NOT EDIT BELOW THIS LINE /////
    
    //////////////////// DEBUG HANDLING //////////////////////////////////
    
        ini_set('log_errors', '1');          // store to file
        ini_set('log_errors_max_len', '0');  // unlimited length of message output
        ini_set('display_errors', '0');      // do not output errors to screen/browser/client
        ini_set('error_log', $debug_logfile_path);  // the filename to log errors into
        ini_set('error_reporting', -1 ); // log only errors according to defined rules
     
     error_log ('did this get there?');
     
      
     echo 'log_errors: ' . ini_get ('log_errors') . "\n";
     echo 'log_errors_max_len: ' . ini_get ('log_errors_max_len') . "\n";
     echo 'display_errors: ' . ini_get ('display_errors') . "\n";
     echo 'error_log: ' . ini_get ('error_log') . "\n";
     echo 'error_reporting: ' . ini_get ('error_reporting');
    Change the file-system path to that specified in your /includes/configure.php and save the file as some_special_filename.php in the root directory of your store. Navigate your browser to www.example.com/some_special_filename.php and make sure that the 'error_log" value displayed is the filepath that was set. Make sure to erase the file once you've run the test.

    If the error_log directory doesn't match the DIR_FS_LOGS path, you should contact your webhost and ask them why they are preventing you from changing the error-reporting directives.

  5. #5
    Join Date
    Oct 2004
    Location
    Northeastern MN, USA
    Posts
    82
    Plugin Contributions
    0

    Default Re: "Warning: An error occurred" and no debug logs

    Did that test (thank you!) and everything worked properly and it made a debug file in the logs folder. So apparently Zen Cart is not making the logs even though it should be capable of it. What do I look for next?
    -emiLy & Ryan Quick
    TheECstore.com

  6. #6
    Join Date
    Jul 2012
    Posts
    16,733
    Plugin Contributions
    17

    Default Re: "Warning: An error occurred" and no debug logs

    Quote Originally Posted by emiLy View Post
    Did that test (thank you!) and everything worked properly and it made a debug file in the logs folder. So apparently Zen Cart is not making the logs even though it should be capable of it. What do I look for next?
    While not privy to the plan considered by lat9 and anne, I would think something to try/check next wwould be to turn on logging for PayPal, attempt a transaction, and then turn off logging and report results (with whatever names obscured as desired.) Or if not at least that, then see if processing through a check/mail (sorry, forgot the specific term) to ensure that it is not something specifically ZC related.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  7. #7
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,486
    Plugin Contributions
    88

    Default Re: "Warning: An error occurred" and no debug logs

    Quote Originally Posted by emiLy View Post
    Did that test (thank you!) and everything worked properly and it made a debug file in the logs folder. So apparently Zen Cart is not making the logs even though it should be capable of it. What do I look for next?
    Re-check your /includes/configure.php file, to make sure that the DIR_FS_LOGS definition is exactly the same as the one you used in the test (no extra or missing /'s, for example).

  8. #8
    Join Date
    Oct 2004
    Location
    Northeastern MN, USA
    Posts
    82
    Plugin Contributions
    0

    Default Re: "Warning: An error occurred" and no debug logs

    I didn't have a DIR_FS_LOGS definition in my configure.php file, so I added it. Still no logging taking place. Are there other definitions that are supposed to be in configure.php that govern logging? I don't know why it wasn't there in the first place.
    -emiLy & Ryan Quick
    TheECstore.com

  9. #9
    Join Date
    Jul 2012
    Posts
    16,733
    Plugin Contributions
    17

    Default Re: "Warning: An error occurred" and no debug logs

    Quote Originally Posted by emiLy View Post
    I didn't have a DIR_FS_LOGS definition in my configure.php file, so I added it. Still no logging taking place. Are there other definitions that are supposed to be in configure.php that govern logging? I don't know why it wasn't there in the first place.
    Might I suggest that you "briefly" turn debug_autoload on? There may be an error that is occurring before the ZC error loader is able to detect and report. This can be done by going to your includes folder and modifying line 75 to a value of true from false. Load the page, then turn it off again by setting to false. Inspect the information presented to screen and compare to your configure.php file. This may be faster than trying to continue back and forth. Resolution should be provided back here to help others having a similar problem.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  10. #10
    Join Date
    Oct 2004
    Location
    Northeastern MN, USA
    Posts
    82
    Plugin Contributions
    0

    Default Re: "Warning: An error occurred" and no debug logs

    Line 75 of which file in the includes folder?
    -emiLy & Ryan Quick
    TheECstore.com

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 5
    Last Post: 19 Mar 2015, 06:53 PM
  2. v151 ipn_main_handler "WARNING: An Error occurred, please refresh the page and try again."
    By MeltDown in forum PayPal Express Checkout support
    Replies: 1
    Last Post: 10 May 2013, 02:38 PM
  3. Replies: 1
    Last Post: 26 Aug 2012, 01:26 PM
  4. "An Error Occurred" on IIS Server, have log
    By dgusahospitality in forum Installing on a Windows Server
    Replies: 4
    Last Post: 25 Jun 2012, 04:47 AM
  5. Strange "shopping cart" warning in logs
    By quentinjs in forum Upgrading from 1.3.x to 1.3.9
    Replies: 4
    Last Post: 9 Jan 2007, 06:57 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR