Re: problems with permissions or getting access to a file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11 February 2010 09:31, Pat <patrick.j.rice@xxxxxxxxx> wrote:
> Richard Quadling wrote:
>>
>> On 10 February 2010 16:31, Pat <patrick.j.rice@xxxxxxxxx> wrote:
>>
>>>
>>> hi all
>>> having trouble here with a site that I am hosting on go-daddy
>>>
>>> I want to keep my php and my images apart
>>>
>>> so to do this I have the base directory which contains the php scripts.
>>> On
>>> the directory above that I have
>>> my photos stored in /photos
>>>
>>> when I run my scripts I get the following:
>>>
>>> time -4 hours1265815323 <
>>> *Warning*: filemtime() [function.filemtime
>>> <http://www.patrickrice.net/tomdcam/function.filemtime>]: stat failed for
>>> testPanasonicCamMotion20100201022429140.jpg in
>>> */home/content/j/a/c/jackcards/html/tomdcam/MotionCamLast1Hours.php* on
>>> line
>>> *16*
>>>
>>> 1265815323
>>>
>>> *Warning*: filemtime() [function.filemtime
>>> <http://www.patrickrice.net/tomdcam/function.filemtime>]: stat failed for
>>> testPanasonicCamMotion20100201022429140.jpg in
>>> */home/content/j/a/c/jackcards/html/tomdcam/MotionCamLast1Hours.php* on
>>> line
>>> *28*
>>> 0
>>> time -4 hours1265815323 <
>>> *Warning*: filemtime() [function.filemtime
>>> <http://www.patrickrice.net/tomdcam/function.filemtime>]: stat failed for
>>> testPanasonicCamMotion20100201022619570.jpg in
>>> */home/content/j/a/c/jackcards/html/tomdcam/MotionCamLast1Hours.php* on
>>> line
>>> *16
>>>
>>> *_The script is the following below _from running this script, I keep
>>> getting this error, now when I copy this script in to the directory photo
>>> where the photos are stored, the script displays the images with no
>>> problems
>>> leaving me think that the issue is with the permissions, I have modified
>>> the
>>> pre-emptions to give all access as a test and still problems. Anyone got
>>> any
>>> Ideas??
>>>
>>> Thanks in advance.
>>> Pat

>>
>> read() only returns the filename, not the full path.
>>
>> So, when the script is in the same directory, the current directory
>> contains the required file.
>>
>> Try using ...
>>
>> filemtime(realpath($f))
>>
>> instead.
>>
>>
>
> Thanks Richard, It was really wrecking my head.
> Pat
>

No problem.

-- 
-----
Richard Quadling
"Standing on the shoulders of some very clever giants!"
EE : http://www.experts-exchange.com/M_248814.html
EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
ZOPA : http://uk.zopa.com/member/RQuadling

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux