Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

phpbrew install and use not using the version installed nor listing the version #315

Closed
harikt opened this issue Oct 1, 2014 · 55 comments
Closed
Labels

Comments

@harikt
Copy link

harikt commented Oct 1, 2014

Congratulations! Now you have PHP with php-5.3.29.
To use the newly built PHP, try the line(s) below:

    $ phpbrew use php-5.3.29

Or you can use switch command to switch your default php version to php-5.3.29:

    $ phpbrew switch php-5.3.29

Enjoy!
 /var/www/ProcessWire  ± master ●✚  phpbrew list          
Installed versions:
* (system)
 /var/www/ProcessWire  ± master ●✚  
 /var/www/ProcessWire  ± master ●✚  ls ~/.phpbrew 
bashrc  bin  build  init  php  tmp  variants
 /var/www/ProcessWire  ± master ●✚  ls ~/.phpbrew/bin 
 /var/www/ProcessWire  ± master ●✚  ls ~/.phpbrew/build 
php-5.3.22.tar.bz2  php-5.3.29  php-5.3.29.tar.bz2  php-5.4.33  php-5.4.33.tar.bz2
 /var/www/ProcessWire  ± master ●✚  phpbrew use php-5.3.29
 /var/www/ProcessWire  ± master ●✚  
 /var/www/ProcessWire  ± master ●✚  php -v
PHP 5.5.9-1ubuntu4.4 (cli) (built: Sep  4 2014 06:56:34) 
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
    with Zend OPcache v7.0.3, Copyright (c) 1999-2014, by Zend Technologies
@harikt
Copy link
Author

harikt commented Oct 1, 2014

Ubuntu 14.04 .

Apache 2.4 .

@marcioAlmada
Copy link
Member

What happens when you run source ~/.phpbrew/bashrc && phpbrew list ?

@harikt
Copy link
Author

harikt commented Oct 3, 2014

hari@hari-Vostro-270s:~$ ~/.phpbrew/bashrc
hari@hari-Vostro-270s:~$ phpbrew list
Installed versions:
* (system)
hari@hari-Vostro-270s:~$

@marcioAlmada
Copy link
Member

Strange. Have you installed with sudo?

@harikt
Copy link
Author

harikt commented Oct 3, 2014

no sudo installations for php.

@marcioAlmada
Copy link
Member

Well, most of the time this issue was reported it was caused by some mistake during installation OR when people failed to source ~/.phpbrew/bashrc automatically for each terminal session.

Are you overwriting your $PATH somewhere?

@harikt
Copy link
Author

harikt commented Oct 3, 2014

Are you overwriting your $PATH somewhere?

Not sure. The shell is zsh. I have added the details in ~/.zshrc and ~/.bashrc .

@c9s
Copy link
Member

c9s commented Oct 3, 2014

Can you echo your $PATH? so we can investigate :)

echo $PATH
which php

@harikt
Copy link
Author

harikt commented Oct 3, 2014

 /var/www/github.com/harikt/Aura.Blog  ± master   echo $PATH
:/home/hari/.phpenv/bin:/home/hari/bin:/home/hari/Builds/elixir/bin:/usr/local/heroku/bin:/home/hari/.rvm/gems/ruby-2.0.0-p247/bin:/home/hari/.rvm/gems/ruby-2.0.0-p247@global/bin:/home/hari/.rvm/rubies/ruby-2.0.0-p247/bin:/home/hari/.rvm/bin:/usr/local/bin:/usr/local/sbin:/home/hari/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/local/go/bin
 /var/www/github.com/harikt/Aura.Blog  ± master   which php
/usr/bin/php
 /var/www/github.com/harikt/Aura.Blog  ± master   

@c9s
Copy link
Member

c9s commented Oct 3, 2014

my suspicion is that your $PATH is overwritten somewhere else. (after you source phpbrew bashrc)

@c9s
Copy link
Member

c9s commented Oct 3, 2014

This

hari@hari-Vostro-270s:~$ ~/.phpbrew/bashrc

Should be

source ~/.phpbrew/bashrc

Which is different with ~/.phpbrew/bashrc. the one you entered means executing a script in a isolated environment.

@harikt
Copy link
Author

harikt commented Oct 3, 2014

Just to make sure what I have done so far

PHPBREW_SET_PROMPT=1
source /home/hari/.phpbrew/bashrc

is set in ~/.zshrc and ~/.bashrc . Shell is zsh .

As mentioned by @c9s

source ~/.phpbrew/bashrc
 /var/www/github.com/harikt/Aura.Blog  ± master   phpbrew list          
Installed versions:
* (system)

@harikt
Copy link
Author

harikt commented Oct 3, 2014

