Demo has incorrect command...
davidjeddy opened this issue · comments
... 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.
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