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

"PHP-" is prefixed to sample command in completion message #887

Open
tadanet3 opened this issue Jul 6, 2017 · 4 comments
Open

"PHP-" is prefixed to sample command in completion message #887

tadanet3 opened this issue Jul 6, 2017 · 4 comments

Comments

@tadanet3
Copy link

tadanet3 commented Jul 6, 2017

Output

When $ phpbrew install php-5.6.30 +openssl

Mesage is

To use the newly built PHP, try the line(s) below:

    $ phpbrew use php-5.6.30

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

    $ phpbrew switch php-5.6.30

But
$ phpbrew switch php-5.6.30
Invalid argument php-5.6.30

Expected Result

To use the newly built PHP, try the line(s) below:

    $ phpbrew use 5.6.30

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

    $ phpbrew switch 5.6.30

Command

$ phpbrew install php-5.6.30 +openssl

Build Log

no

Platform

OS:

Ubuntu 17.04

Running PHP:

5.6.30

Installing PHP:

5.6.30
@morozov
Copy link
Contributor

morozov commented Sep 29, 2017

@tadanet3 are you using the latest version of PHPBrew? I cannot reproduce it in my environment:

↪  php -v
PHP 7.1.9 (cli) (built: Sep 15 2017 19:44:50) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies
    with Zend OPcache v7.1.9, Copyright (c) 1999-2017, by Zend Technologies
    with Xdebug v2.5.5, Copyright (c) 2002-2017, by Derick Rethans

↪  phpbrew switch php-5.6.31

↪  php -v
PHP 5.6.31 (cli) (built: Sep 21 2017 13:13:29) 
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies
    with Xdebug v2.5.5, Copyright (c) 2002-2017, by Derick Rethans

@mdlscientist
Copy link

Let me just say i was having a very similar problem to this, im also on ubuntu 17.04 for this particular machine i have sampling brew, i have discovered something between this post and my own interpretation of the installation documentation, that leads me to make a suggestion.

the first portion of this is great... but when we get into compiling the php versions.... referring bspecifically to:

Starting Building Your Own PHP
Simply build and install PHP with default variant:

$ phpbrew install 5.4.0 +default

I feel like that should have said:

start building your own php

lets get started by replicating the php installation we have currently install as your default

run php -v

run phpbrew install '$php -v' +default (also let them know what that +default does.....)

ive been working with your product for the last 24 hours plus trying to build a version of php that i wasnt running...

@morozov
Copy link
Contributor

morozov commented Jan 2, 2018

@mdlscientist please feel free to send a pull request with an update to README.

@itwondersteam
Copy link

itwondersteam commented Sep 7, 2023

Also encountered similar issue today when running it with phpbrew install 8.2.5 +default

To use the newly built PHP, try the line(s) below:

    $ phpbrew use php-8.2.5

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

    $ phpbrew switch php-8.2.5

Enjoy!
~/Library/Caches/Homebrew  ♥ 15:04  5:26.083s  phpbrew switch php-8.2.5
Invalid argument php-8.2.5

~/Library/Caches/Homebrew  ♥ 15:11  0.087s  phpbrew switch php-8.2.5
~/Library/Caches/Homebrew  ♥ 15:14  0.409s  phpbrew switch 8.2.5
~/Library/Caches/Homebrew  ♥ 15:14  0.11s  php -v

PHP 8.2.5 (cli) (built: Sep  7 2023 15:04:16) (NTS)

version

phpbrew 2.1.0

EDIT: somehow cannot reproduce it now. it could be due to ~/.phpbrew/bashrc hasn't added to .bashrc before this.

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

No branches or pull requests

4 participants