Page 1 of 1

configuring php

Posted: Tue Feb 14, 2006 4:47 pm
by s.dot
I don't really know where this goes, so I'll just put it here.

I need to configure my server's PHP to support curl. Do I have to reinstall the whole PHP again? Will I lose all my current settings?

How do I configure support for curl? PHP.net says --with-curl[=DIR] , but I don't know where to run that.
Help, please =]

Server is FreeBSD 5.3

Posted: Tue Feb 14, 2006 6:18 pm
by sheila
Yes you need to compile and install PHP again.
The --with-curl[=DIR] is a compile option.
Look at the output from phpinfo(). At the top of the page you'll see all the compile options that your current version is using. You'll want to duplicate those settings and add curl.

If it's not already installed you need to install libcurl first.

If you're running PHP as an Apache module you'll need the source for Apache so you can built the module. Follow the directions at php.net. I think they are clear but if you've never compiled anything from source then it might be a bit intimidating. Just take it a step at a time.

To preserve your PHP settings just make a copy of your php.ini file so you can replace whatever is installed for you.

Posted: Tue Feb 14, 2006 6:22 pm
by s.dot
thank you, that helps me a lot.