Skip to content
Advertisement

Is there an option to disable PHP logging to command prompt

When I run php -S 127.0.0.1:80 in the it keeps logging stuff going on, but can I disable that?

I’m still a beginner to and I send long values but I feel like the logs are slowing it down.

Advertisement

Answer

The following redirection of default handles 1>, (StdOut), and 2>, (StdErr), should generally prevent output to the Command Prompt window.

php -S 127.0.0.1:80 1>NUL 2>&1

I would however strongly advise that you take a look at the PHP settings you’re using for logging, rather than relying on this method.

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement