• Welcome to the Chevereto user community!

    Here users from all over the world gather around to learn the latest about Chevereto and contribute with ideas to improve the software.

    Please keep in mind:

    • 😌 This community is user driven. Be polite with other users.
    • 👉 Is required to purchase a Chevereto license to participate in this community (doesn't apply to Pre-sales).
    • 💸 Purchase a Pro Subscription to get access to active software support and faster ticket response times.

Update problem

Status
Not open for further replies.

Focker

💖 Chevereto Fan
Website URL
<private>

Chevereto version
3.10.2

Description of the issue
Hi Rodolofo,

I just tried updating to 3.10.2. I went through my site's dashboard, checked for updates and clicked update now. The process seemed to start and when it got to the extracting session...My page went blank and now my site is down.

I'm very sorry for the trouble and I really thought I was doing the process correctly. Please let me know what you need from me so that I can get back up and running.

Thank you!
 
Always check the error log:

Code:
[18-Sep-2017 04:56:54 UTC] PHP Fatal error:  Uncaught exception 'Exception' with message 'DateTime::__construct(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone.' in /lib/G/G.php:35
Stack trace:
#0 /lib/G/G.php(35): DateTime->__construct()
#1 /app/loader.php(36): require_once('/<path>/...')
#2 /index.php(20): include_once('/<path>/...')
#3 {main}
  thrown in /lib/G/G.php on line 35

But the code doesn't look odd. Here:

PHP:
// TZ failover
try {
    $DT = new \DateTime();
} catch(Exception $e) {
    if(!@date_default_timezone_set('America/Santiago')) {
        die(sprintf("G\: %s", $e->getMessage()));
    }
}

Instead of catching the exception, it is throwing an E_WARNING and freezes execution. Odd thing is that your timezone is totally fine (UTC). This code is more "bad config aware":

PHP:
// TZ failover
$tz = @date_default_timezone_get();
$dtz = @date_default_timezone_set($tz);
if(!$dtz && !@date_default_timezone_set('America/Santiago')) {
    die(strtr('Invalid timezone identifier: %i. Configure php.ini with a valid timezone identifier %l', ['%i' => $tz, '%l' => 'http://php.net/manual/en/timezones.php']));
}

Is quite odd, could be something stupid like 'UTC' instead of 'utc' but whatever, G\ fixes that thing for you. PHP shouldn't fail for this, that's why I added a timezone failover... And it failed, lol.

Anyway, I've fixed it for you, clear caches and check again.
 
Thanks...I was looking at the error log was trying to figure out how to fix line 36 and others, but I'm glad you took care of it before I really messed things up. 🙂
 
Looks like a PHP version error, from time to time PHP gets full of bugs and this is clearly something that shouldn't fail. Possibly in a newer (stable) release, this doesn't happen. That's why I've to add several fail-safe snippets to try to avoid that because I never can tell which version has or not a given bug.

But hey, helps me to debug it asap so I've already patched v3.10.2.
 
Status
Not open for further replies.
Back
Top