<![CDATA[ Bob's Site Check - MySQL and PHP date and time do not match issue on Linux, php 7.1.8 - My Forums]]> https://forums.modx.com/thread/?thread=104234 <![CDATA[Bob's Site Check - MySQL and PHP date and time do not match issue on Linux, php 7.1.8]]> https://forums.modx.com/thread/104234/bob-s-site-check---mysql-and-php-date-and-time-do-not-match-issue-on-linux-php-7-1-8#dis-post-560594
Checking DateTime MySQL and PHP date and time do not match -- See This

MySQL Time: 2018-08-09 15:52:53
PHP Time: 2018-08-09 19:52:52
PHP global.time_zone: SYSTEM
PHP session.time_zone: SYSTEM
PHP system.time_zone: EDT
MODX date_timezone System Setting: ''

QUESTION: What is going on and what should I do about it?

I edited the php.ini file to define date.timezone = America/New_York and restarted.
Re-ran the site check, did not change the results from above.

I then read Bob's Guide on this: https://bobsguides.com/timezones.html
and added date_timezone to MODX (2.6.5) with the value America/New_York.
Results updated the MODX date_timezone System Setting to value to reflect that. Other details and the complaint are unchanged.

I don't really follow the PHP story.

Some details:
php -i | grep zone shows this:
[root@machine-name rh-php71]# php -i | grep zone
"Olson" Timezone Database Version => 0.system
Timezone Database => internal
Default timezone => America/New_York
date.timezone => America/New_York => America/New_York
PHP 7.1.8 (cli) (built: Aug 9 2017 13:20:06) ( NTS )

the date section of phpinfo:
date/time support enabled
"Olson" Timezone Database Version 0.system
Timezone Database internal
Default timezone America/New_York

This environment is CentOS 7, php 7.1.8, apache 2.4.27.

This same MODX site are also on Windows 2016, php 7.1.7 and this site check passes.

Both sites are running MODX 2.6.5. The MYSQL databases behind the website instances are on the same Linux server. [The db server is shared, the database are seperate]

