-2

I am using Mac osx Mountain Lion for development.

I am trying to execute a shell command in php using the 'exec' function. At the end of my command I am putting the output to > /dev/null 2>dev/null &.

However it does not work and the error in /var/log/apache2/error_log is:

sh: dev/null: Permission denied

How can I get this to work without throwing this error?

liamTc
  • 237
  • 3
  • 4
  • 9

1 Answers1

4

you seem to have missed the leading /. is it possible you entered dev/null instead of /dev/null?

Michael Hampton
  • 244,070
  • 43
  • 506
  • 972
replay
  • 3,240
  • 14
  • 17