Q:

Warning: chmod(): Can not call chmod() for a non-standard stream

I am trying to change file permission to 0777 in php but I get this error: 
Warning: chmod(): Can not call chmod() for a non-standard stream
I tried with chmod but doesn't work.
$imagethumb = 'http://'.$root.'/scrapers/thumbnails/'.$copiedimage;
    //looks like http://domain.com/scrapers/thumbnails/image.jpeg
chmod($imagethumb, 0777);

Please let me know where I am mistaking.

A:

Well since no one seems to want to ANSWER the question, rather to comment the answer, here's my answer:
You cannot chmod a URL as there would be no security in that. In order to fix your code, you should use a constant like $_SERVER['DOCUMENT_ROOT']. Here's an example of what you can do.
chmod($_SERVER['DOCUMENT_ROOT'] . '/scrapers/thumbnails/thumb.jpeg', 0777);

