Forums / General Questions / How do I resolve this error/warning? page_parse_time.log failed to open stream

How do I resolve this error/warning? page_parse_time.log failed to open stream

Views: 2,986

Results 1 to 20 of 42
31 Jan 2016, 2:27 AM
#1
xcergy avatar

xcergy

Zen Follower

Join Date:
Feb 2009
Location:
Landrum SC
Posts:
141
Plugin Contributions:
0

How do I resolve this error/warning? page_parse_time.log failed to open stream

Warning: error_log(/home/users/web/b1441/acct_name/cache/page_parse_time.log) [function.error-log]: failed to open stream: No such file or directory in C:\xampp\htdocs\local_cart\admin_name\includes\classes\logger.php on line 60

(This shows up on the bottom of the admin/home page)

I'm moving my website to my local machine.
I followed the instructions:
https://www.zen-cart.com/content.php?142-i-want-to-move-my-zen-cart-installation-to-another-host-or-a-different-server

I did a zip backup before downloading to prevent single file errors.

/home/users/web/b1441/acct_name/ is the path to my host's website.

C:\xampp\htdocs\local_cart\ is the path on localhost.

The admin side works. The storefront is a blank page. There are no logfiles.

I need to upgrade to 1.5.4, but due to an unannounced PHP upgrade by my host, I am unable to uninstall old addons before I can upgrade and retain the product data on the database.

TIA.

31 Jan 2016, 10:17 AM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: How do I resolve this error/warning? page_parse_time.log failed to open stream

Try changing this

admin > config > logging > Store Page Parse Time > set to "false"

Zen-Venom Get Bitten

31 Jan 2016, 1:06 PM
#3
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: How do I resolve this error/warning? page_parse_time.log failed to open stream

While the suggestions provided ought to address this one issue, the fact that there is an older path still present indicates that the transfer is not quite complete. Could you provide a few lines (maybe -5 and +5) before and after the following: C:\xampp\htdocs\local_cart\admin_name\includes\classes\logger.php on line 60

To see if there is still something not quite coded correctly to work on your local version of the site.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

31 Jan 2016, 3:03 PM
#4
xcergy avatar

xcergy

Zen Follower

Join Date:
Feb 2009
Location:
Landrum SC
Posts:
141
Plugin Contributions:
0

Re: How do I resolve this error/warning? page_parse_time.log failed to open stream

   admin > config > logging > Store Page Parse Time > set to "false" 

Where is that? I can't find it.

C:\xampp\htdocs\local_cart\admin_name\includes\classes\logger.php

    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);
    }
  }
?>
31 Jan 2016, 6:31 PM
#5
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,119
Plugin Contributions:
56

Re: How do I resolve this error/warning? page_parse_time.log failed to open stream

xcergy:

   admin > config > logging > Store Page Parse Time > set to "false" 

Where is that? I can't find it.
Navigate to your admin's Configuration->Logging and then change the setting for Store Page Parse Time to false.

While you're there, also change the Log Destination to /home/users/web/b1441/acct_name/cache/page_parse_time.log

31 Jan 2016, 6:42 PM
#6
xcergy avatar

xcergy

Zen Follower

Join Date:
Feb 2009
Location:
Landrum SC
Posts:
141
Plugin Contributions:
0

Re: How do I resolve this error/warning? page_parse_time.log failed to open stream

lat9:

Navigate to your admin's Configuration->Logging and then change the setting for Store Page Parse Time to false.

While you're there, also change the Log Destination to /home/users/web/b1441/acct_name/cache/page_parse_time.log

Found it. was able to change the path there. Thanks

31 Jan 2016, 6:51 PM
#7
xcergy avatar

xcergy

Zen Follower

Join Date:
Feb 2009
Location:
Landrum SC
Posts:
141
Plugin Contributions:
0

Re: How do I resolve this error/warning? page_parse_time.log failed to open stream

The cart still is a blank page, and there is no relater error log to point to the problem.

31 Jan 2016, 7:59 PM
#8
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,119
Plugin Contributions:
56

Re: How do I resolve this error/warning? page_parse_time.log failed to open stream

If you're **really **still using Zen Cart v1.3.8a, the "native" processing did not include the error log handling. You can install the myDebug Backtrace (https://www.zen-cart.com/downloads.php?do=file&id=1879) plugin to enable logging to your store's /cache folder ...

... and you should really, really consider starting to upgrade.

31 Jan 2016, 9:07 PM
#9
xcergy avatar

xcergy

Zen Follower

Join Date:
Feb 2009
Location:
Landrum SC
Posts:
141
Plugin Contributions:
0

Re: How do I resolve this error/warning? page_parse_time.log failed to open stream

... and you should really, really consider starting to upgrade.

I'll look into that plugin.

And yes, I will upgrade, and tried to explain my method of madness. 1.3.8 is no longer available/working on my host, and this is the only way I can save the database, removed outdated plugins befor installing 1.5.4.

31 Jan 2016, 9:10 PM
#10
xcergy avatar

