Jerry Stuckle <[email protected]> writes: > On 6/2/2013 10:13 AM, Csanyi Pal wrote: >> Jerry Stuckle <[email protected]> writes: >> >>> On 6/2/2013 1:22 AM, Csanyi Pal wrote: >>>> Jerry Stuckle <[email protected]> writes: >>>> >>>>> On 6/1/2013 6:10 PM, Csanyi Pal wrote: >>>>>> Jerry Stuckle <[email protected]> writes: >>>>>> >>>>>>> On 6/1/2013 5:44 PM, Csanyi Pal wrote: >>>>>>>> Jerry Stuckle <[email protected]> writes: >>>>>>>> >>>>>>>>> On 6/1/2013 4:34 PM, Csanyi Pal wrote: >>>>>>>>>> Csanyi Pal <[email protected]> writes: >>>>>>>>>> >>>>>>>>>>> Jerry Stuckle <[email protected]> writes: >>>>>>>>>>> >>>>>>>>>>>> On 6/1/2013 3:21 PM, Csanyi Pal wrote: >>>>>>>>>>>>> Csanyi Pal <[email protected]> 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 >>>>>>>> <[email protected]> >>>>>>>> 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? >>>> >>> >>> (Sorry, meant the first message to go to the list then sent it instead >>> of cancelling it). >>> >>> I don't think it's a bug - it created the symlink just fine on my test >>> system. Did you install cURL after Apache and PHP? >> >> I installed cURL after Apache and PHP. >> >>>> Can I manually create the symlink? >> >>> Sure, you can create any symlink. >> >>> You could try purging the curl package than installing it again to see >>> if it adds the sysmlink. Or you can just use ln to create the link. >> >> I just created symlink and restarted apache2. It works now. >> >> Now, I tried out purging php5-curl debian package and install it again >> to see whether get I the symlink automatically? >> >> So, I have installed apache2 and php5, and purged php5-curl. >> >> When install again php5-curl, I get symlink just in the >> /etc/php5/conf.d/ but not in the /etc/php5/apache2/conf.d/ and so >> apache2 doesn't know about cURL module. >> >> I must to create symlink manually in /etc/php5/apache2/conf.d/ to point >> to the /etc/php5/conf.d/20-curl.ini. >> >> Is the situation same, there on your system? >> > > Actually, looking more closely at the directory structure, my > /etc/php5/apache2/conf.d is just a symlink to /etc/php5/conf.d. The > fact yours is not seems to be a problem.
Aha, then this cause the problem: my Wheezy system is an upgraded Squeeze system, and the configuration directories and files remains from the Squeeze system. What can I do to readjust the configuration directories and files? It seems to me that that I should purge and reinstall apache2, php5 and php5-curl, right? -- Regards from Pal -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected] Archive: http://lists.debian.org/[email protected]

