Can't FTP — function dl() missing in PHP 5.3
-
When attempting to update a plugin, I get the following error after entering my FTP username and password:
Script execution halted: Call to undefined function
dl()
— 1The PHP version on the server was recently updated to 5.3.2, where, apparently,
dl()
is not available. I tracked the error towp-admin/includes/class-ftp.php
.Changing
if (!extension_loaded('sockets')) { $prefix = (PHP_SHLIB_SUFFIX == 'dll') ? 'php_' : ''; if(!@dl($prefix . 'sockets.' . PHP_SHLIB_SUFFIX)) $mod_sockets=FALSE; }
to
if (!extension_loaded('sockets')) { $prefix = (PHP_SHLIB_SUFFIX == 'dll') ? 'php_' : ''; //if(!@dl($prefix . 'sockets.' . PHP_SHLIB_SUFFIX)) $mod_sockets=FALSE; $mod_sockets=FALSE; }
cures the problem, but I’m loath to mess with core files. Is there a better way to fix this?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Can't FTP — function dl() missing in PHP 5.3’ is closed to new replies.