xcergy

Zen Follower

Join Date:
Feb 2009
Location:
Landrum SC
Posts:
141
Plugin Contributions:
0

Re: How do I resolve this error/warning? page_parse_time.log failed to open stream

lat9:

If you're **really **still using Zen Cart v1.3.8a, the "native" processing did not include the error log handling. You can install the myDebug Backtrace (https://www.zen-cart.com/downloads.php?do=file&id=1879) plugin to enable logging to your store's /cache folder ...

Is there a link for 1.3.8? The page you referenced is for 1.5.x

31 Jan 2016, 9:42 PM
#11
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,119
Plugin Contributions:
56

Re: How do I resolve this error/warning? page_parse_time.log failed to open stream

The plugin should still operate on 1.3.8a.

31 Jan 2016, 9:52 PM
#12
xcergy avatar

xcergy

Zen Follower

Join Date:
Feb 2009
Location:
Landrum SC
Posts:
141
Plugin Contributions:
0

Re: How do I resolve this error/warning? page_parse_time.log failed to open stream

Found this ..
https://www.zen-cart.com/downloads.php?do=file&id=606

Installed but shows nothing :-(

1 Feb 2016, 1:14 AM
#13
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: How do I resolve this error/warning? page_parse_time.log failed to open stream

I really hate to say this to someone that is trying so hard to follow the recommended instructions for upgrading. In the perspective of upgrading the database to operate under the newer version of ZC, if the plugins that were installed before the upgrade have an upgrade path to the current ZC, then any database changes made in that upgrade path can be made in parallel with the ZC store upgrade. Any plugins that will be abandoned can have their applicable database modifications (removal) made after the upgrade.

I somewhat feel that the last week or so in attempt to get this store upgraded (functional to make money) more effort has been spent (time = money) than is really necessary to become operational again.

Ideally, and basically speaking, plugins that touch the database if supported on this site at any version do not disable the ability to upgrade. They may leave behind some inaccurate settings that require a little bit of modification (typically seen sites with early mods to allow multiple admins might require a little login massaging to get back on track, but never something unrecoverable). There's even a plugin now available that basically inspects the database and identifies changes to the system that might need to be addressed...

Further understand that if a plugin does have an upgrade path that in some cases removal of that plugin by deletion of database information would be a loss for that plugin as that data may have to be manually/painstakingly recreated. That of course is something applicable to the plugin(s), and could/should be addressed in the plugin's forum... Listing said plugins here (as suggested by the forum posting tips) would help others to help you identify if this effort is even worth all that is being done.

Lastly, stated that it is not possible to salvage the database without going through this process, but question is, have you tried the upgrade on a backup of the database and what were the results?

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

1 Feb 2016, 2:56 AM
#14
xcergy avatar

xcergy

Zen Follower

Join Date:
Feb 2009
Location:
Landrum SC
Posts:
141
Plugin Contributions:
0

Re: How do I resolve this error/warning? page_parse_time.log failed to open stream

Thanks for your post mc12345678.

This is site #2 that I am working on upgrading. It has taken a couple of weeks just to figure out how to grab a full db backup. (something the host CS won't tell you how to do). It has been years since I have gotten fully involved 'coding' the website. It's one of those things where you set it and forget it, like reading the book to setup a new printer or network. If I got new ones tomorrow, it would be a new learning curve just to find the IP#s .... at least I know where to look. Zen is not that much different.

Site #1 had room for more than one database, and I needed an upgrade with a template that is mobile friendly. It is now up and running, but starting from scratch, I only have 100 of the 800 items loading in the cart.

Site #2 is a host bare minimum site, and only has room for 1 SQL database. You were talking about addons that touch the database. One is GoogleFroogle, and cowoa. From what I have read, the upgrade instructions are clear about removing add-ons before upgrading. Getting 1.3.8 to run on localhost is challenge enough. I must have re-loaded the install a dozen time, and now the admin works, but the webpage is still blank. I really want to get this right before moving on to the upgrade to my host. I don't want to start this one from scratch either as it has over 500 digital downloads, and setting up attributes for file downloads is an added pita.

1 Feb 2016, 3:26 AM
#15
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: How do I resolve this error/warning? page_parse_time.log failed to open stream

xcergy:

Thanks for your post mc12345678.

This is site #2 that I am working on upgrading. It has taken a couple of weeks just to figure out how to grab a full db backup. (something the host CS won't tell you how to do). It has been years since I have gotten fully involved 'coding' the website. It's one of those things where you set it and forget it, like reading the book to setup a new printer or network. If I got new ones tomorrow, it would be a new learning curve just to find the IP#s .... at least I know where to look. Zen is not that much different.

Site #1 had room for more than one database, and I needed an upgrade with a template that is mobile friendly. It is now up and running, but starting from scratch, I only have 100 of the 800 items loading in the cart.

Site #2 is a host bare minimum site, and only has room for 1 SQL database. You were talking about addons that touch the database. One is GoogleFroogle, and cowoa. From what I have read, the upgrade instructions are clear about removing add-ons before upgrading. Getting 1.3.8 to run on localhost is challenge enough. I must have re-loaded the install a dozen time, and now the admin works, but the webpage is still blank. I really want to get this right before moving on to the upgrade to my host. I don't want to start this one from scratch either as it has over 500 digital downloads, and setting up attributes for file downloads is an added pita.

So that's the thing. Neither of those two plugins as far as I've seen would prevent setting up a bare ZC 1.x.x site, dropping the tables for that store, loading the tables for the old store, continuing the upgrade process using zc_install.

As for the single database to perform an upgrade on, not exactly easy, but it is possible with proper "change" management... Heck, hadn't really thought of this side of things and not sure if it would work without first doing the upgrade, but the zc_install process does allow for database table prefix changes... If it could work, I would backup the current database, use that process to rename the current database, then reupload the copy of the current database, then do an upgrade on the new copy...

Alternatively, backup the database, if it has no prefix, then unfortunately go through the 100ish tables using a search and replace of 'create table ' for 'create table zen_' where the single quotes wouldn't be used, but are there to show the space following the word table as part of the search and replace...

As for your local environment. Well, you need pretty much all "old" software for it all to work as necessary.

The white screen with no logs, you need to enable a little more information to be displayed because it would seem that a problem is occurring before the ZC error logging has picked up. See:http://www.zen-cart.com/content.php?124-blank-page

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

1 Feb 2016, 6:18 AM
#16
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: How do I resolve this error/warning? page_parse_time.log failed to open stream

What ver of php is on your xampp install??
What version of ZenCart is producing a blank page?

Zen-Venom Get Bitten

1 Feb 2016, 7:08 AM
#17
xcergy avatar

xcergy

Zen Follower

Join Date:
Feb 2009
Location:
Landrum SC
Posts:
141
Plugin Contributions:
0

Re: How do I resolve this error/warning? page_parse_time.log failed to open stream

As for your local environment. Well, you need pretty much all "old" software for it all to work as necessary.

I have that! I played w xampp way back when when i first discovered Zen

The white screen with no logs, you need to enable a little more information to be displayed because it would seem that a problem is occurring before the ZC error logging has picked up. See:http://www.zen-cart.com/content.php?124-blank-page.

I have been all over that page, used the configure.php trick in a /includes/local/configure.php, tried the DeBug error log file ..... nothing has worked. I even switched back to the oem template with no luck or error files. I'm tempted next to replace files from the 1.3.8zip file set directory by directory to see if that solves the problem. At least the admin side still works so I can view products and attributes.

1 Feb 2016, 7:11 AM
#18
xcergy avatar

xcergy

Zen Follower

Join Date:
Feb 2009
Location:
Landrum SC
Posts:
141
Plugin Contributions:
0

Re: How do I resolve this error/warning? page_parse_time.log failed to open stream

kobra:

What ver of php is on your xampp install??
What version of ZenCart is producing a blank page?

xampp 1.7.0 PHP 5.2.8 zen 1.3.8

admin pages work, the website page is blank.

1 Feb 2016, 3:44 PM
#19
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: How do I resolve this error/warning? page_parse_time.log failed to open stream

xcergy,

Why are you attempting to load the old 1.3.8 version??
Why not load the upgraded version?

BTW: the php version should be compatible with 1.3.8 - might look at other reasons for the blank page

Zen-Venom Get Bitten

1 Feb 2016, 4:40 PM
#20
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: How do I resolve this error/warning? page_parse_time.log failed to open stream

xcergy:

xampp 1.7.0 PHP 5.2.8 zen 1.3.8

admin pages work, the website page is blank.

What error logs do you have with your local server? These would be outside of the ZC server assuming that the error log directfory is writeable by xampp. This could be tested since the admin is operational. Especially since you've said you've tried adding the line that is supposed to allow showing errors on the screen.

Could try this to verify that at least the admin side is setup correctly to log errors and at the same time that the directory accepts storing errors:

In your admin directory, create a file and give it a name like logerror.php with the following content (no spaces or other characters before the first <?php):

<?php
require("includes/application_top.php");

$result = $db->Execute('select p.prod_weight from ' . TABLE_PRODUCTS . ' p where p.prod_id = 5');

The above ought to generate an error and is incorrectly written on purpose.

Once logged into the admin, change the uri to access the above file: YOUR_ADMIN/logerror.php

You will more than likely get a blank screen (expected) but a log file should be made.

Check the /cache directory for the logged error file. If the file isn't logged, then more than likely there is a permissions error.

Once verified that the log file is generated, the above file can be deleted.

As to "having" to uninstall previous plugins before attempting an upgrade, the following upgrade by rebuild doesn't sdiscuss removal of previous plugins, but does address installation of most up-to-date one(s).

As for database constraints, there are ways that a backup of your database backup can be modified to use a different prefix including adding one if one was not used... This way two stores can operate off the same database at least for testing, and then only the needed operations reproduced on the "real" database.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...