Fix PHP Notices on Visopsys Forum

General discussion about Visopsys.
Post Reply
fosforito

Fix PHP Notices on Visopsys Forum

Post by fosforito »

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: Select all

<?php
     date_default_timezone_set("America/Los_Angeles");
You can change the default timezone to UTC or whatever you like.

Best regards,

Jens W.
fosforito

Re: Fix PHP Notices on Visopsys Forum

Post by fosforito »

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
User avatar
andymc
Posts: 589
Joined: Tue Nov 16, 2010 7:20 pm

Re: Fix PHP Notices on Visopsys Forum

Post by andymc »

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.
fosforito

Re: Fix PHP Notices on Visopsys Forum

Post by fosforito »

Great! :dance:
User avatar
ap0r
Posts: 105
Joined: Tue Feb 14, 2012 12:40 am

Re: Fix PHP Notices on Visopsys Forum

Post by ap0r »

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

Re: Fix PHP Notices on Visopsys Forum

Post by fosforito »

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