XF 2.2 Fatal Error on fresh install

DTS

Member
Hello everyone, I am trying to do a fresh install of XenForo on my shared hosting account with InMotion hosting. I've searched high and low in these forums and elsewhere and can't find a solution. This is XenForo 2.2.7 just downloaded the other day from XF. I'm on InMotion's shared hosting "Power" plan. I'm mildly tech savvy and have dinked around inside cPanel for years on my various websites but I would consider myself a novice on these sorts of things.

When I try to install, I get through the uploads fine, get through setting up and configuring the MySQL database fine, then move on to installation. When I run that, it thinks for a moment and then gives me the error: Fatal error: Illegal length modifier specified 'f' in s[np]printf call in blah-blah-blah-blah/src/vendor/league/flysystem/src/Adapter/Local.php on line 199

I've read in these forums that it's usually a PHP version issue. So I've tried changing my PHP version several times, with the same results. I've tried PHP 7.3, 7.4 and 8.0. I have seen that the line number for the error isn't always 199 but from what I remember it's always been in that same Local.php file. On one of these attempts, the installation seemed to go on longer but it eventually timed out with a 504 server timeout (InMotion's tech lengthened the response time for me due to that).

I've been in touch with InMotion tech service via their online chat. I've been bounced around to several techs who have tried to help, who have tried different things and seemed like they were trying. But the last one seems to have just given up, and said the following:
Thank you for contacting Support, That error is caused by NGINX causing a conflict with the installation. I have tested the installation on a none NGINX hosting server and it installed without any issue (tested it on PHP 7.4).

Even after disabling Caching for the domain it would not install. You may need to switch to a none NGINX hosting plan or a VPS to have this forum installed.

We do have other forums you can install as an alternative. In cPanel under Softaculous, you can install any forums listed there. (See screenshot attached)

Is this guy ********ting me, and just throwing in the towel to make me go away? Or trying to upsell me to a VPS package? I know nothing about web servers, NGINX and the like. But I've done some searches and seen plenty of references to people using XenForo on NGINX servers.

For what it's worth, I realize that a shared account isn't optimum for hosting a forum. But I've read quite a few posts in this forum from people that do, and that it works just fine for starting out. So I'm not inclined to believe that I can't install XenForo simply for the reason that I'm on a shared hosting account. Nor am I inclined to believe this guy who says that XenForo and NGINX are incompatible, again due to what I've read.

So what should I do next? I'd rather not go to the hassle of changing hosting companies just for this, as I have several websites hosted there and everything else works great and their service has been pretty good until now. Please let me know if you have any suggestions on other things I can try. Thanks in advance for any suggestions.
 
We use nginx here, as do many others, so it's not that XF doesn't work with it.

The only time I have ever seen this it has been a PHP build issue.

I don't know what the issue is with the builds with your host but it's definitely only something which can be resolved at the server level.
 
OK I've tried re-downloading the ZIP file from XenForo, re-uploading and running the installer, still get a fatal error. A helpful member @AndyB suggested uploading it with the file manager in cPanel instead of an FTP client program from my end, which I also tried (uploaded the Zip file and extracted it in the File Manager), still with the same result. But the fatal error is now on a different line of that file /forum/src/vendor/league/flysystem/src/Adapter/Local.php The error is now on line 135, whereas before it was on line 199.

Any further ideas? I sincerely don't want to have to follow the InMotion tech guy's suggestion to "just install one of the forums available in Softaculous" LOL.
 
It might help to post the error in full. Sounds like you are only giving partial error info?

I stated it in my original post: Fatal error: Illegal length modifier specified 'f' in s[np]printf call in blah-blah-blah-blah/src/vendor/league/flysystem/src/Adapter/Local.php on line 199

I blah-blah'd out the file path but otherwise that's the whole error message.
 
You said you had switched PHP versions a number of times, have you verified that those changes actually took effect? We've not seen this before in any other context and switching PHP version has seemingly fixed it.

Best way to verify what PHP version you're running is to create a file called info.php with the following contents in your web root:

PHP:
<?php

phpinfo();

Visiting info.php in your browser should report which PHP version you're running which will help you verify that the version change is taking effect. Aim for PHP 8.0 if you can as I don't believe we've had this issue reported with that version before.
 
You said you had switched PHP versions a number of times, have you verified that those changes actually took effect? We've not seen this before in any other context and switching PHP version has seemingly fixed it.

Best way to verify what PHP version you're running is to create a file called info.php with the following contents in your web root:

PHP:
<?php

phpinfo();

Visiting info.php in your browser should report which PHP version you're running which will help you verify that the version change is taking effect. Aim for PHP 8.0 if you can as I don't believe we've had this issue reported with that version before.

I really appreciate your help and suggestion! I created the file and visited it in my browser, and it reports that PHP Version 8.0.12 is installed. Also, I was on the chat with the InMotion tech when he switched it to each version in turn (7.3, 7.4, then 8.0) and had me retry running the install after each switch. He would wait a few minutes after each one, apparently waiting for the changes to take effect, then give me the go-ahead. So I'm thinking he was probably doing just that, making sure the change was effected each time.

I do appreciate your help and any other suggestions anyone else may have. I have re-engaged InMotion support to ask them for a second opinion on this, letting them know that it seems from the members here that just because it's an NGINX server, in and of itself shouldn't make it incompatible. I haven't heard back from them yet. I've looked through InMotion's own user community and have found a few posts from other customers running XenForo on their servers. In at least one of those threads an InMotion representative did state that XenForo should run on any of their hosting plans without issue. But those posts were a few years old, nothing recent.
 
I have re-engaged InMotion support to ask them for a second opinion on this, letting them know that it seems from the members here that just because it's an NGINX server, in and of itself shouldn't make it incompatible.
Just to re-iterate this:
XenForo does work perfectly fine with nginx/PHP-FPM; we are running almost all of our XF 2.X installs (about 20) on nginx with various PHP versions.
 
  • Like
Reactions: DTS
Interestingly I found this support thread and this bug ticket with the same error, with InMotion being the hosting provider in both instances (see comments #32 and #33 on second link). I'd be incredibly surprised if such a rare issue being encountered by at least 4 people using the same hosting company was a coincidence, and would lead me to believe it's something strange with the installed PHP builds. The Drupal bug report concluded with saying it's some sort of security settings on the server.
 
Last edited:
InMotion support has replied:
This is Marcus S. following up on your support request. I do apologize for all the trouble you've been having to get Xenforo to work on our hosting. I have tried changing the PHP version and creating a new Mysql database and user, but it still gives me the same error as well. Could you try uploading Xenforo 2.2.7 the version before Patch 1 so that we can see if there was an update in Xenforo that is preventing the install? We can also try Xenforo 2.2.6 to see if it's an issue on Xenforo's side, as well. Let us know how you want to proceed.
Is there a way I can download a previous version of XF to let them try it out? In my Account Area it only let's me download 2.2.7 Patch 1.

Are you using ea-php or alt-php with cpanel? send me private by anydesk let me review
Sorry I don't know what ea-php and alt-pphp is. As I said I'm a novice LOL. But I'm willing to learn if you're willing to teach. Can I find that information somwhere in PHPMyAdmin?
 
2.2.7 Patch 1 replaced 2.2.7. So 2.2.7 Patch 1 is the only available download in terms of 2.2.7. You can download any other previous version though as @Brogan mentions.

Unfortunately, it won't matter in the slightest what version you use.

In addition to the findings of @mattrogowski it seems that on at least two other occasions where we've seen this, the customer was also using Inmotion hosting:


I can't advertise what their websites are without their permission but according to our records these customers both use InMotion hosting.

This is far from a coincidence at this point.

Anyway. My point is the XF version won't make a difference because it is clearly something that has been problematic for a while. But given that this doesn't appear to be exclusive to XF and Inmotion customers have also had issues installing Moodle and Drupal it would unfortunately appear that the only common denominator is InMotion themselves.

It is quite obviously an issue on their side and it would be much appreciated (by everyone involved, I imagine) if they took some responsibility for it and started looking a little bit closer to home for a solution.

Alternatively, the experience you're having - and apparently others - rings alarm bells for me. This isn't a common issue that affects multiple hosts/service providers. You very likely wouldn't experience this issue if you were hosted with someone else. I'll let you draw what conclusions you want from that... ;)
 
Unfortunately, it won't matter in the slightest what version you use.

It seems this is correct :( I went ahead and downloaded 2.2.6 Patch 2 and got the same result.

I'll entertain InMotion's attempts to fix it for a little longer but it's sounding more and more like I'll be shopping for a different host for this.
 
The plot thickens. InMotion Support now sez:
Thank you for contacting support! I am sorry you are having trouble. While we do not support 3rd party software, we are happy to to help. If XenForo can provide us with the necessary configurations, we can definitely see if we can get it working. If there is a PHP extension, setting, or something that we needs to be set, we will definitely try to accommodate.
@Chris D it sounds like they are willing to fix their issue. Are there certain configurations or settings you suggest they check? This is all way above my head LOL.
 
I am unable to answer because all I’ve ever done is install PHP, install nginx, install MariaDB and boom it works.

With all due respect to them, it is their job to configure their server, not mine. I’ve never had to help a hosting provider configure their server before. I’m not going to start now 🙂

Sorry you’re caught in the middle in all of this but I’m not trying to be difficult. This problem seems exclusive to them and apparently not even specific to XF so I’m genuinely not sure what more we can do.
 
I am unable to answer because all I’ve ever done is install PHP, install nginx, install MariaDB and boom it works.

With all due respect to them, it is their job to configure their server, not mine. I’ve never had to help a hosting provider configure their server before. I’m not going to start now 🙂

Sorry you’re caught in the middle in all of this but I’m not trying to be difficult. This problem seems exclusive to them and apparently not even specific to XF so I’m genuinely not sure what more we can do.

OK thank you for your input.
 
Top Bottom