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

Discussion in 'General XenForo Discussion and Feedback' started by HWS, Jan 21, 2013.

  1. HWS

    HWS Well-Known Member

    Are there any known problems known with XenForo 1.1.3 and PHP 5.4?
    Or can we expect it to work without modifications?

    Thanks for sharing your experience!
    Digital Doctor likes this.
  2. Digital Doctor

    Digital Doctor Well-Known Member

    Some interesting reading here.
  3. HWS

    HWS Well-Known Member

    Thank you. I am able to use the board search...
    Does anybody run XF with PHP 5.4 successfully?
  4. Digital Doctor

    Digital Doctor Well-Known Member

    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.


    Maybe start a thread and ask what version of php are people using ?
    5.5 ?

    Mike said 5.4 was "OK" for his tests
  5. Chris D

    Chris D XenForo Developer Staff Member

    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:


    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.
    HWS likes this.
  6. Andy.N

    Andy.N Well-Known Member

    I'm still using 5.3
  7. Slavik

    Slavik XenForo Moderator Staff Member

    I doubt that realy o_O
    Dan likes this.
  8. MattW

    MattW Well-Known Member

    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.
  9. Adam Howard

    Adam Howard Well-Known Member

    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


    Look for

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

    digitalpoint Well-Known Member

    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.
    Alien, Adam Howard and Chris D like this.
  11. HWS

    HWS Well-Known Member

    So you've finally converted over to XF. Congratulations! It must have been a lot of work!
    Adam Howard likes this.
  12. digitalpoint

    digitalpoint Well-Known Member

    Something like that... :)
    Adam Howard likes this.

Share This Page