Problems Installing 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.
8 Replies
php5-curl is the cURL module for php5. If you want the cURL program proper, apt-get install curl.
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.
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?
Did you remember to restart Apache after installation?
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.
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.
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.