PEAR-Handbuch | ||
---|---|---|
Zurück | Nach vorne |
This is described here.
answer by Greg Beaver
The package in question does have releases, but none that are stable. There are two solutions.
Set preferred_state to alpha or beta and then install
$ pear config-set preferred_state alpha
$ pear install Packagename
Find out the stability or version number of the latest release and install it directly.
$ pear install Packagename-alpha
$ pear install Packagename-1.5.3
You are using a PEAR version lower than 1.4.0.
To install the package, you have to update PEAR via:
$ pear upgrade PEAR
This will install the latest available version of PEAR which is capable of installing packages that have only a package.xml version 2.0.
If you have an old PEAR version installed (i.e. < 1.3.6), you need to use the following two commands to install the latest available version of PEAR:
$ pear upgrade -a PEAR-1.3.6
$ pear upgrade -a PEAR
Even if not all packages do have end-user documentation in the PEAR manual, nearly all of the packages do include examples. The examples are automatically installed when you install a package via the command line installer and are located in $peardir/docs/$packagename/.
You can find the example/documentation directory by executing $ pear config-get doc_dir on command line.
General questions about the usage of PEAR components should be posted to the mailing list pear-general@lists.php.net.
All technical discussions concerning the development of PEAR components should be posted to pear-dev@lists.php.net.
Question concerning the website can be sent to pear-webmaster@lists.php.net.
Information on subscribing this mailing lists can be found here.
On all mailing lists mentioned above the language is english and the way you ask questions should always be polite :-).
To make PEAR work on Windows, you simple need to add the PEAR installation dir (e.g. c:\php\pear) to the include_path directive in your php.ini.
Note: There are some classes (like Schedule/At.php), that do not work on Windows, because they use *nix specific commands.
Unlike other aspects of PEAR development, the windows build of PHP 4.3.x is not tracked in CVS. Instead, it is located on the machine that builds windows snapshots. Often, this will not be updated when the rest of PEAR is updated. Note that PHP 5.x releases use a different build system and are automatically updated to the latest versions of PEAR.
If you find that PHP 4.3.x has out-of-date versions of packages, or no longer works, then please report that the windows bundle of PEAR is out of date to pear-dev@lists.php.net
You are seeing the warnings because pear.php.net uses a SSL key that is signed by CAcert, whose root certificate is unfortunately not bundled with most browser.
If you are using a Mozilla browser, you can import the certificate on this site by clicking on the link „Root Certificate (PEM Format)“. When asked if you want to trust the new Certificate Authority, you need to check at least the „Trust this CA to identify web sites.“ box and click "Ok".
People using Internet Explorer may find help here.
Mac OS X users must download the above mentioned PEM file. The certificate can then be imported with the „Keychain Access“ utility via „Import“ in the „File“ menu.
To know that the folder has a customized view, Windows sets the "read-only" attribute to the folder. The "read-only" attribute is not actually used to control write access. You can create files in a "read-only" folder. http://support.microsoft.com/default.aspx?scid=kb;en-us;326549
The PEAR Installer detects the read-only attribute and refuses to install into these folders. Unfortunately, there is no way to distinguish between customized folders and actual read-only folders on Windows.
The work-around is to avoid installing PEAR packages into customized Windows folders.
If $ which pear gives you something like /usr/local/bin/pear and $ pear -V shows a very old version or if you don't want to use it for other reasons, you have to install PEAR in your home directory.
Go to http://go-pear.org, save as gopear.php and do $ php gopear.php or try $ lynx -source http://pear.php.net/go-pear | php -q.
Use /home/user/pear as prefix while installing PEAR, where user is your username.
Once the installation is done, edit your PATH variable to include your planned new PEAR directory before the old one.
For example put a export PATH=/home/user/pear/bin:$PATH at the end of your ~/.bashrc or ~/.profile under Linux. $ echo $PATH should give you now /home/user/pear/bin:[...]
$ which pear should result in /home/user/pear/bin/pear and $ pear -V something like "PEAR Version: 1.4.8" (at the time of writing) or newer. Check the latest stable version at http://pear.php.net/package/PEAR under Current Release.
Now all you need is to set your include_path correctly, most likely via
<?php $path = ini_get('include_path'); ini_set('include_path', '/home/user/pear'.PATH_SEPARATOR.$path); ?> |
It is very likely that you have defined two PEAR directories in your include_path, and that you have updated the package in the directory that is defined behind the first directory in your include_path. If you either remove the wrong directory from your include_path or change the order of the directories in your include_path, the error messages should not be shown anymore.
Zurück | Zum Anfang | Nach vorne |
Wunschlisten | Nach oben | Developer FAQ |