I downloaded some code for a chat room, but it seems there is a behavior of PHP that i dont understand.
The code uses the following line to get a list of archives:
exec("ls ../users | grep -c \"\"",$execAr)
But when i check the array $execAr[], it doesnt contains any information.
BUT when i turn off SAFE_MODE on php3.ini, now the command works.
I thought it was aproblem of file permissions and owners for SAFE MODE operation. But the server runs as "wwwrun" user, "nogroup" group, and all the files, the scripts and everything else is owned by the same user of the webserver ("wwwrun")
Its this normal? or is there a way of running this exec() command, gfetting an output and using it with SAFE_MODE = ON ?