• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XenForo and PHP 5.4

Digital Doctor

Well-known member
#4
Considering 5.3 is almost deprecated, I think a majority of people are on 5.4
I would think the number of 5.4 users outnumbers the 5.3 users.

http://xenforo.com/community/threads/php-5-3-end-of-life.42615/

There is a bug only in 5.4 that threads give a error above the header..
Template Errors: thread_view

Illegal string offset 'thumbnailUrl' in

It is only viewable to admins though and only appears in debug.

Going into template - attachment_editor

and removing

<xen:set var="$attachment"></xen:set>

fixes it
Maybe start a thread and ask what version of php are people using ?
5.3
5.4
5.5 ?

Mike said 5.4 was "OK" for his tests
http://xenforo.com/community/threads/php-5-4.28502/
 

Chris D

XenForo developer
Staff member
#5
There is only one known issue with the XenForo core and PHP 5.4.

Quite simply, this manifests itself in a template error that only displays in templates where it is possible to upload attachments.

This was reported in XenForo 1.1.2 and a "band-aid" was applied for XenForo 1.1.3.

The "band-aid" in question is simply that the template error is only visible while Debug Mode is enabled. This will put an even bigger emphasis on only enabling debug mode for specific users or, indeed, never on a live board:

http://xenforo.com/community/threads/php-5-4-bug.29835/

My only question is, yes, it is only visible with debug mode enabled... but actually is it deeper than that and only visible to Admins/Super Admins? If it's only displayed to Admins it's really a big non-issue.


That's the core, anyway...

You may find compatibility issues with some add-ons but specifically I've only ever seen one and it affected a number of add-ons. That would be almost any add-on that included a forum selector in the options. I've still not got my head around it but it used to cause array to string conversion errors. I think most add-on developers have resolved this issue now.

I've built my own forum and usergroup selector that definitely works on PHP 5.4.

So really, short answer: from a user's perspective it's completely fine to use.
 

MattW

Well-known member
#8
I'm on 5.4.10, and the only thing I've noticed is what Chris mentioned earlier when running debug. No issues with any of the add-ons I've got installed either.
 

Adam Howard

Well-known member
#9
I've been on php 5.4 for ever 1 year (5.4.11 currently)

And have been playing with php 5.5 (alpha 3).

You really need to make only 1 template edit

attachment_editor

Look for

PHP:
<xen:set var="$attachment"></xen:set>
Comment it out. I've not had any issues doing so and you're done.
 

HWS

Well-known member
#11
I'm running digitalpoint.com on the latest versions of XF and PHP (5.4.11) without any problems. I did apply the attachment_editor fix a long time ago before I was on 5.4.x, so I had forgotten about it. Beyond that, I haven't had any issues.
So you've finally converted over to XF. Congratulations! It must have been a lot of work!