ls ~/.phpbrew/build 
php-5.3.22.tar.bz2  php-5.3.29  php-5.3.29.tar.bz2  php-5.4.33  php-5.4.33.tar.bz2

@c9s
Copy link
Member

c9s commented Oct 3, 2014

Is there anything in your ~/.phpbrew/php ? that's where we install php.

@harikt
Copy link
Author

harikt commented Oct 3, 2014

Yup

 ~  ls ~/.phpbrew/php
php-5.3.22  php-5.3.29  php-5.4.33

@c9s
Copy link
Member

c9s commented Oct 3, 2014

That's weird, what happened to your ~/.phpbrew/bashrc ? XD

@c9s
Copy link
Member

c9s commented Oct 3, 2014

What if you do which phpbrew? if the function is loaded successfully, it should output the function code.

If not, it should output the location of phar file phpbrew.

@harikt
Copy link
Author

harikt commented Oct 3, 2014

~/.phpbrew/bashrc does exists.

which phpbrew gives me the script. Seems I need to be sudo.

which phpbrew                  
phpbrew () {
    if [[ -e bin/phpbrew ]]
    then
        BIN='bin/phpbrew' 
    else
        BIN='phpbrew' 
    fi
    local exit_status
    local short_option
    export SHELL
    if [[ `echo $1 | awk 'BEGIN{FS=""}{print $1}'` = '-' ]]
    then
        short_option=$1 
        shift
    else
        short_option="" 
    fi
    case $1 in
        (use) if [[ -z "$2" ]]
            then
                if [[ -z "$PHPBREW_PHP" ]]
                then
                    echo "Currently using system php"
                else
                    echo "Currently using $PHPBREW_PHP"
                fi
            else
                if [[ $2 =~ ^php- ]]
                then
                    _PHP_VERSION=$2 
                else
                    s_esc="$(echo "$2" | sed 's/[^-A-Za-z0-9_]/\\&/g')" 
                    _PHP_VERSION=$(ls -v $PHPBREW_ROOT/php | egrep "php-$s_esc.*" | tail -n 1) 
                fi
                NEW_PHPBREW_PHP_PATH="$PHPBREW_ROOT/php/$_PHP_VERSION" 
                if [ -d $NEW_PHPBREW_PHP_PATH ]
                then
                    code=$(command $BIN env $_PHP_VERSION) 
                    if [ -z "$code" ]
                    then
                        exit_status=1 
                    else
                        eval $code
                        __phpbrew_set_path
                    fi
                else
                    echo "php version: $_PHP_VERSION not exists."
                fi
            fi ;;
        (cd-src) local SOURCE_DIR=$PHPBREW_HOME/build/$PHPBREW_PHP
            if [[ -d $SOURCE_DIR ]]
            then
                cd $SOURCE_DIR
            fi ;;
        (switch) if [[ -z "$2" ]]
            then
                echo "Please specify the php version."
            else
                __phpbrew_reinit $2
            fi ;;
        (lookup-prefix) if [[ -z "$2" ]]
            then
                if [[ -n $PHPBREW_LOOKUP_PREFIX ]]
                then
                    echo $PHPBREW_LOOKUP_PREFIX
                fi
            else
                export PHPBREW_LOOKUP_PREFIX=$(__phpbrew_set_lookup_prefix $2)
                echo $PHPBREW_LOOKUP_PREFIX
                __phpbrew_update_config
            fi ;;
        (install-pyrus) echo "Installing pyrus..."
            cd $PHPBREW_BIN && wget --no-check-certificate -c http://pear2.php.net/pyrus.phar -O pyrus && chmod +x pyrus && cd -
            hash -r ;;
        (install-phpunit) echo "Installing phpunit..."
            cd $PHPBREW_BIN && wget --no-check-certificate -c https://phar.phpunit.de/phpunit.phar -O phpunit && chmod +x phpunit && cd -
            hash -r ;;
        (install-composer) echo "Installing composer..."
            cd $PHPBREW_BIN && wget --no-check-certificate -c http://getcomposer.org/composer.phar -O composer && chmod +x composer && cd -
            hash -r ;;
        (install-onion) echo "Installing onion..."
            cd $PHPBREW_BIN
            wget --no-check-certificate -c https://raw.github.com/c9s/Onion/master/onion -O onion
            chmod +x onion
            cd -
            hash -r ;;
        (cd) case $2 in
                (var) local chdir=$PHPBREW_ROOT/php/$PHPBREW_PHP/var ;;
                (etc) local chdir=$PHPBREW_ROOT/php/$PHPBREW_PHP/etc ;;
                (dist) local chdir=$PHPBREW_ROOT/php/$PHPBREW_PHP ;;
                (build) local chdir=$PHPBREW_ROOT/build/$PHPBREW_PHP ;;
                (*) echo "$2 not found"
                    return 0 ;;
            esac
            echo "Switching to $chdir, run 'cd -' to go back."
            cd $chdir
            return 0 ;;
        (clean) local _VERSION=$2
            if [[ -z $_version ]]
            then
                _VERSION=$PHPBREW_PHP 
            fi
            echo "Cleaning up $_VERSION build directory..."
            local build_dir=$PHPBREW_ROOT/build/$_VERSION
            echo "build_dir=$build_dir"
            if [[ -e $build_dir ]]
            then
                cd $build_dir && make clean && cd -
            fi ;;
        (fpm) PHPFPM_BIN=$PHPBREW_ROOT/php/$PHPBREW_PHP/sbin/php-fpm 
            PHPFPM_PIDFILE=$PHPBREW_ROOT/php/$PHPBREW_PHP/var/run/php-fpm.pid 
            mkdir -p $PHPBREW_ROOT/php/$PHPBREW_PHP/var/run
            fpm_start () {
                echo "Starting php-fpm..."
                $PHPFPM_BIN --php-ini $PHPBREW_ROOT/php/$PHPBREW_PHP/etc/php.ini --fpm-config $PHPBREW_ROOT/php/$PHPBREW_PHP/etc/php-fpm.conf --pid $PHPFPM_PIDFILE ${*:3}
                if [[ $? != "0" ]]
                then
                    echo "php-fpm start failed."
                fi
            }
            fpm_stop () {
                if [[ -e $PHPFPM_PIDFILE ]]
                then
                    echo "Stopping php-fpm..."
                    kill $(cat $PHPFPM_PIDFILE)
                    rm -i -f $PHPFPM_PIDFILE
                fi
            }
            case $2 in
                (start) fpm_start ;;
                (stop) fpm_stop ;;
                (restart) fpm_stop
                    fpm_start ;;
                (module) $PHPFPM_BIN --php-ini $PHPBREW_ROOT/php/$PHPBREW_PHP/etc/php.ini --fpm-config $PHPBREW_ROOT/php/$PHPBREW_PHP/etc/php-fpm.conf -m | less ;;
                (info) $PHPFPM_BIN --php-ini $PHPBREW_ROOT/php/$PHPBREW_PHP/etc/php.ini --fpm-config $PHPBREW_ROOT/php/$PHPBREW_PHP/etc/php-fpm.conf -i ;;
                (config) if [[ -n $EDITOR ]]
                    then
                        $EDITOR $PHPBREW_ROOT/php/$PHPBREW_PHP/etc/php-fpm.conf
                    else
                        echo "Please set EDITOR environment variable for your favor."
                        nano $PHPBREW_ROOT/php/$PHPBREW_PHP/etc/php-fpm.conf
                    fi ;;
                (help) $PHPFPM_BIN --php-ini $PHPBREW_ROOT/php/$PHPBREW_PHP/etc/php.ini --fpm-config $PHPBREW_ROOT/php/$PHPBREW_PHP/etc/php-fpm.conf --help ;;
                (test) $PHPFPM_BIN --php-ini $PHPBREW_ROOT/php/$PHPBREW_PHP/etc/php.ini --fpm-config $PHPBREW_ROOT/php/$PHPBREW_PHP/etc/php-fpm.conf --test ;;
                (*) echo "Usage: phpbrew fpm [start|stop|restart|module|test|help|config]" ;;
            esac ;;
        (env) if [[ -n "$2" ]]
            then
                export PHPBREW_PHP=$2
            fi
            echo "export PHPBREW_ROOT=$PHPBREW_ROOT"
            echo "export PHPBREW_HOME=$PHPBREW_HOME"
            if [[ -n $PHPBREW_LOOKUP_PREFIX ]]
            then
                echo "export PHPBREW_LOOKUP_PREFIX=$PHPBREW_LOOKUP_PREFIX"
            fi
            if [[ -n $PHPBREW_PHP ]]
            then
                echo "export PHPBREW_PHP=$PHPBREW_PHP"
                echo "export PHPBREW_PATH=$PHPBREW_ROOT/php/$PHPBREW_PHP/bin"
            fi ;;
        (off) unset PHPBREW_PHP
            unset PHPBREW_PATH
            eval `$BIN env`
            __phpbrew_set_path
            echo "phpbrew is turned off." ;;
        (switch-off) unset PHPBREW_PHP
            unset PHPBREW_PATH
            eval `$BIN env`
            __phpbrew_set_path
            __phpbrew_reinit
            echo "phpbrew is switched off." ;;
        (remove) if [[ -z "$2" ]]
            then
                command $BIN help
            else
                __phpbrew_remove_purge $2
            fi ;;
        (rehash) echo "Rehashing..."
            . ~/.phpbrew/bashrc ;;
        (purge) if [[ -z "$2" ]]
            then
                command $BIN help
            else
                __phpbrew_remove_purge $2 purge
            fi ;;
        (*) command $BIN $short_option "$@"
            exit_status=$?  ;;
    esac
    hash -r
    return ${exit_status:-0}
}

