-1

2 php files with the same name in the same folder on my cpanel shared hosting account.

How is this possible?

What I remember is that when I uploaded a newer version of the file it did not ask me if I wanted to replace the older file... It just uploaded it there and I could see 2 copies of the file.

Can someone answer please...

user481913
  • 109
  • 1
  • 3
  • 1
    On linux, names are case-sensitive. You can have files with the same name but different cases. On some systems you can have unicode in your filenames. So you have have characters that look identical, but are not. As jay mentioned, you can also have space characters or other leading/trailing characters that wouldn't always be obvious in a basic file list. – Zoredache Apr 19 '13 at 16:31

1 Answers1

1

It's not possible, and this has nothing to do with cPanel, this is Linux itself.

The chances are, your file has a space at the end or something, so it looks like the same file, but it isn't:

$ ll file1*
-rw-rw-r-- 1 jay jay 0 Apr 19 11:07 file1
-rw-rw-r-- 1 jay jay 0 Apr 19 11:07 file1
$ stat file1*
  File: `file1'
  Size: 0           Blocks: 0          IO Block: 4096   regular empty file
Device: 802h/2050d  Inode: 42008755    Links: 1
Access: (0664/-rw-rw-r--)  Uid: (  502/     jay)   Gid: (  502/     jay)
Access: 2013-04-19 11:07:30.000000000 -0500
Modify: 2013-04-19 11:07:30.000000000 -0500
Change: 2013-04-19 11:07:30.000000000 -0500
  File: `file1 '
  Size: 0           Blocks: 0          IO Block: 4096   regular empty file
Device: 802h/2050d  Inode: 42008756    Links: 1
Access: (0664/-rw-rw-r--)  Uid: (  502/     jay)   Gid: (  502/     jay)
Access: 2013-04-19 11:07:30.000000000 -0500
Modify: 2013-04-19 11:07:30.000000000 -0500
Change: 2013-04-19 11:07:30.000000000 -0500
Jay
  • 6,544
  • 25
  • 34