{"id":5821,"date":"2019-12-16T23:39:26","date_gmt":"2019-12-17T04:39:26","guid":{"rendered":"https:\/\/www.rushworth.us\/lisa\/?p=5821"},"modified":"2019-12-16T23:39:26","modified_gmt":"2019-12-17T04:39:26","slug":"zoneminder-time-zones-and-php-fpm","status":"publish","type":"post","link":"https:\/\/www.rushworth.us\/lisa\/?p=5821","title":{"rendered":"Zoneminder, time zones, and php-fpm"},"content":{"rendered":"<p>I&#8217;m in the process of installing Zoneminder on our new server. It was a fairly straightforward process &#8212; stop Zoneminder on the old server, dump the SQL database, fix the DEFINER values since I&#8217;m using a central database server instead of a server on localhost, install Zoneminder, copy the config file, set up the database user, pull in the SQL file, and start it all up.<\/p>\n<p>Visiting the website, I get &#8220;ZoneMinder is not installed properly: php&#8217;s date.timezone is not set to a valid timezone&#8221;. I&#8217;d forgotten to set the timezone in php.ini. Added &#8216;date.timezone = &#8220;America\/New_York&#8221;&#8216;, restarted httpd and Zoneminder. And got the same error.<\/p>\n<pre>&lt;?php\r\nerror_reporting(E_ALL);\r\nvar_dump(ini_get('date.timezone'),date_default_timezone_get());\r\n?&gt;\r\n<\/pre>\n<p>It&#8217;s <em>not<\/em> set. This isn&#8217;t a funky Zoneminder thing &#8212; this is a PHP problem. I realized that PHP now runs as its own service. Restarting httpd is insufficient. Restarted php-ftm and the time zone I&#8217;d set in php.ini showed up. This is a case where a reboot would have sorted it &#8230; but good to remember that, when changing PHP settings, the <em>php<\/em> service needs to be restarted.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m in the process of installing Zoneminder on our new server. It was a fairly straightforward process &#8212; stop Zoneminder on the old server, dump the SQL database, fix the DEFINER values since I&#8217;m using a central database server instead of a server on localhost, install Zoneminder, copy the config file, set up the database &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[30],"tags":[31,352,863],"class_list":["post-5821","post","type-post","status-publish","format-standard","hentry","category-system-administration","tag-apache","tag-httpd","tag-php-fpm"],"_links":{"self":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/5821","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5821"}],"version-history":[{"count":1,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/5821\/revisions"}],"predecessor-version":[{"id":5822,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/5821\/revisions\/5822"}],"wp:attachment":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5821"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5821"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5821"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}