简体   繁体   中英

PHP- cURL enabled but sill not working

I am using joomla and using WAMP as my server and I am trying to add a twitter feed to my website but I get this error message

*"Your PHP doesn't have cURL extension enabled. Please contact your host and ask them to enable it."

I then go to my PHP extensions and enable curl and i still get the same message. I even went into the php.ini file and edited it in there but still no change. Any advice on this issue would be really appreciated. Thank you

WAMPServer has more than one php.ini file. One for the configuration to use with Apache and one to use with the configuration of PHP CLI ( Command line Interface )

You could use the easy method :

Use the wampmanager menus ( thats the icon that sits in the system tray ).

ledt click wampmanager icon -> PHP -> PHP Extensions 

This will give you a menu containing all the extensions, make sure that php_curl has a tick mark beside it. If it does not then click that line in the menu and it will activate that extension. Give it a few seconds to process as it autonatically restarts Apache because that is necessary to activate a new extension.

Really could not be simpler.

Or you could edit the php.ini manually again using the wampmanager menus;

left click wampmanager -> PHP -> php.ini

This will launch notepad on the correct php.ini which is actually C:\\wamp\\bin\\apache\\apachex.yz\\bin\\php.ini .

Maually remove the ; (semi colon) beside the php_curl extension, save the file, and then restart Apache.

Warning: this can introduce security issues that SSL is designed to protect against.

But a really simple fix that worked for me was to call:

curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);

before calling:

curl_exec():

in the php file.

I believe that this disables all verification of SSL certificates.

Answer by @Chris Dutrow

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM