I've just updated my SMF 2.0.15 server to 2.0.17, and I've updated PHP 7.1 to 7.2 (details to follow), and avatar uploading fails with the error:
Call to undefined function dl()
I updated the forum using the package manager, and I also reinstalled my theme in the event something broke. This shouldn't have affected anything.
The server runs FreeBSD 12.1 x86-64 on Apache 2.4.41 (latest sub-version in freshports), with the following PHP packages:
mod_php72-7.2.26
php72-7.2.26
php72-curl-7.2.26
php72-filter-7.2.26
php72-gd-7.2.26
php72-hash-7.2.26
php72-json-7.2.26
php72-mbstring-7.2.26
php72-mysqli-7.2.26
php72-session-7.2.26
php72-zlib-7.2.26
These are all freshly installed versions off the binary repos, and the same list I had with PHP7.1, just with php72 instead of php71 with the exception of php72-hash, which I had to install in order to get the site to work after the update.
While I'm also here and asking, is there a place where I can find what PHP modules SMF expects in order to work? I've always had to just keep throwing modules at SMF until it's just not broken.
Any help is useful, thank you.
Lainaus käyttäjältä: Ampera - tammikuu 01, 2020, 03:18:43 AP
While I'm also here and asking, is there a place where I can find what PHP modules SMF expects in order to work? I've always had to just keep throwing modules at SMF until it's just not broken.
I don't think we have a list more detailed than https://wiki.simplemachines.org/smf/SMF2.0:Requirements_and_recommendations (and we're probably assuming the default compile options according to php.net; I'd assume the BSDs disable some of those).
You could add your findings to that wiki page. O:)
So I have seen that list before, but it seems to be maybe only a *tad* out of date, not sure when I've used Netscape Navigator last. While it does say what it sorta needs, it only hints at a few things, and doesn't even mention things like the php hash module (or other stuff). When I've got this issue sorted I'd have no problem with writing a new requirements list based off what I know I am using for my install.
Another important detail to mention is that theme uploading still works, I just did that. I've also tried attachments, and those are broken too with the same error.
I did some googling before posting here, and there wasn't much available outside of calling that function disable (or possibly even deprecated) as of PHP 5.something, but potentially replaced by other modules. I do have php72-curl which is what I'd imagine would be doing that, but I've got no clue.
I will say web is not exactly my forte, so if I say things, they're liable to be wrong, I'm just doing this for the fun of it.
Lainaus käyttäjältä: Ampera - tammikuu 01, 2020, 04:18:49 AP
So I have seen that list before, but it seems to be maybe only a *tad* out of date, not sure when I've used Netscape Navigator last.
It was last updated
yestertoday. The problem is, it covers the whole 2.0 range, from 2.0 beta 1 (released in 2007) up until the latest minor release.
[Edit:] Our master of the docs edited again while I was posting this. ;D
Lainaus käyttäjältä: Ampera - tammikuu 01, 2020, 04:18:49 AP
While it does say what it sorta needs, it only hints at a few things, and doesn't even mention things like the php hash module (or other stuff).
I'm not much of a php guy myself, but according to the php docs (https://www.php.net/manual/en/hash.installation.php) it is included by default, so that might be a *bsd pain. But it's plausible that SMF didn't use the hash functions before the cookie changes in 2.0.16+ (not a dev tho).
Lainaus käyttäjältä: Ampera - tammikuu 01, 2020, 04:18:49 AP
When I've got this issue sorted I'd have no problem with writing a new requirements list based off what I know I am using for my install.
I like you already! 8)
Lainaus käyttäjältä: Ampera - tammikuu 01, 2020, 04:18:49 AP
Another important detail to mention is that theme uploading still works, I just did that. I've also tried attachments, and those are broken too with the same error.
Just wanted to confirm that this is not a global problem, on my (completely different; debian, php 5.6, postgres, ...) 2.0.17 setup, both avatar and attachment uploading work fine. So that's good (for everybody but you :-\).
looks like php extensions aren't being loaded, you should ask your host to look into it
Lainaus käyttäjältä: m4z - tammikuu 01, 2020, 05:24:18 AP
I'm not much of a php guy myself, but according to the php docs (https://www.php.net/manual/en/hash.installation.php) it is included by default, so that might be a *bsd pain. But it's plausible that SMF didn't use the hash functions before the cookie changes in 2.0.16+ (not a dev tho).
As I said, this isn't something I'm particularly good at. It's possible it's a FreeBSD thing, but unless I know which extension isn't being loaded, I can't do anything.
Lainaus käyttäjältä: SychO - tammikuu 01, 2020, 05:36:56 AP
looks like php extensions aren't being loaded, you should ask your host to look into it
That's quite helpful, but what exactly should I go tell myself to look into?
The dynamic load (dl) function has been deprecated for ages.
Have a look in your php.ini file for the following line - insert it (and restart your Apache) if not found (or commented out)
extension=php_fileinfo.dll
Lainaus käyttäjältä: Shambles - tammikuu 01, 2020, 01:28:53 IP
The dynamic load (dl) function has been deprecated for ages.
Have a look in your php.ini file for the following line - insert it (and restart your Apache) if not found (or commented out)
extension=php_fileinfo.dll
FreeBSD doesn't use DLLs, that's Windows NT. However, what I did do is install php72-fileinfo, which has fixed the problem.
You're welcome.