Fix PHP Notices on Visopsys Forum

General discussion about Visopsys. We'll create more specific forums if the number of posts justifies that.
Post Reply
User avatar
fosforito
Posts: 58
Joined: Mon Sep 09, 2013 12:16 am
Location: Paraguay
Contact:

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.
My Homepage: http://www.fosforito.net/ :)
User avatar
fosforito
Posts: 58
Joined: Mon Sep 09, 2013 12:16 am
Location: Paraguay
Contact:

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
My Homepage: http://www.fosforito.net/ :)
User avatar
andymc
Posts: 561
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.
User avatar
fosforito
Posts: 58
Joined: Mon Sep 09, 2013 12:16 am
Location: Paraguay
Contact:

Re: Fix PHP Notices on Visopsys Forum

Post by fosforito »

Great! :dance:
My Homepage: http://www.fosforito.net/ :)
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
User avatar
fosforito
Posts: 58
Joined: Mon Sep 09, 2013 12:16 am
Location: Paraguay
Contact:

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
My Homepage: http://www.fosforito.net/ :)
Post Reply