Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
886 views
in Technique[技术] by (71.8m points)

php - Installing PEAR and PHPUnit with xampp

I am trying to get PHPUnit up and running the following are the steps I am currently following:

### Install new PEAR Version needed for PHPUnit 3.X
### Download:  http://pear.php.net/go-pear.phar Save it under C:xamppphp

Open a command prompt and go to C:xamppphp
Type "php go-pear.phar" (Installs new PEAR)
Type "pear update-channels" (updates channel definitions)
Type "pear upgrade --alldeps" (upgrades all existing packages and pear)
Type "pear channel-discover components.ez.no" (this is needed for PHPUnit)
Type "pear channel-discover pear.symfony-project.com" (also needed by PHPUnit)
Type "pear channel-discover pear.phpunit.de" (This IS phpunit)
Type "pear install --alldeps phpunit/PHPUnit" (installs PHPUnit and all dependencies)

This works up untill the point where I have to pear upgrade --alldeps after downloading all the bits it needs i get:#

ERROR: failed to mkdir C:phppeardataAuthAuthFrontend
ERROR: failed to mkdir C:phppeardocsBenchmarkdoc
ERROR: failed to mkdir C:phppeardataCacheContainer
ERROR: failed to mkdir C:phppeardocsCache_Litedocs
ERROR: failed to mkdir C:phppeardocsCalendardocsexamples
ERROR: failed to mkdir C:phppeardocsConfigdocs
.....

My PHP directory is installed under C:xamppphp

What do I need to change so that it knows the correct place to add these directories/ files?

Thanks

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

To install in D:xamppphp, set the following directory paths using pear config-set command

D:
cd D:xamppphp
pear config-set doc_dir d:xamppphppeardocs
pear config-set cfg_dir d:xamppphppearcfg
pear config-set data_dir d:xamppphppeardata
pear config-set cache_dir d:xamppphppearcache
pear config-set download_dir d:xamppphppeardownload
pear config-set temp_dir d:xamppphppearemp
pear config-set test_dir d:xamppphppearests
pear config-set www_dir d:xamppphppearwww

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...