php


Uncaught Error: Call to undefined function curl_init()


I have a wordpress plugin that is trying to use curl but giving me the following error.
PHP Fatal error: Uncaught Error: Call to undefined function curl_init()
$curl = curl_init();
I have the same issue on my local dev environment and in my staging environment.
http://topmortgagepro.com/whats-your-home-worth/
At the time of posting it will include the phpinfo() That will be removed if you see this at a later time. htaccess user/password is pixona:pixona to see the site.
I have tried many solutions offered with no luck. Open to ideas and can show other config settings as needed.
I have tried the following and restarted apache after each (on local machine):
apt-get install php-curl
apt-get install php7.0-curl
edited the php.ini to uncomment the following:
extension=php_curl.dll
extension=php_bz2.dll
added this extension in the php.ini
extension=php_curl.so
phpenmod curl
The solution came down to the distribution being out of date. To diagnose the issue I made a sample script to see if curl was loading.
<?php
if (!extension_loaded('curl')) {
echo 'failed';
} else {
echo 'loaded';
}
?>
This gave me the following error:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20131226/curl.so' - /usr/lib/php/20131226/curl.so: undefined symbol: zend_unset_property in Unknown on line 0
With that I came across this other question which suggested doing
apt-get dist-upgrade
PHP Startup: Unable to load dynamic library `curl.so` Ubuntu
After the upgrade (I used the new php.ini) the script worked perfectly.

Related Links

testing contents of loadHTML($str)
Parse tables using Symfony DomCrawler
Allow user to delete their entries
PHP external API access fails, when called from another page on same domain?
Inserting data from excel into PHP application, don't works
htacess file unable to retrieve authenticated/logged in user when request is ajax
Random quote from file with PHP [duplicate]
How do i clear this array by user input in php/html?
How to detect that a MySQL table has been saved to attach an event?
how to enable wordwrap in button in php?
Yii2: phpoffice/phpexcel identifies .xlsx file as HTML
How can I convert MySQLi into prepared statements? [duplicate]
How to use php select mysql field type of `blob`
PHP : get data from database
merge new json element as array in JSON
I did validation for my product insertion page but the product is not inserting into the database?

Categories

HOME
firebase
class
keyboard
xcode
focus
adfs3.0
hdfs
biztalk
ontology
dji-sdk
ui-automation
gprs
joomla3.2
polymer-2.x
wine
reportviewer
clickable-image
spring-security-oauth2
solution
amazon-emr
erd
fbloginview
xbap
sslhandshakeexception
cocos2d-android
gravity
parceler
spring-ldap
ratio
environment
offline-caching
npoi
es6-modules
john-the-ripper
epplus
nest
ftp-server
jslint
uivisualeffectview
unification
aurelia-http-client
widestring
rdp
spring-restcontroller
imgur
netapp
slideshow
spooler
absolute
dblink
openerp-6
nitrousio
yargs
decoder
uibinder
processor
accessibilityservice
as3-api
taco
currency-exchange-rates
json-spirit
cryptojs
bootstrap-wysiwyg
physicsjs
quercus
mutators
uno
cout
squeezebox
siena
prism.js
forio-contour
hyperloglog
miglayout
property-injection
usb-flash-drive
django-facebook
acceptance-testing
significant-digits
sfinae
voice-recording
uploading
radscheduler
vows
rtd
bll
android-2.1-eclair
principles
resharper-5.0
zend-test
rawcontacts
iphone-sdk-3.1.3
html-generation

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App