@c9s
Copy link
Member

c9s commented Oct 4, 2014

echo $PHPBREW_ROOT
echo $PHPBREW_HOME

you may see what's the path phpbrew is using.

cc @marcioAlmada I think we need to provide a debug instruction guide to wiki to solve problems more efficiently.

@c9s
Copy link
Member

c9s commented Oct 4, 2014

Hi @harikt,

for my, my result:

$ echo $PHPBREW_ROOT
/Users/c9s/.phpbrew
$ echo $PHPBREW_HOME
/Users/c9s/.phpbrew

@harikt
Copy link
Author

harikt commented Oct 4, 2014

 echo $PHPBREW_ROOT
/home/hari/.phpbrew
 /var/www/github.com/harikt/rtdocs  echo $PHPBREW_HOME
/home/hari/.phpbrew

@c9s
Copy link
Member

c9s commented Oct 4, 2014

Hi @harikt ,

That's really really weird, if you run phpbrew list, do you still get the same result?

What if you run phpbrew self-update to update your phpbrew?

Pedro

@c9s
Copy link
Member

c9s commented Oct 4, 2014

My suspicion: https://github.com/phpbrew/phpbrew/blob/develop/src/PhpBrew/Config.php#L101

I guess you don't have bin/php, can you try the commands below? thanks!

