user513788
user513788

Reputation: 103

Why is CURLOPT_CAINFO defined in the command line, but not in web?

I tried running a PHP script that var_dumps CURLOPT_CAINFO in the command line. It gives a value. However, when I put the same code in a PHP file for use with Apache, it says CURLOPT_CAINFO is undefined. What happened?

Upvotes: 0

Views: 227

Answers (1)

Hans Z.
Hans Z.

Reputation: 53998

You'll need to enable CURL in the PHP installation that Apache points to. See also: How to enable cURL in PHP / XAMPP. Check the settings by calling:

phpinfo();

in your script and look at the differences in modules that are enabled.

Upvotes: 1

Related Questions