Page 1 of 2

InValid TimeZone

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

Re: InValid TimeZone

Posted: Tue Apr 26, 2016 6:27 am
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

Re: InValid TimeZone

Posted: Tue Apr 26, 2016 7:21 am
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

Re: InValid TimeZone

Posted: Tue Apr 26, 2016 8:24 am
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 ='

Re: InValid TimeZone

Posted: Tue Apr 26, 2016 8:37 am
by philip_d
Below it appear when I run your command.

date.timezone = Asia/Muscat

Re: InValid TimeZone

Posted: Tue Apr 26, 2016 9:18 am
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.

Re: InValid TimeZone

Posted: Tue Apr 26, 2016 12:36 pm
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

Re: InValid TimeZone

Posted: Tue Apr 26, 2016 1:38 pm
by SteveGilvarry

Re: InValid TimeZone

Posted: Fri Jun 24, 2016 1:29 pm
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

Re: InValid TimeZone

Posted: Sat Jun 25, 2016 8:48 am
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.

Re: InValid TimeZone

Posted: Mon Jun 27, 2016 1:46 pm
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.

Re: InValid TimeZone

Posted: Tue Jun 28, 2016 1:00 am
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.

Re: InValid TimeZone

Posted: Wed Jun 29, 2016 4:22 am
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.

Re: InValid TimeZone

Posted: Fri Jul 08, 2016 2:55 pm
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.

Re: InValid TimeZone

Posted: Fri Jul 08, 2016 4:01 pm
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" );
{