Friday, February 09, 2007

Problems when installing pear

I got the following error when I first tried to install PEAR components:
Cannot find module (IP-MIB): At line 0 in (none)
Cannot find module (IF-MIB): At line 0 in (none)
Cannot find module (TCP-MIB): At line 0 in (none)
Cannot find module (UDP-MIB): At line 0 in (none)

.......
I googled this error, every expert says there's a configuration error. Yes, there must be a configuration issue. That is so obvious! But, WHERE? Where does this fucking configuration issue reside?
I checked the php.ini file, but I didn't get many clues at first. After a while, I recalled that the php.ini file is created by renaming the default "php.ini-dist" file. There are some unnecessary entries in the end of the file which led to the above error. After deleting all of them, everything works fine.
However, another problem appeared, which was like:
PHP Warning: Cannot use a scalar value as an array in phar://go-pear.phar/PEAR/Command.php on line 268
......
This was also a strange error. But still, not much information in the documentation related to this! The solution was:
(1) go to the site: http://go-pear.org/ , read the instructions;
(2) you'll find the following command for windows:
C:\php5>php -r "readfile('http://pear.php.net/go-pear');">go-pear
C:\php5>php go-pear

The it's all solved! It took me almost one hour due to lack of documentation.

No comments: