4

I'm trying to install XML_RPC2 package from PEAR library, but whenever I type a proper command (pear install XML_RPC2) I'm getting an error:

pear/XML_RPC2 requires PHP extension "curl"
No valid packages found
install faild

Strangely enough command

$ pear package-dependencies xml_rpc2

returns information "this package does not have any dependencies" (works fine in any other case).

I've also tried with older versions of XML_RPC2 - same thing. It's the first packege I have problem with. I'm sure curl is enabled and it's work(tested). Beside that I have installed all others components listed on dependencies list(PHP 5.3, PEAR 1.9.2, Cache_Lite 1.7.9). I'm working on standard WAMP installtion on Windows XP.

I'll be grateful for any help:)

Edit.

Final solution: WAMP has two locations of php.ini, one used by php scripts and one for console commands. The first one is located in a apache directory (ie wamp/bin/apache/apache2.2.21) and the second one is in the php directory (ie wamp/bin/php/php5.3). If you're enabling modules using options in WAMP's tray icon (PHP extensions or php.ini) you are editing php.ini file in apache directory so it will take effect only on script runed by a browser and not by a command line.

Błażej Klisz
  • 1,730
  • 2
  • 16
  • 16
  • 3
    Are you certain that curl is enabled? What's the curl related output when you do a "php -i" ? – kguest Mar 07 '11 at 08:58
  • 1
    That was a realy good point! I used "php -me" commad and I've found out that curl haven't been enabled, but still it has been working in scripts and was checked on WAMP extensions list. Looks like I've made some nasty mess during PEAR intallation, changing php.ini default location. PEAR and command line, are using php.ini from location "wamp\bin\apache\Apache2.2.11\bin" but scipts are using "wamp\bin\php\php5.3.0" directory(Xdebugs configuration is also in that file and works great)... Your advice was very helpful. Thank you! – Błażej Klisz Mar 07 '11 at 19:39

2 Answers2

2

"cURL" is an extension, not a (PEAR-)package. See Manual for installation instructions.

KingCrunch
  • 128,817
  • 21
  • 151
  • 173
2

Had this very same issue

1) on the cmd line:

php -me

this will show you weather the curl extension is enabled or not. you may check your php.ini and find out that it's enable but only php -me will tell if there is a problem.

2) user pear config-show this will list your pear configuration. make sure that ext_dir is pointing to where your php extensions are located:

pear config-show

3) make sure all your pear settings are correct otherwise use the pear config-set to correct them (e.g ext_dir)

pear config-set ext_dir \your\php\ext

If you are sure about the curl extension being enabled just install XML_RPC2 using the nodeps option

pear install --nodeps XML_PPC2 

Then you should be fine.

rachid_lam
  • 31
  • 2