Cannot Install PEAR folder inside PHP version 5.3 - php

I have an IIS7 server installed as Remote where I have installed php, everything is working fine but inside my php folder PEAR folder is not present, because of that I cannot receive a mail through smtp, Also after doing lot of googling which said to install pear i require gp-pear.php file which is not available inside my php folder, now how can I install Pear in my IIS7 server?

Follow the installation instructions as they are listed in the PEAR manual:
http://pear.php.net/manual/en/installation.getting.php

Related

Where do PEAR packages normally get installed?

I am using a Debian squeeze server. I have installed PEAR using aptitude install php-pear. This created a directory /usr/share/php/PEAR.
I installed some PEAR packages including Phing. I installed the Phing files using pear install --alldeps phing/phing and the files showed up in /usr/share/php/phing.
But shouldn't PEAR packages (under normal circumstances) be put in /usr/share/php/PEAR? When I run
pear config-get php_dir
I get "/usr/share/php". Have I got something configured wrong?
/usr/share/php/
is correct for Debian.
/usr/share/php/PEAR
itself contains classes for PEAR itself.
The reason for using /usr/share/php is that the pear CLI tool is an installer that installs libraries (or applications) for PHP - choosing php is thus correct.
Yes, that is the correct directory on Debian, and Ubuntu.
Regardless of which O/S you are using, you can find the correct install directory by running: pear config-get php_dir via a console. And you get full directory path.
For example, with XAMPP application on Microsoft Window you have to go to XAMPP installation directory path <<XAMPP Installation folder path>>/bin and use ./pear config-get php_dir which lead to execute the binary file using current location and do the same job.
in case php is installed in /usr/local/php
pear is here:
/usr/local/php/lib/php
I am using Mac OSX Lion.
I installed pear in /usr/lib/php/pear
So the data also be installed there.
On my installation of Debian PEAR is located here:
/usr/local/lib/php
Just throwing this out there, in case you have pear installed in a round-about way:
cd /
find . -type d -name pear
For example, I was using MAMP on one of my local machines and it was in a really weird place.
On my 64-bit Ubuntu system, the pear packages are installed to /usr/share/php/PEAR/,
but I do not know how to change the pear install path. Maybe you can configure this somewhere.
If you're using CPanel to install them they're much likely to be located in
./opt/cpanel/ea-php{VERSION}/root/usr/share/pear

Error during installing XML_RPC2

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.
"cURL" is an extension, not a (PEAR-)package. See Manual for installation instructions.
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.

Install PEAR on project local?

How to install pear on project local?
Only install system global (and copy manually to project local) ?
The Answers #greg0ire provided (+1) should work out.
If you are using PHP 5.3 you can also look into "the next version of the pear installer" pyrus.
It can make it easier mainting different configurations
See this page of the manual : Installation of a local PEAR copy on a shared host

PEAR installation without go-pear.bat on windows

I have installed PHP 5.3.3 on my machine without pear.
But now i want to install on my machine without removing the existing configuration.
In there any way to manually update PEAR without go-pear.bat on windows ?
THANK YOU ALL
copy pear lib in your system from old installation
you use PHP ? or wamp or xampp ?

Installing PEAR on PHP 5?

I want to install PEAR on PHP 5, so I can use Spreadsheet_Excel_Writer.
I don`t know how to install it on my ISP nor my personal MacBook.
Thoughts for both?
The PEAR Manual has a quite extensive list of instructions on how to install the PEAR manager on Windows, *NIX and Mac OS X. The manual also has a section on installing PEAR remotely, for example using FTP. Following those instructions, you should be able to install PEAR (nearly) anywhere. :)
From the command line, do this:
pear install Spreadsheet_Excel_Writer
You can also download the package directly here without using PEAR: http://download.pear.php.net/package/Spreadsheet_Excel_Writer-0.9.1.tgz. It's pretty easy to use if you have the script located anywhere within your include path.
For your personal computer, using the "pear" script that ships with most PHP distributions is a good idea.
For shared hosting, you can
Track your dependencies manually, and copy all the appropriate files to the server yourself
With pear installed, do "pear install -R/my/root_dir -a Spreadsheet_Excel_Writer". This will install the package and all dependencies to the specified root directory. Copy this installation to your webhost.
You should also have a look at "pear help" and "pear help install".
You can't install pear to your isp's core. But you can install the individual files from pear's site and upload them to your host:
http://pear.php.net/package/Spreadsheet_Excel_Writer/download

Categories