forum.webdiplomacy.net

webDip dev coordination forum / public access todo list
It is currently Tue Oct 17, 2017 12:13 am

All times are UTC




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: PHP 5.4?
PostPosted: Sun Dec 30, 2012 8:38 am 
Offline

Joined: Wed Jul 29, 2009 10:22 am
Posts: 841
Is it save to migrate to PHP 5.4 or are there any known issues?

Oliver


Top
 Profile  
 
 Post subject: Re: PHP 5.4?
PostPosted: Sun Dec 30, 2012 10:08 am 
Offline
Site Admin

Joined: Sat Jun 28, 2008 6:24 am
Posts: 892
Looking at the list of backward incompatible changes I cant see anything that'd break. I can't guarantee it but I'd expect it to be fine.


Top
 Profile  
 
 Post subject: Re: PHP 5.4?
PostPosted: Sun Dec 30, 2012 10:49 am 
Offline

Joined: Wed Jul 29, 2009 10:22 am
Posts: 841
I think I'll switch and see what happens... :-)


Top
 Profile  
 
 Post subject: Re: PHP 5.4?
PostPosted: Sun Dec 30, 2012 12:49 pm 
Offline

Joined: Wed Jul 29, 2009 10:22 am
Posts: 841
Found 1 problem in lib/html.php:
Line: 910: Array to string conversion
And it's bugged with PHP 5.3 too, as the User.type is set to the string "Array".

Oliver


Top
 Profile  
 
 Post subject: Re: PHP 5.4?
PostPosted: Mon Dec 31, 2012 8:51 am 
Offline
Site Admin

Joined: Sat Jun 28, 2008 6:24 am
Posts: 892
Thanks for letting me know about that. I've updated also, and here's the temporary fix:

in lib/html.php replace:
Code:
            this.type=['.$User->type.'];
            this.token="'.md5(Config::$secret.$User->id.$User->type).'";

with
Code:
            this.token="'.md5(Config::$secret.$User->id.'Array').'";


Luckily this token isn't used for determining the type of user, otherwise this would be a security issue.

I'll have a look around for any other 5.4 issues that come up.


Top
 Profile  
 
 Post subject: Re: PHP 5.4?
PostPosted: Mon Dec 31, 2012 10:11 am 
Offline

Joined: Wed Jul 29, 2009 10:22 am
Posts: 841
I switched my server to 5.4 and had no errors for the last few hours.
I'll post here if there are more problems...


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group