Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject: Problems Installing cURL
PostPosted: Sun Oct 07, 2012 8:25 pm 
Offline
Junior Member

Joined: Mon Oct 17, 2011 11:11 pm
Posts: 35
I have a full LAMP stack installed on a Ubuntu server. I tried installing cURL using apt-get install php5-curl

I get a notice saying several packages like php5-common and php5-mysql will also be installed.

This is strange because this software is already running on my machine. Is there a reason it's telling me to install these packages?

I'm afraid to complete the install, as I'm not sure if reinstalling php5-mysql and the others might corrupt my configurations.


Top
   
PostPosted: Sun Oct 07, 2012 11:19 pm 
Offline
Senior Member

Joined: Wed Jun 08, 2011 11:25 pm
Posts: 51
A little confused on what you're trying to achieve.

php5-curl is the cURL module for php5. If you want the cURL program proper, apt-get install curl.


Top
   
PostPosted: Mon Oct 08, 2012 4:09 am 
Offline
Junior Member

Joined: Sun May 06, 2012 2:30 pm
Posts: 25
Location: San Diego, California
Uninstalling/reinstalling via APT shouldn't touch files in /etc (unless you --purge)
It only tries to create the files if they don't already exist. At the very least it gives you an option to update yours or not.


Top
   
PostPosted: Mon Oct 08, 2012 9:00 am 
Offline
Junior Member

Joined: Mon Oct 17, 2011 11:11 pm
Posts: 35
Thanks for the big help. Everything I was reading told me to install php5-curl. The apt-get install curl ran without problem.

I am however getting an internal server error whenever running a page that uses cURL. This is progress, as before I was getting an undeclared function error "curl_init() not found."

Any ideas why I'm getting this HTTP 500 error?


Top
   
PostPosted: Mon Oct 08, 2012 10:53 am 
Offline
Senior Member

Joined: Wed Jun 27, 2012 10:00 pm
Posts: 87
Website: http://hemonc.org/wiki/Main_Page
For my server, I used your original command: sudo apt-get install php5-curl

Did you remember to restart Apache after installation?

_________________
Amateur, eager to learn.
My hematology, oncology, and chemotherapy regimen wiki


Top
   
PostPosted: Mon Oct 08, 2012 11:39 am 
Offline
Junior Member

Joined: Mon Oct 17, 2011 11:11 pm
Posts: 35
Yes, I've restarted the server. I also made sure to add "extension=curl.so" to /etc/php5/apache2/php.ini and I've verified the package is installed with "dpkg -s curl"


Top
   
PostPosted: Mon Oct 08, 2012 7:43 pm 
Offline
Junior Member

Joined: Sun May 06, 2012 2:30 pm
Posts: 25
Location: San Diego, California
Mm installing the curl package won't provide cURL support in PHP. For that, as per your original post, you must install the PHP cURL extension with apt-get install php5-curl.

I'd bet somewhere in your logs PHP complains it can't load curl.so. Create a phpinfo() file and see if it lists cURL as loaded. Also for security I would recommend you remove such a file after you get this working, it's not a great idea to let the public access that file.

If it's not being loaded, install php5-curl. I don't get why it's listing already installed packages as must be installed, but accepting the installation shouldn't mess with your config at all.


Top
   
PostPosted: Mon Oct 08, 2012 9:59 pm 
Offline
Senior Member
User avatar

Joined: Sat Aug 30, 2008 1:55 pm
Posts: 1739
Location: Rochester, New York
How did you originally install PHP? If it involved 'tar' or 'make', that may explain it...

Also, if you haven't run 'apt-get update' and 'apt-get upgrade' in awhile, it may be forcing you to apply security updates as part of the installation. The wording is particular when that happens, though.

_________________
Code:
/* TODO: need to add signature to posts */


Top
   
PostPosted: Tue Oct 09, 2012 3:44 pm 
Offline
Junior Member

Joined: Mon Oct 17, 2011 11:11 pm
Posts: 35
Not sure how PHP was installed, as I didn't do it. But I'm sure it wasn't with 'make.' I just installed that the other day. It could have been tar, but more than likely it was probably apt-get.

I did run apt-get update just before downloading curl.

I changed my error reporting on the script using cURL and it appears cURL isn't being recognized at all. I'm still receiving the 'undefined function init_curl()' error.

Downloading packages is really new to me, so I may have made some clumsy mistakes in downloading cURL. As stated in my original post, php5-curl required dependencies I wasn't sure about downloading. Someone on the Ubuntu forums advised to compile it from source, which I did. Though I installed it in the /usr directory. Not sure if this was a mistake, but cURL still wasn't running.

I then took Retrograde Inservsion's suggestion and ran apt-get install curl. Ubuntu notified me the package updated, but still no luck with getting cURL to run. I then moved cURL to the /etc directory.

It's been an awkward clumsy process, so I wouldn't be surprised if I've made more than one mistake. Thank you all for your suggestions I've gotten so far.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: mattltm and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group