XF 2.3 PHP 8.4 and style import

stromb0li

Well-known member
For anyone that is running XenForo 2.3.x with PHP 8.4; can you try the import style option from Admin CP and see if it initializes the /data/styles folder?
This page -> admin.php?styles/

I see the style get created, but I don't see any of the style's assets get moved to the /data/styles folder as intended. I don't see any server errors, both within XenForo and via nginx logging on the host. I've tried ruling out permissions by chmod-ing the whole directory with full rights (777), etc.

If I take the same style and import it on my dev board running PHP 8.2, the style imports and extracts the contents to the /data/styles folder as expected.

Trying to narrow down if I have a misconfiguration somewhere or if this is a potential issue with PHP 8.4 and 2.3.6?
 
Last edited:
Solution
Symlinks?

Symlinks?

 
Solution
Happy Jimmy Fallon GIF by The Tonight Show Starring Jimmy Fallon


I wouldn't have ever been able to come to the conclusion that was the root cause! Thank you!
 
Last edited:
You can either patch \XF\Util\File::getTempDir() , add a call to realpath() in the style archive import code, patch \XF\Util\File::stripRootPathPrefix() or change tempDir path so it does not contain symlinks.

I'd probably patch getTempDir().
 
Back
Top Bottom