Found a good article on it : http://phphints.wordpress.com/2011/06/29/pear-on-xampp/
Pear On XAMPP
These are the steps I following to get the pear command line utility pear.bat working under xampp for windows.
1. I downloaded the 7z–zipped version of xampp for windows and unzipped it to c:\xampp.
2. I installed the cygwin linux command line utilties for windows.
3. I ran the cygwin “as Administrator” (right click the Cygwin desktop icon and select “run as administrator”).
4. I changed the permissions of the c:\xampp directory to 777
1
2
| # cd /cygdrive/c # chmod -R 777 xampp |
5. Set the PEAR configuration settings for data_dir, test_dir and doc_dir. For example,
1
2
3
| # cd /cygdrive/c/xampp/php # mkdir pear/data # ./pear.bat config-set data_dir c:\\xampp\\php\\pear\\data |
Do this for data_dir, test_dir, doc_dir, and cfg_dir as necessary. You will need to create the respective directories first (as shown above for data_dir). Note the use of double slashes! Also note: You may need to do the chmod -R 777 again after the config-sets, to make the subdirectories read/write-able.
To see the current PEAR configuration do
1
2
| # cd /cygdrive/c/xampp/php # ./pear.bat config-show |
after running Cygwin as Administrator.
6. Now install the packages you want. For example, this is how you would install Doctrine 2 ORM. Again, I am doing this from the Cygwin shell.
1
2
3
| # cd /cygdrive/c/xampp/php # ./pear.bat channel-discover pear.doctrine-project.org # ./pear.bat install pear.doctrine-project.org/DoctrineORM |
If you want to update current packages:
1
2
3
| # cd /cygdrive/c/xampp/php # ./pear.bat update-channels # ./pear.bat upgrade-all |
Sem comentários:
Enviar um comentário