Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: beckzy on January 03, 2020, 12:38:31 PM

Title: Call to undefined function dl()
Post by: beckzy on January 03, 2020, 12:38:31 PM
I made the mistake of upgrading from 2.0.15 to 2.0.16 (though I'm now using 2.0.17) using the Large Upgrade. Ever since my forum members have been receiving this error when trying to change their avatar, signiture, and adding photos to the SMF Gallery:



Does anyone know how I can fix this? Thanks :)
Title: Re: Call to undefined function dl()
Post by: Kindred on January 03, 2020, 12:43:36 PM
If you used the large upgrade, then you partially deleted all of your mods.

1- restore the backup of the 2.0.15 files that you took before starting your upgrade
2- use the package manager and the patch files to update.

if you did not take a backup (which should teach you -- ALWAYS take a backup in the future)
Maybe your host has a daily backup?


otherwise -- then you have a more complicated task.. you have to find what code got erased and what code remains...  and then manually put the missing code back in.
Title: Re: Call to undefined function dl()
Post by: Illori on January 03, 2020, 12:50:19 PM
also hooks may not be in place as they should be. which will cause issues like this.
Title: Re: Call to undefined function dl()
Post by: shawnb61 on January 03, 2020, 12:58:32 PM
Just a thought...   Might it be cleaner to remove hooks & simply reinstall?
Title: Re: Call to undefined function dl()
Post by: beckzy on January 03, 2020, 01:00:56 PM
Quote from: Kindred on January 03, 2020, 12:43:36 PM
If you used the large upgrade, then you partially deleted all of your mods.

1- restore the backup of the 2.0.15 files that you took before starting your upgrade
2- use the package manager and the patch files to update.

if you did not take a backup (which should teach you -- ALWAYS take a backup in the future)
Maybe your host has a daily backup?


otherwise -- then you have a more complicated task.. you have to find what code got erased and what code remains...  and then manually put the missing code back in.
So restore all the backup files then run the upgrade from 2.0.15 to 2.0.17 using package manager?

Quote from: shawnb61 on January 03, 2020, 12:58:32 PM
Just a thought...   Might it be cleaner to remove hooks & simply reinstall?
That didn't work :(
Title: Re: Call to undefined function dl()
Post by: Illori on January 03, 2020, 01:03:52 PM
how did you attempt to remove the hooks?
Title: Re: Call to undefined function dl()
Post by: beckzy on January 03, 2020, 01:05:04 PM
Quote from: Illori on January 03, 2020, 01:03:52 PM
how did you attempt to remove the hooks?

With repair_settings.php
Title: Re: Call to undefined function dl()
Post by: vbgamer45 on January 03, 2020, 01:21:52 PM
What PHP version are you on? It sounds like that might have been upgraded since dl is an older php function.
Title: Re: Call to undefined function dl()
Post by: Shambles on January 03, 2020, 01:28:47 PM
This "undefined function dl()" error has cropped up previously in the past couple of days.

The dl() function seems to be called by PHP when a required extension has not been nominated in the php.ini file to handle an operation (eg, a file interrogation operation). Some code, somewhere, is trying to circumvent that missing object by doing a dynamic load of the required extension. The dl() function has been deprecated for quite some time as extensions in the php.ini file are the way forward.

The right answer here is to ensure the minimum extension set has been entered in the php.ini file, including (but not limited to)

Code (Windows NT) Select
extension=php_fileinfo.dll

- or (I think) -

Code (Linux) Select
extension=php72-fileinfo
Title: Re: Call to undefined function dl()
Post by: beckzy on January 03, 2020, 01:51:32 PM
Quote from: vbgamer45 on January 03, 2020, 01:21:52 PM
What PHP version are you on? It sounds like that might have been upgraded since dl is an older php function.
7.2.

Quote from: Shambles on January 03, 2020, 01:28:47 PM
This "undefined function dl()" error has cropped up previously in the past couple of days.

The dl() function seems to be called by PHP when a required extension has not been nominated in the php.ini file to handle an operation (eg, a file interrogation operation). Some code, somewhere, is trying to circumvent that missing object by doing a dynamic load of the required extension. The dl() function has been deprecated for quite some time as extensions in the php.ini file are the way forward.

The right answer here is to ensure the minimum extension set has been entered in the php.ini file, including (but not limited to)

Code (Windows NT) Select
extension=php_fileinfo.dll

- or (I think) -

Code (Linux) Select
extension=php72-fileinfo
Downgrading back to SMF 2.0.15 from backup then upgrading using package manager didn't work. So I'll try that ^, thanks!

Edit: Adding the extension didn't work. The error is still happening
Title: Re: Call to undefined function dl()
Post by: m4z on January 03, 2020, 02:15:03 PM
Quote from: Shambles on January 03, 2020, 01:28:47 PM
- or (I think) -

Code (Linux) Select
extension=php72-fileinfo

That should instead be:
Code (Linux) Select
extension=fileinfo


Edit: Looked up the correct value
Title: Re: Call to undefined function dl()
Post by: beckzy on January 03, 2020, 02:29:00 PM
Quote from: m4z on January 03, 2020, 02:15:03 PM
Quote from: Shambles on January 03, 2020, 01:28:47 PM
- or (I think) -

Code (Linux) Select
extension=php72-fileinfo

That should instead be:
Code (Linux) Select
extension=fileinfo


Edit: Looked up the correct value

It's working now. Thanks a lot everyone :)
Title: Re: Call to undefined function dl()
Post by: Shambles on January 03, 2020, 02:31:20 PM
Splendid. I'll mark this topic as solved.
Title: Re: Call to undefined function dl()
Post by: shawnb61 on January 03, 2020, 02:52:44 PM
Quote from: Shambles on January 03, 2020, 01:28:47 PM
This "undefined function dl()" error has cropped up previously in the past couple of days.

The dl() function seems to be called by PHP when a required extension has not been nominated in the php.ini file to handle an operation (eg, a file interrogation operation). Some code, somewhere, is trying to circumvent that missing object by doing a dynamic load of the required extension. The dl() function has been deprecated for quite some time as extensions in the php.ini file are the way forward.

The right answer here is to ensure the minimum extension set has been entered in the php.ini file, including (but not limited to)

Code (Windows NT) Select
extension=php_fileinfo.dll

- or (I think) -

Code (Linux) Select
extension=php72-fileinfo

Thanks Shambles.  Helpful. 
Title: Re: Call to undefined function dl()
Post by: ozbob on June 09, 2020, 03:39:46 AM
Hello.

I have this error too.  Call to undefined function dl()

Bottom of this page https://railbotforum.org/mbs/index.php?topic=12687.msg236629#new

Any idea how I can fix this.  Thread seems to be locked.

The user who caused the error reported that:

" I've been trying to upload an attachment (~130kB PNG) and it's failing miserably. That was fine, but what's really busted things up is when I tried to add it on the edit. "

Thanks
Bob
Title: Re: Call to undefined function dl()
Post by: Arantor on June 09, 2020, 04:08:38 AM
See the quoted post above yours...
Title: Re: Call to undefined function dl()
Post by: ozbob on June 09, 2020, 04:51:44 AM
Thanks.  I have managed to resolve the error.