![]() |
Cannot use CURL?
Hi,
I do have curl installed and I just can't get it to work. Here's my curl setup. curl -V curl 7.12.1 (i386-redhat-linux-gnu) libcurl/7.12.1 OpenSSL/0.9.7a zlib/1.2.1.2 libidn/0.5.6 Protocols: ftp gopher telnet dict ldap http file https ftps Features: GSS-Negotiate IDN IPv6 Largefile NTLM SSL libz Code:
<?phpFatal error: Call to undefined function: curl_init() in /usr/local/apache/test.html on line 5 Line 5 is this: $ch = curl_init('index.html'); I tried both relative and absolute paths for the URL and it still doesn't work... |
Is it the cURL plugin enabled in php.ini?
|
Quote:
Eventhough I had CURL installed, I didn't have libcurl installed. So I downloaded libcurl and installed it. Recompiled my PHP with it, restarted Apache and now it works. What I don't get is, what is the difference between libcurl and curl? Is libcurl just some kind of wrapper for curl? I always thought that CURL was a PHP specific set of libraries...is it available for other languages like ASP, Perl etc? |
cURL, I think, is the PHP interfact to Libcurl. Libcurl is not just PHP orientated, it's used in many various instances.
|
cURL is the stand-alone wrapper for the libcurl libraries. libcurl is not specific to PHP, its a commandline tool (via the curl commandline wrapper) and php has bindings for it (as do many other langauges).
|
I have a question regarding this topic, didn't feel like starting an own thread for it.
I'm using WAMP, how would I install cURL(and also SSL) on it? I can't compile the PHP in it, or can I? And how? Anyways, I'm just wondering. I'm using Windows if that is important to know. But you probably knew that since I was using WAMP and not MAMP. |
Tanax, go to your PHP Info page (probably http://127.0.0.1/?phpinfo=1 ) and note down the location of the php.ini being used (probably <wamp_path>/bin/apache/<apache_ver>/bin/php.ini ).
Stop the apache service (clicking the systray icon has the option to stop all services). Edit the line which says ";extension=php_curl.dll" in the php.ini file -- remove the semicolon. Save it. Start the apache service. In theory, that should work (go back to the PHP Info page to see if curl is loaded) but no guarantees. ^^ |
Quote:
Quote:
Wow, I had it backwards! So CURL is the wrapper for libcurl, got it... |
Quote:
Tho, I didn't find SSL there.. However: Quote:
Thanks alot! And sorry for hijacking your thread allworknoplay. |
Quote:
:-P |
Yuck! No thanks xDD LINUX is.. bleeh!
I'm thinking however to buy a Mac next time ;-) |
Quote:
Nothing wrong with MAC. I am thinking of getting one myself. The only problem is that they are so damn expensive... |
Indeed xD
But they're really good though, and I need one for my music studio :-) |
Quote:
|
Quote:
Well I hate LINUX's interface, that's what I mean. And I love Mac's interface, it's great. A little difficult to understand in the beginning tho, but I'll get use to it :-) |
Quote:
That's the biggest key, "commercial" support. It's what has kept Mac and Windows in the forefront for the longest time. That has always been the issue with Linux. You have to be a certain type of individual to be a Ubuntu or some form of linux user... Installation is getting easier and easier, but until commercial apps will support Linux, it will always be the 3rd wheel OS...from a consumer standpoint... |
Quote:
|
Quote:
Yea command line isn't as nice as GUI (I must admit I miss my days of programing DOS 3.2, it was simpler). But for some reason I doubt you are referring the command line of Linux and are referring to one of over 1000 GUI's built for Linux (not counting custom built GUI's). I have seen GUI's for Linux that could make you swear it was a Windows OS, same goes for the Mac OS. The only real hindrance is usually found in that the software you would want to use with Linux not being available or very difficult to configure. I personally insist on Linux servers for my web design. Last I worked with a Linux machine, hands on, was almost 4 years ago when I was consulting on a backoffice server. I personally use Windows systems for all my PC's and would only get a Mac if I was doing CGI rendering. And even then I would set it up to run Windows within the Mac OS for when I wasn't doing CGI. |
Quote:
Right. I think it is Novell? That bought SuSe? And is trying to make it a standard corporate desktop OS, and seems to be failing miserably. I remember this one company was being trained to use their OS and get rid of Windows but good luck on that.... The thing is, Windows isn't a bad OS! There are different types of users.... I use Windows for everything desktop related. I use Redhat/CentOS for all my heavy duty server related roles.... I want to get into Mac but haven't had the chance yet. I've also wanted to try Ubuntu but I haven't had time. I don't want to be watered down too much and try to know every OS that's out there... Flash is very very visually impressive, I actually use Flash for my graphs but I want to get away from it and just use some type of GD or PNG/JPG type graphs, I just haven't found any that look BETTER than my Flash graphs... |
Quote:
Linux is hands down the best for webdesign. I know I'm bias but it's ok. The LAMP structure is the best that's out there.... I would be interested in knowing what the current market share is between Apache and IIS. I've always had a hell of bad time with IIS back in the days when I was coding in ASP. I'd like to experience a Ubuntu or some form of linux that looks exactly like Windows or Mac...I would probably love using it for entertainment purposes... The way I use linux now is pure command line... |
| All times are GMT. The time now is 08:29 AM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0