1

I need to redirect my php built in server log file into a file.

i try :

php -S adress:port -t . > logs.txt

the problem is it's just putting inside the launch text.

and logs.txt 2>&1

but it's make my page php look like my error

PHP 5.5.9-1ubuntu4.14 Development Server started at Sat Feb 13 09:40:05 2016 Listening on XXXXXX .... 

Any Idea ?

albttx
  • 3,444
  • 4
  • 23
  • 42

1 Answers1

-1

you could filer it out using grep.

php -S adress:port -t . | grep -v "Development Server started at" > logs.txt

And remember: The server is not supposed for productive use and log handling is just one of the limitations.

johannes
  • 15,807
  • 3
  • 44
  • 57