You are on page 1of 1

What do the hidden characters look like?

Below is an example from a php.ini file showing what the hidden characters
look like:

;;;;;;;;;;;;;;;;;;;^M
; Resource Limits ;^M
;;;;;;;;;;;;;;;;;;;^M
;^M
max_execution_time = 30^M
max_input_time = 60^M
memory_limit = 32M^M

As said before, these characters will not appear in most Windows text editors,
but will appear in Linux command line utilities like cat or vi. Removing them
is rather painless. Just run the command dos2unix.

root@host [~]# dos2unix /path/to/file

In the above example of the php.ini, it will look something like this:

root@host [~]# dos2unix /usr/local/lib/php.ini


dos2unix: converting file /usr/local/lib/php.ini to UNIX format ...

That’s it. If the command has worked correctly, the file in question shouldn’t
have any of the hidden characters in it, like the following:

;;;;;;;;;;;;;;;;;;;
; Resource Limits ;
;;;;;;;;;;;;;;;;;;;
;
max_execution_time = 30
max_input_time = 60
memory_limit = 32M

You might also like