I wanted to contribute to a PHP project but under Manjaro I couldn’t test it locally. I got a “
Fatal error: Call to undefined function curl_init()” message that I didn’t manage to resolve, though the line “
extension=curl.so” was present in my
After a few hours of trial and error, I decided to develop this project under Windows. I have Windows in VirtualBox, I put the PHP project in a shared folder, so my idea was to edit the source under Linux and visualize the result under Windows.
I chose EasyPHP and installed the latest EasyPHP Devserver that provides a complete development environment.
When I opened the project I got the same error since curl was not enabled by default. On the dashboard I could edit the
php.ini file and uncommented the line “
extension=php_curl.dll“. However, after restarting the webserver I got another error:
libssh2 is missing. I found the solution here (ken’s comment):
"I had to also also copy libssh2.dll into my Apache24 folder for this to work with my PHP 5.6.2 installation. So altogether I had to do the following: Move to Windows\system32 folder: libssh2.dll, php_curl.dll, ssleay32.dll, libeay32.dll Move to Apache24\bin folder libssh2.dll Uncomment extension=php_curl.dll"
I found all these files in the install folder of EasyPHP. There are two versions of each, one in a “…vc11…” folder, while the other one in a “…vc14…” folder. I worked under PHP 5.6 so I copied the vc11 versions of each file mentioned above.
After this Apache restarted without any error.