0

Normally when running PHP script in web server mode, this would show up:

$ php -S 0.0.0.0:12345
PHP 5.6.1 Development Server started at Mon Nov 24 14:09:22 2014
Listening on http://0.0.0.0:12345
Document root is /tmp
Press Ctrl-C to quit.

But when that command appended with | tee -a accesss.log, that output is missing:

$ php -S 0.0.0.0:12345 | tee -a access.log
# blank

What should I do to keep that output shown?

1

If you have GNU stdbuf, you can use:

$ stdbuf -o0 -e0 php -S 0.0.0.0:12345 | tee -a access.log
PHP 5.4.34-0+deb7u1 Development Server started at Mon Nov 24 14:38:33 2014
Listening on http://0.0.0.0:12345
Document root is /home/cuonglm
Press Ctrl-C to quit.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.