visopsys.org
https://visopsys.org/forums/

Fix PHP Notices on Visopsys Forum
https://visopsys.org/forums/viewtopic.php?f=3&t=200
Page 1 of 1

Author:  fosforito [ Sun Oct 27, 2013 9:56 am ]
Post subject:  Fix PHP Notices on Visopsys Forum

Hello Andy,

To fix that issue with the errors on top of the index page of the forum, you only need to add following code to /forums/index.php:

Code:
<?php
     date_default_timezone_set("America/Los_Angeles");


You can change the default timezone to UTC or whatever you like.

Best regards,

Jens W.

Author:  fosforito [ Sun Oct 27, 2013 10:07 am ]
Post subject:  Re: Fix PHP Notices on Visopsys Forum

On /forums/viewtopic.php the same thing.

I think, it is better to add the code directly to the config file of the forum.
Do you have an own server? Then you can set the default timezone in php.ini with "date.timezone"

Open php.ini

sudo vi /etc/php5/apache2/php.ini

And  search

[Date]
; Defines the default timezone used by the date functions.
; http://php.net/date.timezone
date.timezone = "Europe/Amsterdam"

Now save and close and restart your apache.

/etc/init.d/apache2 restart

Author:  andymc [ Tue Oct 29, 2013 12:55 am ]
Post subject:  Re: Fix PHP Notices on Visopsys Forum

Thanks again mate. I did put a timezone setting into an auto-generated, vhost-specific php.ini file which seems to have solved it (for now). Putting it into the main /etc/php.ini didn't seem to do the trick.

Author:  fosforito [ Tue Oct 29, 2013 9:07 am ]
Post subject:  Re: Fix PHP Notices on Visopsys Forum

Great! :dance:

Author:  ap0r [ Fri Jan 31, 2014 5:08 am ]
Post subject:  Re: Fix PHP Notices on Visopsys Forum

A bit off topic, but shouldnt we have a button to return to the homepage from the forum?

Author:  fosforito [ Sat Feb 01, 2014 12:19 pm ]
Post subject:  Re: Fix PHP Notices on Visopsys Forum

It would be useful. My "Button" to the Visopsys Homepage is a Bookmark in my Browser :P

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/