ls -la ~/.phpbrew/php/php-5.3.29/bin
ls -la ~/.phpbrew/php/php-5.3.33/bin

@c9s
Copy link
Member

c9s commented Oct 4, 2014

If you have something like php.dSYM, you may rename php.dSYM to php. that should fix this problem.

@harikt
Copy link
Author

harikt commented Oct 4, 2014

@c9s your assumption about bin directory is correct.

phpbrew list
Installed versions:
* (system)
 /var/www/github.com/harikt/rtdocs  phpbrew self-update
Updating phpbrew /usr/bin/phpbrew from master...
Version updated.
Phpbrew environment is initialized, required directories are created under

    /home/hari/.phpbrew

Paste the following line(s) to the end of your ~/.bashrc and start a
new shell, phpbrew should be up and fully functional from there:

    source /home/hari/.phpbrew/bashrc

To enable PHP version info in your shell prompt, please set PHPBREW_SET_PROMPT=1
in your `~/.bashrc` before you source `~/.phpbrew/bashrc`

    export PHPBREW_SET_PROMPT=1

For further instructions, simply run `phpbrew` to see the help message.

Enjoy phpbrew at $HOME!!
phpbrew - 1.14.2
cliframework core: 1.5.12
 /var/www/github.com/harikt/rtdocs  ls -la ~/.phpbrew/php/php-5.3.29/bin
ls: cannot access /home/hari/.phpbrew/php/php-5.3.29/bin: No such file or directory
 ✘  /var/www/github.com/harikt/rtdocs  ls -la ~/.phpbrew/php/php-5.3.22 
total 8
drwxr-xr-x 2 hari hari 4096 Oct  1 11:06 .
drwxr-xr-x 5 hari hari 4096 Oct  1 11:25 ..

@harikt
Copy link
Author

harikt commented Oct 4, 2014

ls -la ~/.phpbrew/php/php-5.3.29 
total 12
drwxr-xr-x 2 hari hari 4096 Oct  1 11:14 .
drwxr-xr-x 5 hari hari 4096 Oct  1 11:25 ..
-rw-rw-r-- 1 hari hari   94 Oct  1 12:21 phpbrew.variants

@c9s
Copy link
Member

c9s commented Oct 4, 2014

So your PHP 5.3 didn't install successfully. I just tried php 5.3.29, it does not work for me either.

@c9s
Copy link
Member

c9s commented Oct 4, 2014

