PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
<?php
// create a new cURL resource
$ch = curl_init();
// set URL and other appropriate options
curl_setopt($ch, CURLOPT_URL, "http://www.example.com/";);
curl_setopt($ch, CURLOPT_HEADER, 0);
// grab URL and pass it to the browser
curl_exec($ch);
// close cURL resource, and free up system resources
curl_close($ch);
?>
Following are all my packages. I also tried reinstall of all using Yum but above error still remains:
; For example:
;
; extension=msql.so
;
; Note that it should be the name of the module only; no directory information
; needs to go here. Specify the location of the extension with the
; extension_dir directive above.
;;;;
; Note: packaged extension modules are now loaded via the .ini files
; found in the directory /etc/php.d; these are loaded by default.
;;;;
[php-curl]
extension=libcurl.so
I also tried:
extension=curl.so and it was not working as well.
I did "service httpd restar" multiple times and the error stay.
Core
ctype
date
dom
ereg
fileinfo
filter
hash
iconv
json
libxml
pcre
PDO
pdo_sqlite
Phar
posix
Reflection
session
SimpleXML
SPL
SQLite
sqlite3
standard
tokenizer
xml
xmlreader
xmlwriter
[Zend Modules]
[/b]
[quote][root@localhost ~]# yum install curl
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* addons: ftp.telus.net
* base: centos.mirror.nac.net
* extras: mirror.anl.gov
* rpmforge: ftp-stud.fht-esslingen.de
* updates: mirror.cs.vt.edu
Setting up Install Process
Package curl-7.15.5-9.el5.i386 already installed and latest version
Nothing to do
[root@localhost ~]# yum install php-curl
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* addons: ftp.telus.net
* base: centos.mirror.nac.net
* extras: mirror.anl.gov
* rpmforge: ftp-stud.fht-esslingen.de
* updates: centos.aol.com
Setting up Install Process
Package php-common-5.1.6-27.el5_5.3.i386 already installed and latest version
Nothing to do[/quote]
I am running CentOS 5.5, so I don't know what else to run to get curl installed. But as per above I think Curl is installed. Isn't it? and why does php-common show up for installing curl?
Linux localhost.localdomain 2.6.18-194.26.1.el5PAE #1 SMP Tue Nov 9 13:34:42 EST 2010 i686 i686 i386 GNU/Linux
Thanks