0

I'm having a problem with a bit of script I inherited when I became webmaster of a site. This is the error we're getting:

Warning: filemtime() [function.filemtime]: stat failed for /home/public_html/site/modules/chat/cache/locations/2_0.tch in /home/public_html/site/modules/chat/areas/chat.window.php on line 101

On line 101 in this file I have:

$tch = filemtime( PATH . 'modules' . S . 'chat' . S . 'cache' . S . 'locations' . S . $get_['location'] . '_' . $get_['zone'] . '.tch' );

Now this .tch file is chmod'd to 777, I've also tried it at 755. No dice. The 'S' is a directory seperator, FYI.

Any help is appreciated. I searched and searched .... no luck in finding an answer.

Sumit Bijvani
  • 8,154
  • 17
  • 50
  • 82
  • Have you checked whether the file 2_0.tch exists at that time? – chill0r Mar 26 '13 at 19:42
  • Yes, it does exsist. It is, however, blank ...which makes me think there's some kind of problem with it writing whatever it's trying to write to that file. Then again, my familiarity with this is almost zero so I could be wrong. – Keester Labeau Mar 26 '13 at 19:44

1 Answers1

0

Now this .tch file is chmod'd to 777

Very bad practice.

What are the permissions on the directory?

symcbean
  • 47,736
  • 6
  • 59
  • 94
  • Yes, I at first believed it to be a permission error of some sort and was hoping with blind luck I could fix it. Again, not familiar with this. The locations directory in which the .tch file is store is 755 – Keester Labeau Mar 26 '13 at 19:48
  • So only the owner can write. Is the directory owned by the web server user ? – grahamj42 Mar 26 '13 at 20:13
  • Yes, it is. I've changed the directory permissions back and forth between 755 and 777 ...just to see what if anything might change and nothing. :( – Keester Labeau Mar 26 '13 at 20:31
  • Also, I have noticed that the .tch file is actually 2_.tch. If I go in through FTP and I change the file name to 2_0.tch the error goes away. If log out of that area and go back in, the error returns and the file is again named 2_.tch. – Keester Labeau Mar 26 '13 at 20:35