Script URL:
Version of script:
Hosting company:
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution: server, time
Write your message below:
I had my whole cPanel migrated to a new server but I'm running into a slight problem. The old server was in America and my new one is in the UK. When someone posts to the guestbook, the time is 5 hours ahead. Is there somewhere in the script where I can update the time?
Time issue on new web server
Re: Time issue on new web server
Add something like this to the bottom of the settings.php file:
Supported time zones are here: http://php.net/manual/en/timezones.america.php
Code: Select all
date_default_timezone_set('America/New_York');
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
You should follow me on Twitter here
Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools


Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Re: Time issue on new web server
Thanks for the reply. Unfortunately it didn't work. The script is usually installed on a different domain but I haven't updated the nameservers for that one so a copy of it can be seen at http://www.shopwithsam.uk/guestbook/gbook.php where the nameservers for this domain do point to the new server. I used the following;
date_default_timezone_set('Europe/London');
I'm using version 1.7. I tried installing a brand new installation of version 1.7.2 but I can't even get that one to show up - http://www.shopwithsam.uk/guestbook2/gbook.php
My new hosting company don't seem to be able to sort it out but I'm wondering whether there's something in the cPanel settings somewhere which is overriding the time.
date_default_timezone_set('Europe/London');
I'm using version 1.7. I tried installing a brand new installation of version 1.7.2 but I can't even get that one to show up - http://www.shopwithsam.uk/guestbook2/gbook.php
My new hosting company don't seem to be able to sort it out but I'm wondering whether there's something in the cPanel settings somewhere which is overriding the time.
Re: Time issue on new web server
You can try asking your hosting company to set the correct timezone for your account.
You get a blank page probably because of errors in the settings.php file.
You get a blank page probably because of errors in the settings.php file.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
You should follow me on Twitter here
Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools


Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Re: Time issue on new web server
Thanks for getting back to me. I didn't get very far with the new hosting company. I've also checked the settings.php file several times and can't spot a mistake. The server is Cloud Linux. Is this different to normal Linux and could this be the problem?
Re: Time issue on new web server
Cloudlinux doesn't make a difference.
The blank page is almost certainly due to a syntax error. Do you have any "error_log" files generated in the 1.7.2 folder? Do you get the same blank page error if you upload an original unmodified settings file?
The blank page is almost certainly due to a syntax error. Do you have any "error_log" files generated in the 1.7.2 folder? Do you get the same blank page error if you upload an original unmodified settings file?
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
You should follow me on Twitter here
Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools


Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Re: Time issue on new web server
Thanks for the error log tip. I found a missing ; (semi-colon) on one of the lines.
Re: Time issue on new web server
The 1.7.2 version at http://www.shopwithsam.uk/guestbook2/gbook.php doesn't show a time of the post. I can't remember how it got there in the 1.7 version. Tried searching the forum but the word 'time' won't come up.
Re: Time issue on new web server
How about viewtopic.php?p=13445#p13445
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
You should follow me on Twitter here
Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools


Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Re: Time issue on new web server
That worked a treat. Many thanks.