Monday, 15 May 2017

Uniform Server Uniserver Zero VIII - PHP Warning: PHP Startup: Unable to load dynamic library 'C:/UniServerZ/core/php56/extensions/php_curl.dll' - The specified module could not be found.\r\n in Unknown on line 0

Another day, another dedicated server. This time, one running Uniserver Zero XIII. Client wanted to stop using the standard Unicontroller as logging in after a reboot to start the webserver was a pain and wanted use the UniService plugin instead.

Downloading and installing the service plugin was fine, however when attempting to browse certain Wordpress sites we were receiving the following error:

PHP Warning:  PHP Startup: Unable to load dynamic library 'C:/UniServerZ/core/php56/extensions/php_curl.dll' - The specified module could not be found.\r\n in Unknown on line 0

For some reason, the UniServer plugin is unable to load the php_curl.dll file - it appears to be related to other assemblies that this file uses.

The fix was to add the PHP folder to the system path variable. To do this,

1. Bring up the system properties
2. Go to "Advanced System Settings"
3. click on the option that says "Environmental Variables"
4. Scroll down the "System Variables" list and find Path
5. Click "edit" and at the end of the variable, add ; c:\uniserverz\core\php56

Depending on your path and PHP version, you may need to alter it (for example d:\uniserver\core\php71 if you are running PHP 7.1 with an extraction on the D: in Uniserver)

Once done, click OK and close the window - restart the Apache service and it should be working

Thursday, 4 May 2017

Error updating Wordpress - Download failed.: No working transports found

I was recently involved in migrating some websites to a new dedicated server. After getting the new sites online, the owner of the server tried to perform a WordPress update but he following error occurred:

Download failed.: No working transports found

Upon investigation, it seems that by default the PHP ini that we were using had the module curl commented out and this needs to be available for the updates to run.

To resolve this you need to stop Apache and then edit the live php.ini file on your website and find the line that reads:

;extension=php_curl.dll

You can then remove the semi-colon from the front so you just have:

extension=php_curl.dll

Restart Apache and try the update again

Update 13/09/2017

Further to the above, the issue may persist if running under Windows and the PHP folder isn't registered as an environmental variable. I found this to be the case if falling back to an older verison of PHP under Uniserver.

To resolve this problem, you need to go system properties and then environmental varibles and add the PHP folder path to the "Path" option under system variables.

Its contains a lot, so don't delete it! just add a semi colon at the end and the extra path. In my case it was: ;C:\UniServerZ\core\php56