0

i've made a little php for testing :

    // create curl resource
    var_dump(extension_loaded('curl'));?>

I've on my computer Apache 2.4 with PHP 7.2.22 deployed.

When i display this Php using a browser, the value is True (module is ok)

When use this with Windows command line using php -f curl.php, the value is false (module not loaded).

When i use phpinfo() i see the curl module, so when i use php -m curl is missing in the list (maybe it's normal).

i've already put php folder in path, extension is ok (uncommented) in php.ini file, no errors in php_errors.log.

Can someone help me.

Thanks a lot.

  • 1
    _“in php.ini file”_ - in _which one_? PHP exeucted via the web server, and PHP executed via CLI, often use _different_ php.ini files. – CBroe Jul 28 '20 at 10:38
  • https://stackoverflow.com/questions/14558150/how-to-know-which-php-ini-is-used – CBroe Jul 28 '20 at 10:39
  • you're alright, i don't know why my dev's put the php.ini file in /conf of the apache server, when i copy this file in the php folder it's ok. – Xavier Domdom Jul 28 '20 at 10:44

0 Answers0