Issue
Sorry for this bad title. Here is my problem : I have a PHP file (which works fine in Production btw), considered as "DATA" or "BINARY" by the OS ! (Debian Wheezy)
For instance :
stack:~/# file test/foo.php
test/foo.php: PHP script, UTF-8 Unicode text
stack:~/# file test/bar.php
test/bar.php: data
I just don't know :
- How does it happen ?
- How can I fix it ? (foo/bar.php is truly a text file)
I read about file
command, who read the X bytes and check for a NUL value. Ok, but how can I fix my file ? Copy it obviously doesn't work.
Solution
Can you open the file with VI for example ?
And see at the very beguinning (or the very last) of the file, if you can see any special chars (hexadecimal, etc).
Answered By - user3884813