Page 1 of 1
timezone error on fresh install
Posted: Fri Feb 26, 2016 11:38 pm
by ganda
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
Re: timezone error on fresh install
Posted: Sat Feb 27, 2016 2:11 am
by bbunge
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
Re: timezone error on fresh install
Posted: Sat Feb 27, 2016 6:01 am
by SteveGilvarry
Check you are editing the correct php.ini file.
Re: timezone error on fresh install
Posted: Sat Feb 27, 2016 2:13 pm
by knight-of-ni
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.
Re: timezone error on fresh install
Posted: Mon Feb 29, 2016 10:24 pm
by ganda
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.
I tried that and I still get the error. If it makes a difference I one timed tried setting the timezone through webmin.
Code: Select all
[root@infosphere ~]# date
Mon Feb 29 16:26:18 CST 2016
Re: timezone error on fresh install
Posted: Tue Mar 01, 2016 1:04 am
by knight-of-ni
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 ./
Re: timezone error on fresh install
Posted: Tue Mar 01, 2016 2:42 am
by bbunge
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/
Re: timezone error on fresh install
Posted: Fri Mar 04, 2016 3:09 pm
by ganda
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"
Re: timezone error on fresh install
Posted: Sat Mar 05, 2016 1:38 pm
by knight-of-ni
Now paste the output of the following:
We also need to see output from phpinfo:
Code: Select all
php -r "phpinfo();" > timezone.txt
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.
Re: timezone error on fresh install
Posted: Wed Mar 16, 2016 2:33 pm
by ganda
knnniggett wrote:Now paste the output of the following:
We also need to see output from phpinfo:
Code: Select all
php -r "phpinfo();" > timezone.txt
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.
updatedb and locate are unknown commands
timezone.txt
http://pastebin.com/cNcf6qN3
Re: timezone error on fresh install
Posted: Tue Mar 22, 2016 2:33 pm
by ganda
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
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.