timezone error on fresh install
timezone error on fresh install
I have a fresh install on centos 7. I assume it is 1.29 because I installed from the zmrepo and that is the newest version in there. I followed the instructions from the readme.centos7 file. I edit the php.ini ";date.timezone =" to read "date.timezone = America/Chicago". I have restarted apache and zoneminder, but I get this error "ZoneMinder is not installed properly: php's date.timezone is not set to a valid timezone". How do I fix this?
here is the zm.conf and php.ini
http://pastebin.com/RUtQtrdc
let me know if anymore info is needed
here is the zm.conf and php.ini
http://pastebin.com/RUtQtrdc
let me know if anymore info is needed
Re: timezone error on fresh install
Well, it looks like you have the correct entry and you have restarted Apache. I have done this install several times with no problems.
Make sure you edit /etc/php.ini and the entry is:
date.timezone = America/Chicago
and Chicago is the timezone Linux thinks you are in! User the date command to double check where you are.
What is not in the Centos-Readme is that you have to open the firewall to view the web page:
firewall-cmd --permanent --zone=public --add-service=http
firewall-cmd --permanent --zone=public --add-service=https
firewall-cmd --reload
I have had the best success by starting with the minimum install with custom hard drive partitioning. I leave out LVM as it is an extra layer I do not need. If you install the desktop version do a minimum Gnome install and avoid adding other repos.
I recently switched my production ZM server to CentOS 7 from Ubuntu 14.04 and I feel it runs a bit better. Make sure you use innodb_file_per_table in Mariadb and watch the buffer_pool_size as events build up.
bb
Make sure you edit /etc/php.ini and the entry is:
date.timezone = America/Chicago
and Chicago is the timezone Linux thinks you are in! User the date command to double check where you are.
What is not in the Centos-Readme is that you have to open the firewall to view the web page:
firewall-cmd --permanent --zone=public --add-service=http
firewall-cmd --permanent --zone=public --add-service=https
firewall-cmd --reload
I have had the best success by starting with the minimum install with custom hard drive partitioning. I leave out LVM as it is an extra layer I do not need. If you install the desktop version do a minimum Gnome install and avoid adding other repos.
I recently switched my production ZM server to CentOS 7 from Ubuntu 14.04 and I feel it runs a bit better. Make sure you use innodb_file_per_table in Mariadb and watch the buffer_pool_size as events build up.
bb
-
- Posts: 494
- Joined: Sun Jun 29, 2014 1:12 pm
- Location: Melbourne, AU
Re: timezone error on fresh install
Check you are editing the correct php.ini file.
Production Zoneminder 1.37.x (Living dangerously)
Random Selection of Cameras (Dahua and Hikvision)
Random Selection of Cameras (Dahua and Hikvision)
- knight-of-ni
- Posts: 2406
- Joined: Thu Oct 18, 2007 1:55 pm
- Location: Shiloh, IL
Re: timezone error on fresh install
Unlike Ubuntu, Redhat distros only have one php.ini (Thank God), and it is found here: /etc/php.ini
This is working fine for me:
Try using quotes, and make sure you delete the leading semicolon from your example.
This is working fine for me:
Code: Select all
date.timezone = "America/Chicago"
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
All of these can be found at https://zoneminder.blogspot.com/
Re: timezone error on fresh install
I tried that and I still get the error. If it makes a difference I one timed tried setting the timezone through webmin.knnniggett wrote:Unlike Ubuntu, Redhat distros only have one php.ini (Thank God), and it is found here: /etc/php.ini
This is working fine for me:Try using quotes, and make sure you delete the leading semicolon from your example.Code: Select all
date.timezone = "America/Chicago"
Code: Select all
[root@infosphere ~]# date
Mon Feb 29 16:26:18 CST 2016
- knight-of-ni
- Posts: 2406
- Joined: Thu Oct 18, 2007 1:55 pm
- Location: Shiloh, IL
Re: timezone error on fresh install
Issuing "date" from the command line shows the date and timezone of the operating system, which is independent of the php timezone. Those two are completely different.
I have no idea if webmin sets the timezone of the system or the php timezone. The fact that you've got webmin installed does make one wonder what else you are using this machine for. It might shed some light on the source of the problem.
Post the output of the following:
I have no idea if webmin sets the timezone of the system or the php timezone. The fact that you've got webmin installed does make one wonder what else you are using this machine for. It might shed some light on the source of the problem.
Post the output of the following:
Code: Select all
cd /etc
sudo grep -r date.timezone ./
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
All of these can be found at https://zoneminder.blogspot.com/
Re: timezone error on fresh install
I run Webmin on CentOS7 with no issues. Yes, there was a learning curve as there is when you try new things. Your system timezone is set when you first install the OS...Centos does it, Ubuntu does it as well as all the other Linux distros. Now, if you are in the middle of the time zone the location service should have no problem setting the time zone. If you are close to the edge, say western Indiana, you bet you will have to set the timezone manually. Webmin will show you what the system is set to and you can change it there. But you still have to edit the php.ini file to match your system timezone!
See: http://www.cyberciti.biz/faq/centos-lin ... mand-line/
See: http://www.cyberciti.biz/faq/centos-lin ... mand-line/
Re: timezone error on fresh install
knnniggett wrote:Issuing "date" from the command line shows the date and timezone of the operating system, which is independent of the php timezone. Those two are completely different.
I have no idea if webmin sets the timezone of the system or the php timezone. The fact that you've got webmin installed does make one wonder what else you are using this machine for. It might shed some light on the source of the problem.
Post the output of the following:Code: Select all
cd /etc sudo grep -r date.timezone ./
Code: Select all
sudo grep -r date.timezone ./
./php.ini:; http://php.net/date.timezone
./php.ini:date.timezone = "America/Chicago"
- knight-of-ni
- Posts: 2406
- Joined: Thu Oct 18, 2007 1:55 pm
- Location: Shiloh, IL
Re: timezone error on fresh install
Now paste the output of the following:
We also need to see output from phpinfo:
This will produce a lot of output, piped to the file timezone.txt. Either attached that file in a response, or create a Gist with the contents pasted in.
Code: Select all
sudo updatedb
sudo locate php.ini
Code: Select all
php -r "phpinfo();" > timezone.txt
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
All of these can be found at https://zoneminder.blogspot.com/
Re: timezone error on fresh install
updatedb and locate are unknown commandsknnniggett wrote:Now paste the output of the following:We also need to see output from phpinfo:Code: Select all
sudo updatedb sudo locate php.ini
This will produce a lot of output, piped to the file timezone.txt. Either attached that file in a response, or create a Gist with the contents pasted in.Code: Select all
php -r "phpinfo();" > timezone.txt
timezone.txt
http://pastebin.com/cNcf6qN3
Re: timezone error on fresh install
the issue has been resolved it turns out there is another php.ini location for this version of php.
https://www.centos.org/forums/viewtopic ... 31#p240483
https://www.centos.org/forums/viewtopic ... 31#p240483
remirepo wrote:@ganda: you are using Software Collection.
So you need to set the option in /opt/rh/php55/root/etc
Something like
Code: Select all
echo "date.timezone = America/Chicago" > /opt/rh/php55/root/etc/php.d/timezone.ini
(definitively better to create and additional file in php.d for your specific settings than altering default php.ini)
Notice: a phpinfo() page will give you the path of the loaded configuration files.