PHP Version 7.2.1 Apache Version: Apache/2.4.29 (Win64) OpenSSL/1.0.2n PHP/7.2.1 OS: Windows Server 2012 R2
I enabled cURL in my php.ini
file.
When I try to load modules in console: php -m
I got:
There we can see that cURL is loaded and it is working when I use php [script path]
command
But cURL is not loaded on my Apache Server
i have info.php
page which contains:
<?php
if(in_array ('curl', get_loaded_extensions())) {
echo "CURL is available on your web server\n";
}
else{
echo "CURL is not available on your web server\n";
}
print_r(get_loaded_extensions());
phpinfo();
?>
Which tell if cURL is in loaded extensions, write them down, and show classic php info details.
There is no cURL in loaded extension. But if you check php.ini
file it is C:/PHP/php.ini
<- one i changed (removed ";" to enable extension.)
And when I try to run cURL commands from server I get:
Fatal error: Uncaught Error: Call to undefined function curl_multi_init() in C:\web\databaseservers\generate-db-server-stats2.php:27 Stack trace: #0 {main} thrown in C:\web\databaseservers\generate-db-server-stats2.php on line 27
(This script works locally.)
Where can be problem?
Edit1:
Adding snippet from my php.ini
There you can see that file i am editing is correct one (Path above) And that curl is enabled as extension (PHP7.2 and above doesn't require prepone "php_" and postpone ".dll")
EDIT2: Fixed : for PHP7 ... I added php dir path in system enviroment varible, deleted libeay32.dll and ssleay32.dll from apache/bin, keep these dll in php directory and its work. – Wasim A. Mar 17 at 19:10 Linked topic helped