If you're encountering the SplFileInfo error in CakePHP2 and you're 
absolutely certain that your file/directory permissions are set up 
properly, then one other thing to check is your PHP version. Cake2 requires 
PHP 5.2.8 or greater and although you'd usually be alerted on the default 
page if you were using the wrong version, you wouldn't be alerted if you'd 
developed your app on one server and then moved it to another.

I experienced this error after developing a Cake2 app on a PHP5.3 server 
and then moving it to a PHP 5.1 server. Upgrading to 5.2.17 (which is above 
5.2.8) solved the problem.


On Saturday, February 18, 2012 2:50:13 AM UTC+7, D Mahoney wrote:
>
>  That suggestion sounds reasonable. Tried that, but still have same issue. 
>
> I changed the cache config to add 'mask' => 0666  in 
> app/Config/bootstrap.php (Cache::config('default', array('engine' => 
> 'File', 'mask' => 0666));), then deleted the cache files with 
> "find ./*/tmp/cache -type f \( -name 'cake_*' -o -name 'element_*' -o 
> -name '*.*' \) -exec rm {} \;" then restarted lighttpd. Also made sure to 
> chown /srv/www/lighttpd to lighttpd:lighttpd since that's the user lighttpd 
> will run as. Now when I go to the application URL I'm seeing:
>
>  *Warning* (2): 
> SplFileInfo::openFile(/srv/www/lighttpd/app/tmp/cache/persistent/cake_core_cake_en-us)
>  [function.SplFileInfo-openFile 
> <http://107.22.127.119:8000/function.SplFileInfo-openFile>]: failed to open st
> ream: No such file or directory [*CORE/Cake/Cache/Engine/FileEngine.php*, 
> line *293*]
>
> *Warning* (512): Cannot open file 
> '/srv/www/lighttpd/app/tmp/cache/persistent/cake_core_cake_en-us' 
> [*CORE/Cake/Cache/Engine/FileEngine.php*, line*300*]
>
>
> Still at a loss here!
>
>
> On 02/17/2012 01:10 PM, 0x20h wrote: 
>
> try to set the 'mask' => 0666 option for the file cache (in boostrap.php),
> then delete all cache files.
>
> The Problem occurs when you create the cache files under different users
> (e.g. from cli and lighttpd as www-data)
>
>
>  
>  

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to