Hi, I can't seem to figure out why I'm having trouble running dos2unix using exec from my PHP script. When I SSH into my server and type the following from the command prompt, it works:
/usr/bin/dos2unix /path/to/myfile.txt
The double spacing is removed from the file and it works fine. But, when I use the following command in my PHP script:
exec("/usr/bin/dos2unix $name_of_file"); (where $name_of_file is the full path to the TXT file that I want converted)
It does NOT work. The file is not affected at all. I'm not sure what's going on. Someone please help! Thanks in advance.