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 » Tue Apr 26, 2016 4:46 am

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: 967
Joined: Wed Dec 02, 2009 9:55 pm
Location: Spain

Re: InValid TimeZone

Post by PacoLM » Tue Apr 26, 2016 6:27 am

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

mini-ITX system (6 IPCams - Ubuntu14.04 - ZM1.31.1)

philip_d
Posts: 16
Joined: Mon Apr 25, 2016 1:17 pm

Re: InValid TimeZone

Post by philip_d » Tue Apr 26, 2016 7:21 am

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: 418
Joined: Sun Jun 29, 2014 1:12 pm
Location: Melbourne, AU

Re: InValid TimeZone

Post by SteveGilvarry » Tue Apr 26, 2016 8:24 am

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.32.3
Random Selection of Cameras (Dahua and Hikvision)
More Dev VM's than I care to count.

philip_d
Posts: 16
Joined: Mon Apr 25, 2016 1:17 pm

Re: InValid TimeZone

Post by philip_d » Tue Apr 26, 2016 8:37 am

Below it appear when I run your command.

date.timezone = Asia/Muscat

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

Re: InValid TimeZone

Post by SteveGilvarry » Tue Apr 26, 2016 9:18 am

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.32.3
Random Selection of Cameras (Dahua and Hikvision)
More Dev VM's than I care to count.

philip_d
Posts: 16
Joined: Mon Apr 25, 2016 1:17 pm

Re: InValid TimeZone

Post by philip_d » Tue Apr 26, 2016 12:36 pm

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: 418
Joined: Sun Jun 29, 2014 1:12 pm
Location: Melbourne, AU

Re: InValid TimeZone

Post by SteveGilvarry » Tue Apr 26, 2016 1:38 pm

Production Zoneminder 1.32.3
Random Selection of Cameras (Dahua and Hikvision)
More Dev VM's than I care to count.

bjb1959
Posts: 26
Joined: Mon Oct 06, 2014 12:57 pm

Re: InValid TimeZone

Post by bjb1959 » Fri Jun 24, 2016 1:29 pm

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: 418
Joined: Sun Jun 29, 2014 1:12 pm
Location: Melbourne, AU

Re: InValid TimeZone

Post by SteveGilvarry » Sat Jun 25, 2016 8:48 am

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.32.3
Random Selection of Cameras (Dahua and Hikvision)
More Dev VM's than I care to count.

bjb1959
Posts: 26
Joined: Mon Oct 06, 2014 12:57 pm

Re: InValid TimeZone

Post by bjb1959 » Mon Jun 27, 2016 1:46 pm

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: 418
Joined: Sun Jun 29, 2014 1:12 pm
Location: Melbourne, AU

Re: InValid TimeZone

Post by SteveGilvarry » Tue Jun 28, 2016 1:00 am

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.32.3
Random Selection of Cameras (Dahua and Hikvision)
More Dev VM's than I care to count.

rockedge
Posts: 1097
Joined: Fri Apr 04, 2014 1:46 pm
Location: Connecticut,USA
Contact:

Re: InValid TimeZone

Post by rockedge » Wed Jun 29, 2016 4:22 am

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: 26
Joined: Mon Oct 06, 2014 12:57 pm

Re: InValid TimeZone

Post by bjb1959 » Fri Jul 08, 2016 2:55 pm

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: 26
Joined: Mon Oct 06, 2014 12:57 pm

Re: InValid TimeZone

Post by bjb1959 » Fri Jul 08, 2016 4:01 pm

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" );
{

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests