Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2006
    Location
    Kihikihi, New Zealand
    Posts
    230
    Plugin Contributions
    3

    Parse Time Log file not set - causing error message

    Hi all,

    I have 2 error messages:


    1) in my shop, just above the footer:

    Warning: error_log(/var/log/www/zen/page_parse_time.log): failed to open stream: No such file or directory in /home/content/i/n/e/XXXX/html/shop/includes/modules/footer.php on line 39

    Here is line 37-39 from my footer:
    if (STORE_PAGE_PARSE_TIME == 'true') {

    error_log(strftime(STORE_PARSE_DATE_TIME_FORMAT) . ' - ' . $_SERVER['REQUEST_URI'] . ' (' . $parse_time . 's)' . "\n", 3, STORE_PAGE_PARSE_TIME_LOG);


    2) in my shop manager index.php:

    Warning: error_log(/var/log/www/zen/page_parse_time.log): failed to open stream: No such file or directory in /home/content/i/n/e/XXXX/html/shop/YYYY/includes/classes/logger.php on line 60


    How can I fix this?

    Thanks,

    Goshawk



    Below is the code from my logger.php:

    class logger {

    var $timer_start, $timer_stop, $timer_total;



    // class constructor

    function logger() {

    $this->timer_start();

    }
    <<<<<<<this is line 60 (empty line)>>>>>


    function timer_start() {

    if (defined("PAGE_PARSE_START_TIME")) {

    $this->timer_start = PAGE_PARSE_START_TIME;

    } else {

    $this->timer_start = microtime();

    }

    }



    function timer_stop($display = 'false') {

    $this->timer_stop = microtime();



    $time_start = explode(' ', $this->timer_start);

    $time_end = explode(' ', $this->timer_stop);



    $this->timer_total = number_format(($time_end[1] + $time_end[0] - ($time_start[1] + $time_start[0])), 3);



    $this->write($_SERVER['REQUEST_URI'], $this->timer_total . 's');



    if ($display == 'true') {

    return $this->timer_display();

    }

    }



    function timer_display() {

    return '<span class="smallText">Parse Time: ' . $this->timer_total . 's</span>';

    }



    function write($message, $type) {

    error_log(strftime(STORE_PARSE_DATE_TIME_FORMAT) . ' [' . $type . '] ' . $message . "\n", 3, STORE_PAGE_PARSE_TIME_LOG);

    }

    }

    ?>
    Time is but an illusion, there is only "now"!

  2. #2
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Not sure if this is a bug?????

    You have turned on the parse-time logging option but not created a file for it to dump into and not made it writable.

    Turn it off by going to: Admin->Configuration->Logging->Store Page Parse Time ... and set it to 'false'.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Aug 2006
    Location
    Kihikihi, New Zealand
    Posts
    230
    Plugin Contributions
    3

    Default Re: Parse Time Log file not set - causing error message

    Thanks Dr Byte
    Time is but an illusion, there is only "now"!

 

 

Similar Threads

  1. v151 Invalid multibyte sequence in argument... Error Message in log file
    By Peace Freak in forum Upgrading to 1.5.x
    Replies: 2
    Last Post: 7 Jun 2013, 09:18 AM
  2. Error Message: I can not write to this file. Please set the right user permissions on
    By jbinspirations in forum Customization from the Admin
    Replies: 4
    Last Post: 12 Mar 2011, 07:59 AM
  3. Page Parse Time Log
    By mauryg in forum General Questions
    Replies: 6
    Last Post: 11 Jun 2008, 06:10 AM
  4. Error message in log file
    By ericny in forum General Questions
    Replies: 4
    Last Post: 30 Jan 2007, 06:30 PM
  5. Error message when trying to log in to Admin: No input file specified
    By zcartbonn in forum Installing on a Mac Server
    Replies: 4
    Last Post: 25 May 2006, 11:54 PM

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