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

Step by step install not working #39

Closed
Scaum opened this issue Apr 5, 2022 · 4 comments
Closed

Step by step install not working #39

Scaum opened this issue Apr 5, 2022 · 4 comments
Assignees

Comments

@Scaum
Copy link

Scaum commented Apr 5, 2022

Simply followed the step by step install. This does not work.

image

@UmanShahzad
Copy link
Contributor

Yeah I think the README.md has faulty instructions because the PHP shell won't allow this kind of importing the way you've done it. I guess the README.md is more for 'display' and less for actually executing it. But we should find an alternative method, like maybe a quick PHP script that does the same thing.

@UmanShahzad
Copy link
Contributor

@SobanMahmood can you look into writing PHP script equivalents of the interactive shell we've got going on in the README.md?

peter279k added a commit to open-source-contributions/php that referenced this issue Apr 6, 2022
peter279k added a commit to open-source-contributions/php that referenced this issue Apr 6, 2022
@peter279k
Copy link
Contributor

I also found that it uses the psysh to complete the Quick Start section, not using the php -a command.

If using the php -a command, it should let all commands run in the single line with semicolon to be separated rather than separated commands.

Some examples are as follows:

peterli@peterli-Virtual-Machine:~$ php -v
PHP 8.1.4 (cli) (built: Apr  4 2022 13:30:17) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.4, Copyright (c) Zend Technologies
    with Zend OPcache v8.1.4, Copyright (c), by Zend Technologies
peterli@peterli-Virtual-Machine:~$ php -a
Interactive shell

php > require_once __DIR__ . '/vendor/autoload.php';
php > use ipinfo\ipinfo\IPinfo;
php > $client = new IPinfo('123456789abc');
PHP Warning:  Uncaught Error: Class "IPinfo" not found in php shell code:1
Stack trace:
#0 {main}
  thrown in php shell code on line 1
php > require_once __DIR__ . '/vendor/autoload.php';use ipinfo\ipinfo\IPinfo;$client = new IPinfo('123456789abc');
php >

@UmanShahzad
Copy link
Contributor

Hmm I see, but just for displaying it to be honest we can just give basic PHP code snippets, instead of some custom shell or whatever which most people won't use or download.

peter279k added a commit to open-source-contributions/php that referenced this issue Apr 6, 2022
peter279k added a commit to open-source-contributions/php that referenced this issue Apr 6, 2022
peter279k added a commit to open-source-contributions/php that referenced this issue Apr 6, 2022
SobanMahmood pushed a commit that referenced this issue Apr 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants