I am having trouble getting cURL working on one of my servers. I have others set up exactly like this and they are working. Here is the error message in the system log:
PHP Fatal error: Call to undefined function curl_init()
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\php\ext\php_curl.dll' - The specified module could not be found. in Unknown on line 0
I've been researching this all day and nothing has worked. Here's the current state of the server:
- php.ini is in C:\php\
- php_curl.dll is in C:\php\ext\
- libeay32.dll and ssleay32.dll are in C:\php\
- extension=php_curl.dll is uncommented in php.ini
- Environment variable PATH = %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C\php;C:\php\ext;C:\Apache24\bin
- phpinfo() shows that C:\php\php.ini is the config file being used
- php.ini extension_dir = "C:\php\ext"
- Apache is from here
- PHP is from here
- OS is Windows Server 2008 R2 Datacenter
I've restarted several times. Other extensions are loading from the extension directory. I've also tried re-downloading the PHP zip file and replacing C:\php with the contents of the freshly downloaded zip file. I had this problem on a different server a while back when I was updating PHP and Apache. Replacing C:\php with a new copy of the zip file did fix it, but it is not helping now.
I will be happy to provide any additional information you may need.
Thanks.
phpinfo() configure command
cscript /nologo configure.js "--enable-snapshot-build" "--disable-isapi" "--enable-debug-pack" "--without-mssql" "--without-pdo-mssql" "--without-pi3web" "--with-pdo-oci=c:\php-sdk\oracle\x86\instantclient_12_1\sdk,shared" "--with-oci8-12c=c:\php-sdk\oracle\x86\instantclient_12_1\sdk,shared" "--enable-object-out-dir=../obj/" "--enable-com-dotnet=shared" "--with-mcrypt=static" "--without-analyzer" "--with-pgo"
.
Best Answer
In PHP 7.3:
C:\php
intoC:\apache\bin
C:\php
intoC:\apache\bin
(if it doesn't exist)