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

Setup not working with cli #34

Closed
Niknox opened this issue Sep 7, 2015 · 10 comments
Closed

Setup not working with cli #34

Niknox opened this issue Sep 7, 2015 · 10 comments

Comments

@Niknox
Copy link

Niknox commented Sep 7, 2015

I followed your steps until configuration via php cli.

When I issue php aowow --firstrun it just shows the following:

# php aowow --firstrun
11:49:10          FileGen::init() - creating required directories
11:49:10          created 7 extra paths
11:49:10          Please enter your database credentials.

It seems that user interaction is broken for me, it doesn't work with other commands, too.

Output of php aowow --dbconfig for example shows:

# php aowow --dbconfig
11:53:54          select a numerical index to use the corresponding entry
11:53:54          [0] aowow                  <empty>
11:53:54          [1] world                  <empty>
11:53:54          [2] auth                   <empty>
11:53:54          [3] add an additional Character DB

I'm using PHP 5.6.13.

@Sarjuuk
Copy link
Owner

Sarjuuk commented Sep 7, 2015

after the first block there should be a prompt
Press any key to continue:

and then the same screen as if using --dbconfig should appear.
it works for me, using PHP 5.5.9-1ubuntu4.11

i'll see if i can get it upgraded, in the meantime i'd suggest you comment the lines in
https://github.com/Sarjuuk/aowow/blob/master/includes/kernel.php#L107 to #L138 and add an
error_reporting(E_ALL)
Try again and see what it throws at you.

Also, if you are using WIN, the cli in general is a bit wonky (but should still work well enough)

@Niknox
Copy link
Author

Niknox commented Sep 7, 2015

I'm using Debian 8.

I don't see any prompt appearing, that's why I opened this issue.

Will try your suggestion asap.

Edit: I think I'm missing readline.

@Niknox
Copy link
Author

Niknox commented Sep 7, 2015

Yes I'm missing readline extension for PHP.

Sorry for taking your time, but you might want to add readline to the list of needed extensions.

Another issue is that enter is not working in your cli for me.
After select a numerical index to use the corresponding array I press for example 0, then I see Server Host: and can enter things, but I cannot send any signal for newline. Usually the key "Enter" should send LF to complete the input, but here "Enter" doesn't do anything.

This happens over SSH via putty

@Sarjuuk
Copy link
Owner

Sarjuuk commented Sep 7, 2015

When you are using WIN, you also have to make do without this extension.
You inputs aren't handled because the script is trying to use a nonexistent function and hits a critical error. You are then writing stuff, but the script that should read it has already terminated. (or at least i think it does, you haven't provided any error message yet)

Try applying this patch, it probably works
https://gist.github.com/Sarjuuk/b88e45d48ac97b0b579a

@Niknox
Copy link
Author

Niknox commented Sep 7, 2015

See above, I'm using Debian. At the time of the last comment I already compiled php with readline support. So the script is working and I get a prompt I just cannot press "Enter". It doesn't seem that the script terminated as I could go back with any signal like "Arrow Down".

I won't apply your patch because readline is there and the functions work properly.

Output of E_ALL: http://pastebin.com/YX5An7xh (nothing important)

@Sarjuuk
Copy link
Owner

Sarjuuk commented Sep 7, 2015

hmm, right.

Since i can't reproduce that we'll have to continue that game of guessing :/
Please, try to find out what character is your line terminator:
print_r or echo $keyId from here

it should be 10 (\n), but i half expect it to be 13 (\r) (which i originally ignored, because of WIN, which sends both)

@Niknox
Copy link
Author

Niknox commented Sep 7, 2015

Correct, it's 13 (CR). I'm not that much into ascii characters, but isn't it both \r\n in php for new line?
Edit: I'll try handling 13 like 10, I guess that should work.

@Niknox
Copy link
Author

Niknox commented Sep 7, 2015

This works for me, thanks for your help!

@Sarjuuk
Copy link
Owner

Sarjuuk commented Sep 7, 2015

np

@Sarjuuk Sarjuuk closed this as completed Sep 7, 2015
@Sarjuuk
Copy link
Owner

Sarjuuk commented Sep 12, 2015

should be fixed with 00bd33a

finally :x

Sarjuuk added a commit that referenced this issue Feb 25, 2024
 * implement filter #34 (modelId)
 * thats the actual modelId .. not displayId
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

2 participants