jubianchi / phpswitch

A CLI utility to help you build and test PHP versions
http://jubianchi.github.io/phpswitch/
MIT License
90 stars 8 forks source link

New installation download error for global installation #17

Closed mikaelrandy closed 11 years ago

mikaelrandy commented 11 years ago

I have installed phpswitch globaly (with --global) option, so in /usr/share, with sudo mode

When i want to install a new PHP version, if i omit sudo mode, there is no control.

Installing PHP 5.4.13
From mirror fr2.php.net
Configure options: [--enable-libxml --disable-all --enable-ctype --enable-dom --enable-json --enable-phar --enable-simplexml --enable-xml --enable-tokenizer --with-xsl]

Downloading PHP 5.4.13
    http://php.net/get/php-5.4.13.tar.bz2/from/fr2.php.net/mirror
PHP Warning:  fopen(/usr/share/phpswitch/.phpswitch/downloads/php-5.4.13.tar.bz2): failed to open stream: Permission denied in /usr/share/phpswitch/src/jubianchi/PhpSwitch/PHP/Downloader.php on line 53
PHP Warning:  curl_setopt(): supplied argument is not a valid File-Handle resource in /usr/share/phpswitch/src/jubianchi/PhpSwitch/PHP/Downloader.php on line 56

And archive is downloaded in STDOUT

I think phpswitch should check write permission before start downloading, and display error message