Shannon Adams
asked on
PHP error
php -v shows:
PHP 5.2.4 (cli) (built: Oct 25 2007 19:44:10)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
I am working on something that I think needs the "--with-curl" option. PHP needs to have this as part of the configuration: "--with-curl".
When I run this: "php cflc_login.php", I get
PHP Fatal error: Call to undefined function curl_init() in /opt/csw/apache2/share/htd ocs/webbot s/phpinc/L IB_http.ph p on line 249
I believe adding the --with-curl as part of the configuration will solve it. How do I add this option without having to rebuild/recompile php?
Thanks for any help,
Shannon
PHP 5.2.4 (cli) (built: Oct 25 2007 19:44:10)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
I am working on something that I think needs the "--with-curl" option. PHP needs to have this as part of the configuration: "--with-curl".
When I run this: "php cflc_login.php", I get
PHP Fatal error: Call to undefined function curl_init() in /opt/csw/apache2/share/htd
I believe adding the --with-curl as part of the configuration will solve it. How do I add this option without having to rebuild/recompile php?
Thanks for any help,
Shannon
You cannot add modules after building. Yes, you need the curl package.
There is a better way.
CURL is not maintained anymore (it is obsolete) and has been superseded... This is probably why your host did not enable CURL by default.
Use HTTP_Request instead.
CURL is not maintained anymore (it is obsolete) and has been superseded... This is probably why your host did not enable CURL by default.
Use HTTP_Request instead.
Alternatively, if you insist on using CURL, you can download the package from PEAR and use its functions directly.
http://pear.php.net/package/Net_Curl/download
http://pear.php.net/package/Net_Curl/download
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You can't, you must recompile php with curl support.
However, it's not a total loss. You can use php sockets (if enabled) to do what you want. Also, pear has several packages for http, https, and ftp support, so you _should_ be able to manage with out curl.
Good Luck.
Brian