[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 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?

-- 
Regards from Pal


Reply to: