Petra Barus
Petra Barus

Reputation: 4013

How to run PHP built-in server in quiet mode?

How do I silent output of PHP built-in server?

I tried

php -S 127.0.0.1:80 -t public/ > /dev/null

but it still output

[Thu Jun 11 13:08:53 2015] 127.0.0.1:60963 [200]: /

Upvotes: 14

Views: 3364

Answers (2)

Mahdi Hasanpour
Mahdi Hasanpour

Reputation: 166

Try this:

php -q -S 127.0.0.1:80 -t public/

use -q option for Quiet-mode

Upvotes: 5

c4pone
c4pone

Reputation: 797

The character > just redirects standard output. If you want to redirect standard error and standard output you can use >&

php -S 127.0.0.1:80 -t public/ >& /dev/null

Upvotes: 10

Related Questions