
|
|
|||
Chapter 6. FAQ - Frequently Asked Questions
User FAQWhat is PEAR?This is described here. How do I install a package when I get the error message "No release with state equal to: 'stable' found for 'Packagename'"?answer by Greg Beaver The package in question does have releases, but none that are stable. There are two solutions.
Why do I get "No handlers for package.xml version 2.0" when I try to install a package?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 There is no end-user documentation for this package! How am I supposed to know how it works?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. I have a question about PEAR. Where should I ask?
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 :-). Does PEAR work on windows?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. go-pear.php or bundled packages in the windows build of PHP 4.3.x is out of date!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 Why does my browser show strange warnings when logging in to the website?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. Installing into customized windows folders failsTo 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. I've got an old installation of PEAR and don't have the permissions to install a new version - what now?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
I have updated package X to get rid of errors like "undefined function Y", but PHP still shows the error message(s). What's wrong?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. The downloaded go-pear.php isn't parsed by PHP! Why?If you have followed the instructions for getting go-pear.php and you are using e.g. Windows and the Internet Explorer, you might get the strange effect that -- although you have named the file go-pear.php -- the file isn't parsed and the PHP source code of it is shown. The problem is that e.g. the Internet Explorer saves the file as a HTML file with some HTML code around the PHP source code to display the code nicely. To avoid this problem, you should use the source code view of your browser, e.g. by clicking with the right mouse key and selecting "Show source code" from the context menu. If you save now the file that is shown in your editor as go-pear.php, PHP will be able to parse the file properly. Please note that the Windows versions of PHP have a file named go-pear.bat bundled. It is recommended to use this batch file on Windows instead of using go-pear.php. |
||||
| About the NetVisits, Inc Network | Advertise Developer Tutorials hosted by HostGator. Copyright ©2007 NetVisits, Inc Network. All Rights Reserved. Privacy Policy. |