I guess we need some patch for PHP 5.3 on Mac OS X.. :(

@harikt
Copy link
Author

harikt commented Oct 4, 2014

@c9s I am from Ubuntu 👍 .

@c9s
Copy link
Member

c9s commented Oct 4, 2014

did 5.4 work for you?

@harikt
Copy link
Author

harikt commented Oct 4, 2014

nope.

@c9s
Copy link
Member

c9s commented Oct 4, 2014

OK, can you gist the build log ? e.g. /Users/c9s/.phpbrew/build/php-5.3.29/build.log

@harikt
Copy link
Author

harikt commented Oct 4, 2014

Interesting no logs.

@c9s
Copy link
Member

c9s commented Oct 4, 2014

@marcioAlmada do you have any idea about this? didn't know if something break the installation.

@c9s
Copy link
Member

c9s commented Oct 4, 2014

I guess it's caused by 933d09e, we redirect all the messages to the log file, and we don't know what causes the build failing.

@c9s
Copy link
Member

c9s commented Oct 4, 2014

OK, I just got an Ubuntu and just ran the build. here is my result:

anner.lo Zend/zend_alloc.lo Zend/zend_compile.lo Zend/zend_constants.lo Zend/zend_dynamic_array.lo Zend/zend_execute_API.lo Zend/zend_highlight.lo Zend/zend_llist.lo Zend/zend_opcode.lo Zend/zend_operators.lo Zend/zend_ptr_stack.lo Zend/zend_stack.lo Zend/zend_variables.lo Zend/zend.lo Zend/zend_API.lo Zend/zend_extensions.lo Zend/zend_hash.lo Zend/zend_list.lo Zend/zend_indent.lo Zend/zend_builtin_functions.lo Zend/zend_sprintf.lo Zend/zend_ini.lo Zend/zend_qsort.lo Zend/zend_multibyte.lo Zend/zend_ts_hash.lo Zend/zend_stream.lo Zend/zend_iterators.lo Zend/zend_interfaces.lo Zend/zend_exceptions.lo Zend/zend_strtod.lo Zend/zend_gc.lo Zend/zend_closures.lo Zend/zend_float.lo Zend/zend_objects.lo Zend/zend_object_handlers.lo Zend/zend_objects_API.lo Zend/zend_default_classes.lo Zend/zend_execute.lo sapi/cgi/cgi_main.lo sapi/cgi/fastcgi.lo main/internal_functions.lo -lcrypt -lz -lexslt -lresolv -lcrypt -ledit -ltermcap -lmcrypt -lltdl -lcurl -lbz2 -lz -lpcre -lrt -lm -ldl -lnsl -lxml2 -lcurl -lxml2 -lxml2 -lcrypt -lxml2 -lxml2 -lxml2 -lxslt -lxml2 -lcrypt -lstdc++  -o sapi/cgi/php-cgi
libtool: unrecognized option `-export-dynamic'
Try `libtool --help' for more information.
make: *** [sapi/cgi/php-cgi] Error 1
---> Creating php-fpm.conf
---> Copying php.ini-development
PHP Warning:  copy(/home/c9s/.phpbrew/php/php-5.3.29/etc/php.ini): failed to open stream: No such file or directory in phar:///usr/bin/phpbrew/PhpBrew/Command/InstallCommand.php on line 2
PHP Warning:  file_get_contents(/home/c9s/.phpbrew/php/php-5.3.29/etc/php.ini): failed to open stream: No such file or directory in phar:///usr/bin/phpbrew/PhpBrew/Command/InstallCommand.php on line 2
---> Found date.timezone, patch config timezone with Asia/Taipei
---> Disable phar.readonly option.
PHP Warning:  file_put_contents(/home/c9s/.phpbrew/php/php-5.3.29/etc/php.ini): failed to open stream: No such file or directory in phar:///usr/bin/phpbrew/PhpBrew/Command/InstallCommand.php on line 2
Initializing pear config...
config-set succeeded
config-set succeeded
config-set succeeded
Enabling pear auto-discover...
config-set succeeded
Source directory: /home/c9s/.phpbrew/build/php-5.3.29
Congratulations! Now you have PHP with php-5.3.29.
To use the newly built PHP, try the line(s) below:

    $ phpbrew use php-5.3.29

Or you can use switch command to switch your default php version to php-5.3.29:

    $ phpbrew switch php-5.3.29

Enjoy!

You can see there is a libtool error:

libtool: unrecognized option `-export-dynamic'
Try `libtool --help' for more information.
make: *** [sapi/cgi/php-cgi] Error 1

@c9s
Copy link
Member

c9s commented Oct 4, 2014

Looks like related to #83, and related to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47390 I guess

@c9s
Copy link
Member

c9s commented Oct 4, 2014

@harikt , phpbrew -d install 5.4 +default works for me on Ubuntu

@c9s
Copy link
Member

c9s commented Oct 4, 2014

@harikt looks like +intl is a requirement for 5.3 to build:

try: phpbrew -d 5.3 +default+intl

the command above works for me.

@harikt
Copy link
Author

harikt commented Oct 4, 2014

phpbrew -d 5.3 +default+intl
Command 5.3 not found.
phpbrew list 

Works now for 5.4 👍 after installation.

@c9s
Copy link
Member

c9s commented Oct 4, 2014

Oh, I missed a "install" command, sorry, it should be:

phpbrew -d install 5.3 +default+intl

@mattcdavis1
Copy link

installing 5.3.29 is failing for me also (On Mac 10.9.5). Here is the output from install (i'm using a yaml config but i also tried with just +default+intl only - both include intl):

matthews-mbp:~ matthewdavis$ CFLAGS="-I/Users/matthewdavis/.phpbrew/build/php-5.3.29" phpbrew -d install 5.3.29 +dev
===> Downloading from http://www.php.net/get/php-5.3.29.tar.bz2/from/this/mirror
######################################################################## 100.0%
===> php-5.3.29.tar.bz2 downloaded.
===> Extracting php-5.3.29.tar.bz2...
Writing variant info to /Users/matthewdavis/.phpbrew/php/php-5.3.29/phpbrew.variants
Build Directory: /Users/matthewdavis/.phpbrew/build/php-5.3.29
Enabled variants: xml, apxs2, bcmath, bz2, calendar, cli, ctype, curl, dba, fileinfo, filter, ftp, gd, gettext, intl, json, mbregex, mbstring, mcrypt, mhash, mysql, openssl, pdo, readline, soap, sqlite, tidy, zip
Disabled variants: 
Found apxs2 sbin: 1
PHP Warning:  stream_get_contents(): 159 is not a valid stream resource in phar:///usr/bin/phpbrew/PhpBrew/Utils.php on line 2
PHP Stack trace:
PHP   1. {main}() /usr/bin/phpbrew:0
PHP   2. require() /usr/bin/phpbrew:6
PHP   3. CLIFramework\Application->runWithTry() phar:///usr/bin/phpbrew/scripts/phpbrew-emb.php:2
PHP   4. CLIFramework\Application->run() phar:///usr/bin/phpbrew/CLIFramework/Application.php:2
PHP   5. CLIFramework\CommandBase->executeWrapper() phar:///usr/bin/phpbrew/CLIFramework/Application.php:2
PHP   6. call_user_func_array:{phar:///usr/bin/phpbrew/CLIFramework/CommandBase.php:2}() phar:///usr/bin/phpbrew/CLIFramework/CommandBase.php:2
PHP   7. PhpBrew\Command\InstallCommand->execute() phar:///usr/bin/phpbrew/CLIFramework/CommandBase.php:2
PHP   8. PhpBrew\Tasks\ConfigureTask->configure() phar:///usr/bin/phpbrew/PhpBrew/Command/InstallCommand.php:2
PHP   9. PhpBrew\Tasks\Apxs2CheckTask->check() phar:///usr/bin/phpbrew/PhpBrew/Tasks/ConfigureTask.php:2
PHP  10. PhpBrew\Utils::pipeExecute() phar:///usr/bin/phpbrew/PhpBrew/Tasks/Apxs2CheckTask.php:2
PHP  11. stream_get_contents() phar:///usr/bin/phpbrew/PhpBrew/Utils.php:2

Warning: stream_get_contents(): 159 is not a valid stream resource in phar:///usr/bin/phpbrew/PhpBrew/Utils.php on line 2

Call Stack:
    0.0003     228168   1. {main}() /usr/bin/phpbrew:0
    0.0117     393112   2. require('phar:///usr/bin/phpbrew/scripts/phpbrew-emb.php') /usr/bin/phpbrew:6
    0.0142     665264   3. CLIFramework\Application->runWithTry() phar:///usr/bin/phpbrew/scripts/phpbrew-emb.php:2
    0.0142     665368   4. CLIFramework\Application->run() phar:///usr/bin/phpbrew/CLIFramework/Application.php:2
    0.0268    1915480   5. CLIFramework\CommandBase->executeWrapper() phar:///usr/bin/phpbrew/CLIFramework/Application.php:2
    0.0268    1916728   6. call_user_func_array:{phar:///usr/bin/phpbrew/CLIFramework/CommandBase.php:2}() phar:///usr/bin/phpbrew/CLIFramework/CommandBase.php:2
    0.0269    1917152   7. PhpBrew\Command\InstallCommand->execute() phar:///usr/bin/phpbrew/CLIFramework/CommandBase.php:2
   14.5510    2214808   8. PhpBrew\Tasks\ConfigureTask->configure() phar:///usr/bin/phpbrew/PhpBrew/Command/InstallCommand.php:2
   14.5771    2836304   9. PhpBrew\Tasks\Apxs2CheckTask->check() phar:///usr/bin/phpbrew/PhpBrew/Tasks/ConfigureTask.php:2
   14.5771    2836624  10. PhpBrew\Utils::pipeExecute() phar:///usr/bin/phpbrew/PhpBrew/Tasks/Apxs2CheckTask.php:2
   14.5795    2837328  11. stream_get_contents() phar:///usr/bin/phpbrew/PhpBrew/Utils.php:2

PHP Warning:  stream_get_contents(): 163 is not a valid stream resource in phar:///usr/bin/phpbrew/PhpBrew/Utils.php on line 2
PHP Stack trace:
PHP   1. {main}() /usr/bin/phpbrew:0
PHP   2. require() /usr/bin/phpbrew:6
PHP   3. CLIFramework\Application->runWithTry() phar:///usr/bin/phpbrew/scripts/phpbrew-emb.php:2
PHP   4. CLIFramework\Application->run() phar:///usr/bin/phpbrew/CLIFramework/Application.php:2
PHP   5. CLIFramework\CommandBase->executeWrapper() phar:///usr/bin/phpbrew/CLIFramework/Application.php:2
PHP   6. call_user_func_array:{phar:///usr/bin/phpbrew/CLIFramework/CommandBase.php:2}() phar:///usr/bin/phpbrew/CLIFramework/CommandBase.php:2
PHP   7. PhpBrew\Command\InstallCommand->execute() phar:///usr/bin/phpbrew/CLIFramework/CommandBase.php:2
PHP   8. PhpBrew\Tasks\ConfigureTask->configure() phar:///usr/bin/phpbrew/PhpBrew/Command/InstallCommand.php:2
PHP   9. PhpBrew\Tasks\Apxs2CheckTask->check() phar:///usr/bin/phpbrew/PhpBrew/Tasks/ConfigureTask.php:2
PHP  10. PhpBrew\Utils::pipeExecute() phar:///usr/bin/phpbrew/PhpBrew/Tasks/Apxs2CheckTask.php:2
PHP  11. stream_get_contents() phar:///usr/bin/phpbrew/PhpBrew/Utils.php:2

Warning: stream_get_contents(): 163 is not a valid stream resource in phar:///usr/bin/phpbrew/PhpBrew/Utils.php on line 2

Call Stack:
    0.0003     228168   1. {main}() /usr/bin/phpbrew:0
    0.0117     393112   2. require('phar:///usr/bin/phpbrew/scripts/phpbrew-emb.php') /usr/bin/phpbrew:6
    0.0142     665264   3. CLIFramework\Application->runWithTry() phar:///usr/bin/phpbrew/scripts/phpbrew-emb.php:2
    0.0142     665368   4. CLIFramework\Application->run() phar:///usr/bin/phpbrew/CLIFramework/Application.php:2
    0.0268    1915480   5. CLIFramework\CommandBase->executeWrapper() phar:///usr/bin/phpbrew/CLIFramework/Application.php:2
    0.0268    1916728   6. call_user_func_array:{phar:///usr/bin/phpbrew/CLIFramework/CommandBase.php:2}() phar:///usr/bin/phpbrew/CLIFramework/CommandBase.php:2
    0.0269    1917152   7. PhpBrew\Command\InstallCommand->execute() phar:///usr/bin/phpbrew/CLIFramework/CommandBase.php:2
   14.5510    2214808   8. PhpBrew\Tasks\ConfigureTask->configure() phar:///usr/bin/phpbrew/PhpBrew/Command/InstallCommand.php:2
   14.5771    2836304   9. PhpBrew\Tasks\Apxs2CheckTask->check() phar:///usr/bin/phpbrew/PhpBrew/Tasks/ConfigureTask.php:2
   14.5802    2836736  10. PhpBrew\Utils::pipeExecute() phar:///usr/bin/phpbrew/PhpBrew/Tasks/Apxs2CheckTask.php:2
   14.5830    2837408  11. stream_get_contents() phar:///usr/bin/phpbrew/PhpBrew/Utils.php:2

===> Applying patch - apxs2 module version name ...
===> Configuring php-5.3.29...


Use tail command to see what's going on:
   $ tail -f /Users/matthewdavis/.phpbrew/build/php-5.3.29/build.log


./configure '--prefix=/Users/matthewdavis/.phpbrew/php/php-5.3.29' '--with-config-file-path=/Users/matthewdavis/.phpbrew/php/php-5.3.29/etc' '--with-config-file-scan-dir=/Users/matthewdavis/.phpbrew/php/php-5.3.29/var/db' '--with-pear=/Users/matthewdavis/.phpbrew/php/php-5.3.29/lib/php' '--disable-all' '--enable-phar' '--enable-session' '--enable-short-tags' '--enable-tokenizer' '--with-pcre-regex' '--with-zlib=/usr' '--enable-dom' '--enable-libxml' '--enable-simplexml' '--enable-xml' '--enable-xmlreader' '--enable-xmlwriter' '--with-xsl' '--with-libxml-dir=/usr' '--with-apxs2=/usr/sbin/apxs' '--enable-bcmath' '--with-bz2=/usr' '--enable-calendar' '--enable-cli' '--enable-ctype' '--with-curl=/usr' '--enable-dba' '--enable-fileinfo' '--enable-filter' '--enable-ftp' '--with-freetype-dir=/usr/local/Cellar' '--enable-gd-native-ttf' '--with-jpeg-dir=/usr/local/opt/jpeg' '--with-png-dir=/usr/local/opt/libpng' '--with-gettext=/usr/local/opt/gettext' '--enable-intl' '--enable-json' '--enable-mbregex' '--enable-mbstring' '--with-mcrypt=/usr/local' '--with-mhash=/usr/local' '--with-mysql=mysqlnd' '--with-mysqli=mysqlnd' '--with-pdo-mysql=mysqlnd' '--with-openssl=/usr' '--enable-pdo' '--with-readline=/usr' '--with-libedit=/usr' '--enable-soap' '--with-sqlite3' '--with-pdo-sqlite' '--with-tidy' '--enable-zip' &> /Users/matthewdavis/.phpbrew/build/php-5.3.29/build.log
===> Checking if php-5.3 source is on 64bit machine
===> Applying patch file for php5.3.x on 64bit machine.
sed: 1: "Makefile": invalid command code M
sed: 1: "Makefile": invalid command code M
===> Building...
make &> /Users/matthewdavis/.phpbrew/build/php-5.3.29/build.log

Make failed.matthews-mbp:~ matthewdavis$ 

@mattcdavis1
Copy link

here is the output of build.log: https://gist.github.com/mattcdavis1/4a15e5c95a047bd2762a

@c9s
Copy link
Member

c9s commented Oct 6, 2014

hi @mattcdavis1 ,

right now it's a Mac OS only issue, because of:

Undefined symbols for architecture x86_64:
  "std::terminate()", referenced from:
      ___clang_call_terminate in msgformat_helpers.o
  "___cxa_begin_catch", referenced from:
      ___clang_call_terminate in msgformat_helpers.o
  "___gxx_personality_v0", referenced from:
      _umsg_format_helper in msgformat_helpers.o
      _umsg_parse_helper in msgformat_helpers.o
      Dwarf Exception Unwind Info (__eh_frame) in msgformat_helpers.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Which is something we can't solve in phpbrew, but might work if we get some patches for this.

@c9s
Copy link
Member

c9s commented Oct 6, 2014

OK, I found that sed implemention is different on Mac OS X, so the patch didn't work. the fix is here:

9844bb7

@c9s
Copy link
Member

c9s commented Oct 6, 2014

1.14.4 is released, please run phpbrew self-update to upgrade

@c9s
Copy link
Member

c9s commented Oct 6, 2014

Hi @harikt,

Sorry, my mistake, the command should be:

phpbrew -d install 5.3 +default+intl

@harikt
Copy link
Author

harikt commented Oct 6, 2014

@c9s yes you did gave me the answer :) . May be close this or is this an issue with the installation ?

@c9s
Copy link
Member

c9s commented Oct 6, 2014

Yeah I think we may close this issue. If you need any support, just fire an issue, I am glad to help.

@c9s c9s closed this as completed Oct 6, 2014
@harikt
Copy link
Author

harikt commented Oct 6, 2014

Thank you.

Hari K T

You can ring me : +91 9388 75 8821

http://harikt.com , https://github.com/auraphp ,
http://www.linkedin.com/in/harikt , http://www.xing.com/profile/Hari_KT

Skype : kthari85
Twitter : harikt

On Mon, Oct 6, 2014 at 12:11 PM, Yo-An Lin notifications@github.com wrote:

Closed #315 #315.


Reply to this email directly or view it on GitHub
#315 (comment).

@mattcdavis1
Copy link

yep - installing 5.3.29 works great after phpbrew self-update. Thanks!

@marcioAlmada
Copy link
Member

@c9s+++

Hey, do you think we should add intl to the default extension set?

@marcioAlmada
Copy link
Member

Oh, I read the full story, we have #319 already.

@c9s
Copy link
Member

c9s commented Oct 7, 2014

Yeah, we should do that. :-) maybe for the next 1.14 patch version? what do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants