Apache中的PHP Curl库出现SSL错误

I have RHEL server on which PHP websites are hosted using Apache web server. In one website I'm using PHP Curl library to connect to some services. These services make use of SSL (https).

When I browse any PHP page which makes SSL calls using Curl, I get below error:

Problem with the SSL CA cert (path? access rights?)

If I run the same PHP script from command-line on my server, it works fine. Only when I browse it I get above error.

I have already tried the solution given in http://snippets.webaware.com.au/howto/stop-turning-off-curlopt_ssl_verifypeer-and-fix-your-php-config/ but it does not work.

If there is anything else I need to do, please let me know.

As mentioned earlier, I tried the solution given at http://snippets.webaware.com.au/howto/stop-turning-off-curlopt_ssl_verifypeer-and-fix-your-php-config/

However, the Apache server was not taking the php.ini changes even after restarting it. When I restarted my Linux machine, it worked. Looks like Apache might be caching php.ini somewhere and it got cleared only by restarting machine.

Hypothesis:

Could be that the user that's running Apache is so restricted that it can't get at the curl CA store. Try logging in as the web user, e.g. www-data and cd'ing to the directory with curl's files. At some time you might get an access-denied error. Finally try cat to display the file (still as Apache user). You could get an access-denied error there too.

Wherever the error occurs, either open up the permissions to allow the Apache user to access the file, or run Apache as another user.