[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to enable cURL php extension in Apache2?



Jerry Stuckle <jstuckle@attglobal.net> writes:

> On 6/1/2013 6:10 PM, Csanyi Pal wrote:
>> Jerry Stuckle <jstuckle@attglobal.net> writes:
>>
>>> On 6/1/2013 5:44 PM, Csanyi Pal wrote:
>>>> Jerry Stuckle <jstuckle@attglobal.net> writes:
>>>>
>>>>> On 6/1/2013 4:34 PM, Csanyi Pal wrote:
>>>>>> Csanyi Pal <csanyipal@gmail.com> writes:
>>>>>>
>>>>>>> Jerry Stuckle <jstuckle@attglobal.net> writes:
>>>>>>>
>>>>>>>> On 6/1/2013 3:21 PM, Csanyi Pal wrote:
>>>>>>>>> Csanyi Pal <csanyipal@gmail.com> writes:
>>>>>>>>>
>>>>>>>>>> Hi,
>>>>>>>>>>
>>>>>>>>>> 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 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?
>>>>>>>>>
>>>>>>>>> I have in
>>>>>>>>> /etc/php5/mods-available/curl.ini
>>>>>>>>> ; configuration for php CURL module
>>>>>>>>> ; priority=20
>>>>>>>>> extension=curl.so
>>>>>>>>>
>>>>>>>>> Still doesn't work cURL. Why?
>>>>>>>>>
>>>>>>>>
>>>>>>>> What do you have in /etc/php5/mods-enabled?
>>>>>>>
>>>>>>> I even haven't the /etc/php5/mods-enabled/ directory.
>>>>>>
>>>>>> Instead, I have this symbolic link:
>>>>>> /etc/php5/conf.d/@20-curl.ini
>>>>>>
>>>>>> that pointing to the:
>>>>>> -> ../mods-available/curl.ini
>>>>>>
>>>>>
>>>>> Sorry - you're right.  Got that mixed up with the Apache mods.
>>>>>
>>>>> cURL *should* be installed then.
>>>>
>>>> Yes, I think so too.
>>>>
>>>> $ aptitude search php5-curl
>>>> i   php5-curl - CURL module for php5
>>>>
>>>>> I've never worked with Moodle, but a quick glance indicates it's a
>>>>> web application running under Apache.  After installing the cURL
>>>>> extensions, you did restart Apache, correct?
>>>>
>>>> Yes, I restarted Apache2 with '/etc/init.d/apache2 restart'
>>>> command. 
>>>>> You can prove if cURL is installed under the Apache version of PHP
>>>>> (not the same as the CLI version) with a simple page containing
>>>> only: 
>>>> How could I know whether I have the Apache version of PHP
>>>> installed? 
>>>> $ aptitude show php5-curl
>>>> Package: php5-curl
>>>> New: yes
>>>> State: installed
>>>> Automatically installed: no
>>>> Version: 5.4.4-14
>>>> Priority: optional
>>>> Section: php
>>>> Maintainer: Debian PHP Maintainers
>>>> <pkg-php-maint@lists.alioth.debian.org>
>>>> Architecture: powerpc
>>>> Uncompressed Size: 115 k
>>>> Depends: libc6 (>= 2.4), libcurl3 (>= 7.16.2), phpapi-20100525+lfs,
>>>> php5-common (= 5.4.4-14),
>>>>            ucf
>>>> PreDepends: dpkg (>= 1.15.7.2~)
>>>> Description: CURL module for php5
>>>>    CURL is a library for getting files from  FTP, GOPHER, HTTP
>>>> server. 
>>>>    PHP (recursive acronym for PHP: Hypertext Preprocessor) is a
>>>>    widely-used open source
>>>>    general-purpose scripting language that is especially suited for
>>>> web development and can be embedded into HTML.
>>>> Homepage: http://www.php.net/
>>>>
>>>>> <?php phpinfo(); ?>
>>>>
>>>>> This will show all extensions loaded.  If cURL is listed, then you
>>>>> should follow up with Moodle (incorrect test for cURL?).
>>>>
>>>> I created the file info.php with the abowe mentioned content, and
>>>> try it out, but curl extension isn't listed there.
>>>>
>>>>> If it is not listed, we need to follow up more - what does it say
>>>>> the config file you're using is?
>>>>
>>>> Which config file do you think about?
>>>>
>>>
>>> Look at the output of your phpinfo() function - what does it show as
>>> "Loaded configuration file"?  What about the next two boxes ("Scan
>>> this dir for additional .ini files" and "Additional .ini files
>>> parsed"?
>>
>> Loaded Configuration File:
>>   /etc/php5/apache2/php.ini
>>
>> Scan this dir for additional .ini files:
>>   /etc/php5/apache2/conf.d
>>
>> Additional .ini files parsed:
>> /etc/php5/apache2/conf.d/gd.ini, /etc/php5/apache2/conf.d/intl.ini,
>> /etc/php5/apache2/conf.d/mcrypt.ini,
>> /etc/php5/apache2/conf.d/mysql.ini,
>> /etc/php5/apache2/conf.d/mysqli.ini,
>> /etc/php5/apache2/conf.d/pdo.ini, 
>> /etc/php5/apache2/conf.d/pdo_mysql.ini,
>> /etc/php5/apache2/conf.d/xcache.ini
>>
>> So I don't see the content of the /etc/php5/conf.d/ directory here,
>> with files as: @10-pdo.ini, @20-curl.ini, ..., @20-xmlrpc.ini.
>>
>> For Moodle installation both curl and xmlrpc are needed.
>>
>
> Hmmm, looks like it didn't install the symlink for cURL in
> /etc/php5/apache2/conf.d.  It should be linked to
> ../mods-available/curl.ini.
>
> Not sure why this didn't happen - it should have been built as a part
> of the cURL installation.

I agree with that, it should have been built as a part of the cURL
installation. Shall I fill a debian bugreport for this?

Can I manually create the symlink?

-- 
Regards from Pal


Reply to: