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

Open Source Finance Modules in PHP
displaying only thumbnails in directory, but linking to full size image
Change url-string
using onChange for menu selection in jquery
Upload files using Google Gears and ASP.NET or PHP
How to efficiently paginate large datasets with PHP and MySQL?
How to enable Socket in PHP?
How to remove text between tags in php?
PHP - Opening uploaded DOCX files with the correct MIME TYPE
Converting Integer String to Money Format
Suppress Drupal status messages by role?
How do I create a long-running PHP process in Apache?
multiple select in one statement
Parsing PHP array which has an abject inside
Coding standards and design patterns in PHPSpec library
simpleXML and accented characters in PHP

Categories

HOME
android-espresso
weblogic12c
jms
activemq
hid
embedded-resource
vsts-build
jint
video-streaming
mithril.js
save
telegraf
tfs2010
clish
buffer
mailmerge
squirrel-sql
mailgun
c#-7.0
asciimath
jqxgrid
spring-ldap
connection-refused
stackexchange.redis
rxjs5
animated-gif
react-dnd
unordered-multimap
password-generator
list-comprehension
tf-idf
fatfs
vcenter
xcrun
markov-chains
nppexec
ftp-server
identify
django-crispy-forms
oauth2
export-to-pdf
opal-framework
bit-shift
return-type
photoswipe
entropy
sequence-diagram
exc-bad-access
winmerge
nivo-slider
1010
swiperefreshlayout
zend-server
http4s
d3v4
allegro
boost-compute
always-on-top
fiber
ajaxmin
urbit
mnesia
gulp-uglify
okta-api
onepage-checkout
webgrind
phpquery
linuxbrew
perceptron
opencyc
apache-commons-digester
fanotify
cfwheels
bjam
blockquote
gql
search-form
webproject
mutators
kognitio-wx2
sunos
aho-corasick
squeezebox
otl
screwturn
jmenubar
san
virtual-channel
ofstream
contextswitchdeadlock
story
server-name
java.lang.class
exponent
type-safety
servercontrol
tablet-pc
css-friendly
directshow.net
jmenu
qcar-sdk
libxslt
outlook-2007-addin
icicles
xap
version-control-migration
jboss-mdb
chronic

Resources

Database Users
RDBMS discuss
Database Dev&Adm
javascript
java
csharp
php
android
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App