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

Error on install with apache2 support #18

Closed tyx closed 11 years ago

tyx commented 11 years ago

Hi !

I met an issue when trying to install php with this following command :

phpswitch php:install 5.3.26 --default --apxs2=/usr/sbin/apxs 

Installing PHP 5.3.26
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 --with-apxs2=/usr/sbin/apxs]

Backuping current Apache2 module
    From: /usr/libexec/apache2/libphp5.so
    To: /usr/libexec/apache2/libphp5.so.backup

Extracting 5.3.26
    /Users/Tim/phpswitch/.phpswitch/downloads/php-5.3.26.tar.bz2
[----------------->--------------------------------]

Building php53-5.3.26
    /Users/Tim/phpswitch/.phpswitch/sources/php53-5.3.26
    /Users/Tim/phpswitch/.phpswitch/installed/php53-5.3.26
[------------>-------------------------------------]

Restoring previous Apache2 module
    From: /usr/libexec/apache2/libphp5.so.backup
    To: /usr/libexec/apache2/libphp5.so

  [InvalidArgumentException]
  Identifier "app.workspace.sources.path" is not defined.

I am available to test anything to help to fix it !

Thanks

jubianchi commented 11 years ago

This should be fixed now:

$ bin/phpswitch php:install 5.5.0 --default --apxs2=$(which apxs)
Installing PHP 5.5.0
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 --with-apxs2=/usr/sbin/apxs]

Backuping current Apache2 module
    From: /usr/libexec/apache2/libphp5.so
    To: /usr/libexec/apache2/libphp5.so.backup

Downloading PHP 5.5.0
    http://php.net/get/php-5.5.0.tar.bz2/from/fr2.php.net/mirror
[==================================================] 100%

Extracting 5.5.0
    /Users/jubianchi/repositories/jubianchi/phpswitch/.phpswitch/downloads/php-5.5.0.tar.bz2
[----------------->--------------------------------]

Building php-5.5.0
    /Users/jubianchi/repositories/jubianchi/phpswitch/.phpswitch/sources/php-5.5.0
    /Users/jubianchi/repositories/jubianchi/phpswitch/.phpswitch/installed/php-5.5.0
[--------->----------------------------------------]

Restoring previous Apache2 module
    From: /usr/libexec/apache2/libphp5.so.backup
    To: /usr/libexec/apache2/libphp5.so

Installing Apache2 module
    From: /Users/jubianchi/repositories/jubianchi/phpswitch/.phpswitch/sources/php-5.5.0/libs/libphp5.so
    To: /usr/libexec/apache2/libphp5-php-5.5.0.so

PHP version php-5.5.0 was installed:
    /Users/jubianchi/repositories/jubianchi/phpswitch/.phpswitch/installed/php-5.5.0

Use php switch php-5.5.0 to enable it

BTW, apache2 module switching feature is a bit experimental and you may find some bug in it. Please fill in issues so we can make it better ;)

thanks!