Hot answers tagged ansi-term
It works when I put export TERM="xterm" before dircolors.
You probably have a $LS_COLORS environment variable defined somewhere in your ~/.bashrc/~/.zshrc... (probably via a call of eval "$(dircolors)"). The php that you run on the command-line will inherit your shell's environment, including that $LS_COLORS variable. While the one started by apache2 will inherit apache2's environment which is unlikely to have ...
Only top voted, non community-wiki answers of a minimum length are eligible