How to install and use PEAR
Joining time: 16 Oct 2003 22:29 Views: 830pear as a standardized and powerful foreign affair in PHP, has always been concerned, but it has not received it in practical fields. The reason, there is incomplete document, the learning materials are not sufficient, the code system is more complicated, and there is a difficult force to support the developer. But in the morning and evening, this arms will be given enough attention. If you can start learning now, you may take a certain ace. There is a support issue in PEAR use. Many servors may use Disable Pear when compiling, so PEAR is not supported. Because its installation requires permissions to modify php.ini, users who do not support, users may feel unable to force. There is also a situation, that is, the host server provides PEAR, and you can also see the PEAR in PHPINFO, but because the host is running in security mode, this because the owner of PEAR is not you, you still can't use . Here is a method that you can install PEAR in your shared host. According to the requirements of the PEAR document, your PHP can be used in 4.04 or more, but some modules need 4.05 or more, in fact, means that minimum requirements are also 4.05. Of course, this is not a problem, because if your host is still at 4.06, you should consider the chassis. Pear itself is a problem that chooses poetry needs to be considered. You may notice that all PHP released root files contain pear, but the PEAR in the latest PRE version is not complete. So my suggestion is to download 4.23 release packs, decompress all upload all the contents of the PEAR directory to your home directory, and the directory name is held for PEAR. If you have enough patience, you can download the latest 4.30pre2 version, then use the DIFF tool to compare (I refer to Windows users.), Will replace the old file directly with new changes. If you are not annoying, you can download the latest version of each file in the PEAR directory in http://cvs.php.net. Use PEAR: Add INI_SET ("Include_Path", "/ ABSOLUTE / PATH / TO / PEAR" in your program; so you will change the include_path directly to your PEAR directory. The above setting has a disadvantage, that is, if you have any other containing directories, it will be canceled. So you need to consider other existing include paths. Some people in the user comment in the PHP manual are recommended: INI_SET ("include_path", INI_GET ("clude_path"). ": / Path / to / pear"); this way. I can't be confident, so I maybe it. But at least my server is not supported, there will be a problem. I can only use: $ oldpath = INI_GET ("include_path"); INI_SET ("include_path", "/ path / to / pear:". $ Oldpath); Take a closer look at the gap between the two, that is, the PEAR path is placed Start or the final problem. (The colon is the separator number of the path). I think you can test two situations and see that.