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

Demo has incorrect command... #97

Closed
davidjeddy opened this issue Dec 9, 2019 · 1 comment
Closed

Demo has incorrect command... #97

davidjeddy opened this issue Dec 9, 2019 · 1 comment

Comments

@davidjeddy
Copy link

... the first demo animation has the example command ...

sudo ./phpspy -- php -r 'usleep(100000);'

However, this returns an error:

popen_read_line: No stdout; cmd=objdump -Tt /proc/20194/root//usr/bin/php7.2 | awk '/ basic_functions_module$/{print $1; exit}'
get_symbol_offset: Failed
process_vm_readv: No such process

The correct command is ...

sudo ./phpspy -r -- php -r 'usleep(100000);'

Please update the examples. I would also like to recommend usage of asciinema.

@adsr
Copy link
Owner

adsr commented Dec 9, 2019

Either of those commands should work, although -r with no argument is a no-op. I will update those docs. There is a potential race condition if the PHP process finishes before phpspy tries to attach.

The popen_read_line error is expected and recoverable if the PHP binary does not contain debug symbols.

adam@asx1c6:~/phpspy$ ./phpspy -- php -r 'usleep(100000);'
0 usleep <internal>:-1
1 <main> <internal>:-1

0 usleep <internal>:-1
1 <main> <internal>:-1

0 usleep <internal>:-1
1 <main> <internal>:-1

0 usleep <internal>:-1
1 <main> <internal>:-1

0 usleep <internal>:-1
1 <main> <internal>:-1

0 usleep <internal>:-1
1 <main> <internal>:-1

0 usleep <internal>:-1
1 <main> <internal>:-1

process_vm_readv: No such process
adam@asx1c6:~/phpspy$ ./phpspy -r qcup -- php -r 'usleep(100000);'
0 usleep <internal>:-1
1 <main> <internal>:-1
# uri = -
# path = Standard input code
# qstring = -
# cookie = -
# ts = 1575925866.473734

0 usleep <internal>:-1
1 <main> <internal>:-1
# uri = -
# path = Standard input code
# qstring = -
# cookie = -
# ts = 1575925866.473734

0 usleep <internal>:-1
1 <main> <internal>:-1
# uri = -
# path = Standard input code
# qstring = -
# cookie = -
# ts = 1575925866.473734

0 usleep <internal>:-1
1 <main> <internal>:-1
# uri = -
# path = Standard input code
# qstring = -
# cookie = -
# ts = 1575925866.473734

0 usleep <internal>:-1
1 <main> <internal>:-1
# uri = -
# path = Standard input code
# qstring = -
# cookie = -
# ts = 1575925866.473734

process_vm_readv: No such process

@adsr adsr closed this as completed Dec 9, 2019
adsr added a commit that referenced this issue Dec 9, 2019
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