The only difference I have uncovered is that the "Olson" Timezone Daabase Version is 2017.2 rather than 0.system.]]>
jpetersdt Aug 09, 2018, 08:53 PM https://forums.modx.com/thread/104234/bob-s-site-check---mysql-and-php-date-and-time-do-not-match-issue-on-linux-php-7-1-8#dis-post-560594
<![CDATA[Re: Bob's Site Check - MySQL and PHP date and time do not match issue on Linux, php 7.1.8]]> https://forums.modx.com/thread/104234/bob-s-site-check---mysql-and-php-date-and-time-do-not-match-issue-on-linux-php-7-1-8#dis-post-560662 What is odd, though, is it took about 10-12 minutes and a second run of Site Check for it to be happy. Any idea why that would be?
Is this what you meant by it being "sticky"?
Yes, I've had both plugins and System Settings stick around after clearing the cache in the Manager.]]>
BobRay Aug 11, 2018, 05:31 AM https://forums.modx.com/thread/104234/bob-s-site-check---mysql-and-php-date-and-time-do-not-match-issue-on-linux-php-7-1-8#dis-post-560662
<![CDATA[Re: Bob's Site Check - MySQL and PHP date and time do not match issue on Linux, php 7.1.8]]> https://forums.modx.com/thread/104234/bob-s-site-check---mysql-and-php-date-and-time-do-not-match-issue-on-linux-php-7-1-8#dis-post-560628
The good news is that I fixed the problem after doing what you suggested: nuking core/cache from the filesystem.

What is odd, though, is it took about 10-12 minutes and a second run of Site Check for it to be happy. Any idea why that would be?
Is this what you meant by it being "sticky"?

I did not do anything to my browser cache, its cookies or run in InCognito mode. I just continued in the same logged in session.
On the server, I had stopped and started apache before and after I nuked core/cache.

Here is what the error.log looks like. The first Site Check run is at 10:21ish. The second at 10:33. The time difference was me going between site check output and modx error log in the /manager.

[2018-08-10 10:21:01] (INFO @ /opt/rh/httpd24/root/var/www/html/dev.example.com/www/core/model/modx/processors/system/config_check.inc.php : 65) [configcheck] core has not been moved outside web root!
[2018-08-10 10:21:01] (DEBUG @ /opt/rh/httpd24/root/var/www/html/dev.example.com/www/core/model/modx/processors/system/config_check.inc.php : 120) [configcheck] access check http return code: 403
[2018-08-10 10:21:01] (DEBUG @ /opt/rh/httpd24/root/var/www/html/dev.example.com/www/core/model/modx/processors/system/config_check.inc.php : 127) [configcheck] Core folder is not accessible by web this time.
[2018-08-10 10:21:01] (DEBUG @ /opt/rh/httpd24/root/var/www/html/dev.example.com/www/core/model/modx/modlexicon.class.php : 417) Language string not found: "SiteCheck"
[2018-08-10 10:21:03] (WARN @ /opt/rh/httpd24/root/var/www/html/dev.example.com/www/core/components/articles/model/articles/articlesrouter.class.php : 65) PHP notice: Undefined variable: startPageId
[2018-08-10 10:22:30] (INFO @ /opt/rh/httpd24/root/var/www/html/dev.example.com/www/core/xpdo/om/xpdoobject.class.php : 1714) Removed modSession instance with primary key ephse1ku442bkkpfh9ifmn47lq
[2018-08-10 10:22:30] (INFO @ /opt/rh/httpd24/root/var/www/html/dev.example.com/www/core/model/modx/modsessionhandler.class.php : 164) There was an error retrieving or creating session id: is99effr9s6785p35p7gc8i55j
[2018-08-10 10:22:55] (INFO @ /opt/rh/httpd24/root/var/www/html/dev.example.com/www/core/xpdo/om/xpdoobject.class.php : 1714) Removed modSession instance with primary key is99effr9s6785p35p7gc8i55j
[2018-08-10 10:22:55] (INFO @ /opt/rh/httpd24/root/var/www/html/dev.example.com/www/core/model/modx/modsessionhandler.class.php : 164) There was an error retrieving or creating session id: iaeskb9sc1mq0r6le47dtbgkj9
[2018-08-10 10:22:55] (INFO @ /opt/rh/httpd24/root/var/www/html/dev.example.com/www/core/model/modx/processors/system/config_check.inc.php : 65) [configcheck] core has not been moved outside web root!
[2018-08-10 10:22:55] (DEBUG @ /opt/rh/httpd24/root/var/www/html/dev.example.com/www/core/model/modx/processors/system/config_check.inc.php : 120) [configcheck] access check http return code: 403
[2018-08-10 10:22:55] (DEBUG @ /opt/rh/httpd24/root/var/www/html/dev.example.com/www/core/model/modx/processors/system/config_check.inc.php : 127) [configcheck] Core folder is not accessible by web this time.
[2018-08-10 10:23:03] (DEBUG @ /opt/rh/httpd24/root/var/www/html/dev.example.com/www/core/model/modx/modlexicon.class.php : 417) Language string not found: ""
[2018-08-10 10:23:03] (DEBUG @ /opt/rh/httpd24/root/var/www/html/dev.example.com/www/core/model/modx/modlexicon.class.php : 417) Language string not found: ""
[2018-08-10 10:23:06] (DEBUG @ /opt/rh/httpd24/root/var/www/html/dev.example.com/www/core/model/modx/modlexicon.class.php : 417) Language string not found: ""
[2018-08-10 10:23:06] (DEBUG @ /opt/rh/httpd24/root/var/www/html/dev.example.com/www/core/model/modx/modlexicon.class.php : 417) Language string not found: ""
[2018-08-10 10:23:06] (DEBUG @ /opt/rh/httpd24/root/var/www/html/dev.example.com/www/core/model/modx/modlexicon.class.php : 417) Language string not found: "sitecheck_results"
[2018-08-10 10:23:06] (DEBUG @ /opt/rh/httpd24/root/var/www/html/dev.example.com/www/core/model/modx/modlexicon.class.php : 417) Language string not found: ""
[2018-08-10 10:23:06] (DEBUG @ /opt/rh/httpd24/root/var/www/html/dev.example.com/www/core/model/modx/modlexicon.class.php : 417) Language string not found: ""
[2018-08-10 10:33:16] (DEBUG @ /opt/rh/httpd24/root/var/www/html/dev.example.com/www/core/model/modx/modlexicon.class.php : 417) Language string not found: ""
[2018-08-10 10:33:16] (DEBUG @ /opt/rh/httpd24/root/var/www/html/dev.example.com/www/core/model/modx/modlexicon.class.php : 417) Language string not found: ""
[2018-08-10 10:33:18] (DEBUG @ /opt/rh/httpd24/root/var/www/html/dev.example.com/www/core/model/modx/modlexicon.class.php : 417) Language string not found: ""
[2018-08-10 10:33:18] (DEBUG @ /opt/rh/httpd24/root/var/www/html/dev.example.com/www/core/model/modx/modlexicon.class.php : 417) Language string not found: ""
[2018-08-10 10:33:18] (DEBUG @ /opt/rh/httpd24/root/var/www/html/dev.example.com/www/core/model/modx/modlexicon.class.php : 417) Language string not found: "sitecheck_results"
[2018-08-10 10:33:18] (DEBUG @ /opt/rh/httpd24/root/var/www/html/dev.example.com/www/core/model/modx/modlexicon.class.php : 417) Language string not found: ""
[2018-08-10 10:33:18] (DEBUG @ /opt/rh/httpd24/root/var/www/html/dev.example.com/www/core/model/modx/modlexicon.class.php : 417) Language string not found: ""
]]>
jpetersdt Aug 10, 2018, 03:09 PM https://forums.modx.com/thread/104234/bob-s-site-check---mysql-and-php-date-and-time-do-not-match-issue-on-linux-php-7-1-8#dis-post-560628
<![CDATA[Re: Bob's Site Check - MySQL and PHP date and time do not match issue on Linux, php 7.1.8]]> https://forums.modx.com/thread/104234/bob-s-site-check---mysql-and-php-date-and-time-do-not-match-issue-on-linux-php-7-1-8#dis-post-560601
Also, System Settings can be pretty sticky, so try manually deleting all files in the core/cache directory to make sure your change takes effect.]]>
BobRay Aug 10, 2018, 02:39 AM https://forums.modx.com/thread/104234/bob-s-site-check---mysql-and-php-date-and-time-do-not-match-issue-on-linux-php-7-1-8#dis-post-560601