Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Need help about PHP Error


Supersamui

Recommended Posts

I have some Error in my Controlshop.

Please help me to fix it

 

 

Warning: error_log(/var/log/www/tep/page_parse_time.log) [function.error-log]: failed to open stream: No such file or directory in d:\ip1\madeatthailand.biz\www\controlshop\includes\classes\logger.php on line 49

Parse Time: 0.858s

 

and Here Code

 

 

<?php

/*

$Id: logger.php,v 1.3 2003/06/20 16:23:08 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

class logger {

var $timer_start, $timer_stop, $timer_total;

 

// class constructor

function logger() {

$this->timer_start();

}

 

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(getenv('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); <----- line 49

}

}

?>

 

 

Thank you for answer :rolleyes:

Link to comment
Share on other sites

I have some Error in my Controlshop.

Please help me to fix it

Warning: error_log(/var/log/www/tep/page_parse_time.log) [function.error-log]: failed to open stream: No such file or directory in d:\ip1\madeatthailand.biz\www\controlshop\includes\classes\logger.php on line 49

Parse Time: 0.858s

 

and Here Code

<?php

/*

$Id: logger.php,v 1.3 2003/06/20 16:23:08 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

class logger {

var $timer_start, $timer_stop, $timer_total;

 

// class constructor

function logger() {

$this->timer_start();

}

 

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(getenv('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); <----- line 49

}

}

?>

Thank you for answer :rolleyes:

 

 

The script is looking for ..

 

/var/log/www/tep/page_parse_time.log

 

Which isn't there.

Link to comment
Share on other sites

The script is looking for ..

 

/var/log/www/tep/page_parse_time.log

 

Which isn't there.

 

 

Try the following ..

 

Go into admin>configuration

 

Click Logging

 

Highlight "Log destination"

 

Click "edit"

 

Change to

 

d:/ip1/madeatthailand.biz/www/controlshop/page_parse_time.log

 

Create a file in the /controlshop/ folder called page_parse_time.log (make sure it is writeable)

Link to comment
Share on other sites

Try the following ..

 

Go into admin>configuration

 

Click Logging

 

Highlight "Log destination"

 

Click "edit"

 

Change to

 

d:/ip1/madeatthailand.biz/www/controlshop/page_parse_time.log

 

Create a file in the /controlshop/ folder called page_parse_time.log (make sure it is writeable)

 

 

Thank you I'll try

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...