Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Of course the above path may be different in your case. You might also set extension_dir in php.ini accordingly.
Then restart apache and hopefully you'll have curl support in php.
I followed your instruction and succesfully enabled curl, thanks a lot. I still have some problem though. when I do curl test through php it still complaining fatal error. I'll try double check my config in php.ini today.
should I only put this? "extension=/usr/local/lib/php/extensions/no-debug-non-zts-20060613/curl.so"
or put
extension=php_curl.ddl
or
extension=php_curl.so
and point to usr/local/lib/php/extensions/no-debug-non-zts-20060613
Just make sure that the path to curl.so is correct.
As for .dll is for the windows version of php. Of course you must restart apache for the changes in php.ini to take effect.
You can use the folloing inside a php page to test if the extension works:
I am still getting error. I tried adding a line in httpd.conf: "LoadModule: php_curl modules/curl.so" as I think the module should be running before you can use it. But it didn't work, I know it's not the right way to do it. Httpd complains that it can't locate the API or something. Do you have any idea? should I load the module at start-up separately?
curl.so is not a apache module, so you cannot put it in http.conf. In httpd you need just the "LoadModule php5_module modules/libphp5.so" (without the ":" you've put in LoadModule in our last post)
In normal conditions it's used as a built-in php using "--with-cul" in the ./configure options when compiling from source. In your case you're trying to add curl as an extension to php, and this is can be done through php.ini.
What is the exact error you get in apache error_log?
Does
There is no output after I run php -i | grep -i curl.
I'll remove the line in httpd.conf. that's what I thought it's not a good idea hehe..
error_log only say something RSA doesn't match server name 'Allanitto' or something like that, and can't find favicon.ico.. I don't think it has something to do with curl.
can I just run ./configure --with-curl, and run make but not make install? do you think It's going to modify my current php config in a bad way?
There is no output after I run php -i | grep -i curl.
That means that you have no curl support for php. Are you sure you're editing the correct php.ini? You can find the path to the php.ini your php uses by running:
Code:
php -i | grep php.ini
2.
Quote:
I'll remove the line in httpd.conf. that's what I thought it's not a good idea hehe..
error_log only say something RSA doesn't match server name 'Allanitto' or something like that, and can't find favicon.ico.. I don't think it has something to do with curl.
Apache will refuse to start if you use the code for php.ini into httpd.conf. That makes me ask you if you restart apache when you change php.ini. You should restart apache any time you change things in php.ini. The other errors you see have nothing to do with curl.
3.
Quote:
can I just run ./configure --with-curl, and run make but not make install? do you think It's going to modify my current php config in a bad way?
I don't understand what you mean by php config. Without running "make install" nothing will happen.
BTW, why don't you want to recompile php, adding built-in curl support?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.