Solved

PHP error

Posted on 2008-06-24
5
267 Views
Last Modified: 2013-12-13
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/htdocs/webbots/phpinc/LIB_http.php 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
0
Comment
Question by:shannon_adams
5 Comments
 
LVL 19

Expert Comment

by:BrianGEFF719
ID: 21857333
>>How do I add this option without having to rebuild/recompile php?

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
0
 
LVL 1

Expert Comment

by:Neoific
ID: 21857353
You cannot add modules after building.  Yes, you need the curl package.
0
 
LVL 5

Expert Comment

by:codeQuantum
ID: 21857566
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.
0
 
LVL 5

Expert Comment

by:codeQuantum
ID: 21857597
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
0
 
LVL 1

Accepted Solution

by:
kkretsch earned 500 total points
ID: 21857640
Perhaps your curl module is already existing on your system but not activated as a php module/extension. You could look into the extensions dir defined in your php.ini and look for *.so file references. With a bit of look it is just not built into the binary but available as an external runtime lib.
0

Featured Post

Easy, flexible multimedia distribution & control

Coming soon!  Ideal for large-scale A/V applications, ATEN's VM3200 Modular Matrix Switch is an all-in-one solution that simplifies video wall integration. Easily customize display layouts to see what you want, how you want it in 4k.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How is this connection happening? 3 20
how to call a remote wordpress to use his  content in a loop 3 33
Wordpress Security 29 48
jQuery Toggle & Anchor Links 5 43
Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
In Solr 4.0 it is possible to atomically (or partially) update individual fields in a document. This article will show the operations possible for atomic updating as well as setting up your Solr instance to be able to perform the actions. One major …
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question