InValid TimeZone

Forum for questions and support relating to the 1.29.x releases only.
philip_d
Posts: 16
Joined: Mon Apr 25, 2016 1:17 pm

InValid TimeZone

Post by philip_d »

Hi, Everyone,

Is there anybody that can help me regarding 1.29 version.Below is the error when I connect on the browser. I changed already the timezone but still the same.I'm using Unbuntu LTS16.04 Server

ZoneMinder is not installed properly: php's date.timezone is not set to a valid timezone

Thanks
PacoLM
Posts: 971
Joined: Wed Dec 02, 2009 9:55 pm
Location: Spain

Re: InValid TimeZone

Post by PacoLM »

There are a couple of php.ini files. Check if you have edited the correct one by searching them using the command:

find / -name php.ini

Regards,
PacoLM

After more than 15 years, no longer using ZM as surveillance system.
Now in the dark side, using a commercial system...
philip_d
Posts: 16
Joined: Mon Apr 25, 2016 1:17 pm

Re: InValid TimeZone

Post by philip_d »

I tried to change all the settings (timezone) of php.ini but the problem still the same.

ZoneMinder is not installed properly: php's date.timezone is not set to a valid timezone

OS : Unbuntu LTS 16.04
Zoneminder : 1.29

Thanks
SteveGilvarry
Posts: 494
Joined: Sun Jun 29, 2014 1:12 pm
Location: Melbourne, AU

Re: InValid TimeZone

Post by SteveGilvarry »

So assuming you have a standard 16.04 install of PHP, run this and post the results please.

Code: Select all

cat /etc/php/7.0/apache2/php.ini | grep 'date.timezone ='
Production Zoneminder 1.37.x (Living dangerously)
Random Selection of Cameras (Dahua and Hikvision)
philip_d
Posts: 16
Joined: Mon Apr 25, 2016 1:17 pm

Re: InValid TimeZone

Post by philip_d »

Below it appear when I run your command.

date.timezone = Asia/Muscat
SteveGilvarry
Posts: 494
Joined: Sun Jun 29, 2014 1:12 pm
Location: Melbourne, AU

Re: InValid TimeZone

Post by SteveGilvarry »

Looks good, just making sure no ; in front and is a valid timezone.
Restarted apache? service apache2 reload

After that you are going to have to investigate your PHP setup using phpinfo(), mainly looking for exactly which php.ini file your install is using.
Production Zoneminder 1.37.x (Living dangerously)
Random Selection of Cameras (Dahua and Hikvision)
philip_d
Posts: 16
Joined: Mon Apr 25, 2016 1:17 pm

Re: InValid TimeZone

Post by philip_d »

Hi Steve,

do you have the link for installation for this Zoneminder 1.29 on Unbuntu LTS 16.04? I tried to change all the timezone in each php but still the same.

Thanks
SteveGilvarry
Posts: 494
Joined: Sun Jun 29, 2014 1:12 pm
Location: Melbourne, AU

Re: InValid TimeZone

Post by SteveGilvarry »

Production Zoneminder 1.37.x (Living dangerously)
Random Selection of Cameras (Dahua and Hikvision)
bjb1959
Posts: 27
Joined: Mon Oct 06, 2014 12:57 pm

Re: InValid TimeZone

Post by bjb1959 »

SteveGilvarry wrote:Looks good, just making sure no ; in front and is a valid timezone.
Restarted apache? service apache2 reload

After that you are going to have to investigate your PHP setup using phpinfo(), mainly looking for exactly which php.ini file your install is using.
I have the same problem. I did not have this issue with 15.10. I have 3 php.ini files. all have been set identically. the one my system uses is located in the cli subfolder (/etc/php/7.0/cli) I have restarted apache using sudo service apache2 restart but still the issue remains. any ideas? :?

[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = America/Chicago
SteveGilvarry
Posts: 494
Joined: Sun Jun 29, 2014 1:12 pm
Location: Melbourne, AU

Re: InValid TimeZone

Post by SteveGilvarry »

Are you using nginx? Because my fresh 16.04 build is using /etc/php/7.0/apache2/php.ini.
I would be checking where it is coming from using a phpinfo() test page, as your string is correct.
Production Zoneminder 1.37.x (Living dangerously)
Random Selection of Cameras (Dahua and Hikvision)
bjb1959
Posts: 27
Joined: Mon Oct 06, 2014 12:57 pm

Re: InValid TimeZone

Post by bjb1959 »

I am using apache not nginx. I already used phpinfo() which is what shows /etc/php/7.0/cli/php.ini as the one being used although I have modified all 3 php.ini files just in case.
SteveGilvarry
Posts: 494
Joined: Sun Jun 29, 2014 1:12 pm
Location: Melbourne, AU

Re: InValid TimeZone

Post by SteveGilvarry »

I can't help but think something is wrong with your apache. CLI is PHP command line, not the apache PHP module. Check that you have libapache2-mod-php7.0 installed and apache has the module enabled.
Production Zoneminder 1.37.x (Living dangerously)
Random Selection of Cameras (Dahua and Hikvision)
rockedge
Posts: 1173
Joined: Fri Apr 04, 2014 1:46 pm
Location: Connecticut,USA

Re: InValid TimeZone

Post by rockedge »

Try to restart the MySQL server. This timezone problem I keep running across and have not quite found the cause...but restarting the mysql server after the errors occurred fixed it.. By me it is the causing problems viewing events.
bjb1959
Posts: 27
Joined: Mon Oct 06, 2014 12:57 pm

Re: InValid TimeZone

Post by bjb1959 »

SteveGilvarry wrote:I can't help but think something is wrong with your apache. CLI is PHP command line, not the apache PHP module. Check that you have libapache2-mod-php7.0 installed and apache has the module enabled.
I do have that installed and enabled. I just tried installing from scratch again using the guide and get same issue. never had this with 15.10 so not sure what the problem is but apparently I just can't use zoneminder any longer.
bjb1959
Posts: 27
Joined: Mon Oct 06, 2014 12:57 pm

Re: InValid TimeZone

Post by bjb1959 »

ok, I found a workaround. still don't know what the actual problem is but I commented out the check line in the index.php in /usr/share/zoneminder folder by adding the 3 sets of // and then the { just below it. now I can get to the web interface. still no idea what in that line is the problem but at least I have access.

// Check time zone is set
// if (!ini_get('date.timezone') || !date_default_timezone_set(ini_get('date.timezone'))) {
// date_default_timezone_set('UTC');
// Fatal( "ZoneMinder is not installed properly: php's date.timezone is not set to a valid timezone" );
{
Locked