top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How to enable cURL php extension on Debian Wheezy?

0 votes
401 views

I just upgraded Squeeze to Wheezy, and have difficulties with cURL PHP extension: I can't enable it.

I have installed following packages related to this issue: curl, libcurl3, libcurl3-gnutls, php5-curl.

I have in /etc/php5/mods-available/curl.ini

; configuration for php CURL module
; priority=20
extension=curl.so

I know that cURL extension is not enabled because I want to install Moodle and it complains about cURL extension. How can I solve this problem?

posted Jun 1, 2013 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote

Have you enabled the extension as well? That looks like the standard set-up, which means that curl.ini is available, but you still have to enable it. Check in /etc/php5/conf.d to see if there's a symlink in there, otherwise look through the various bits to see if it's included somewhere in one of the stock php.ini files.

Here's an example from one of my servers:

$ ll mods-available/
total 4.0K
-rw-r--r-- 1 root root 66 Sep 15 2012 pdo.ini

$ ll conf.d/
total 0
lrwxrwxrwx 1 root root 25 Sep 24 2012 10-pdo.ini -> ../mods-available/pdo.ini

If you make changes here, ensure you restart your sever.

answer Jun 1, 2013 by anonymous
Similar Questions
+3 votes

I have php 5.6.5 on centos 4.5 64bit. I am unable to install curl. And generate so file, I have tried all the possibilities.

./configure --with-curl=/root/php-5.6.5/ext/curl/libs --with-mysql --with-mysqli --with-apxs2=/usr/local/apache2/bin/apxs
0 votes

It was easy in PHP 5.3 as long as you were building the CLI by itself. In the PHP 5.4 configure script there is a new PHP_BINARIES variable being used instead of setting PHP_SAPI=cli and thus the "#define ENABLE_CHROOT_FUNC 1" is never written to the output file. I have been able to manually enable it by adding the define to the main/php_config.h after running configure. The issue seems to be a line: if test
"program" = "program". This comparison being true is what causes the configure script to add "cli" to the PHP_BINARIES variable instead of setting the PHP_SAPI variable. The other prerequisites (HAVE_CHROOT and ZTS) are all at the required settings. It is only the ENABLE_CHROOT_FUNC which is causing the function to not be compiled into the resulting binary. Any information or explanation would be very helpful.

For the record, I know what the chroot() function does and does not do. I am experimenting with using chroot() to isolate an already running script to a particular subset of the filesystem for file operations.

...