Hi I joined and I am posting right now because of the lack of succes I have 
seen all over the web about this issue and while looking for the solution I 
found MANY production sites with this warning messages all over....as this 
is the first post that comes up on google when you search for this issue 
here goes the solution.

I solved this problem on fedora 17. I did two things:
1 Add my user to apache group, add apache user to my user group.
2 Read carefully SELinux logs, on fedora I had to issue some commands (that 
was sugested copy/paste by the details in the SELinux warning) to let cake 
write files. If your distribution of SE does not give you a simple option 
to allow or not, disable SELinux as last resort.

So add apache and your user to each other group and disable (or allow cake 
on) SELinux.

I hope this helps and bring me good karma =]

On Sunday, May 6, 2012 2:09:36 PM UTC-3, Joseph wrote:
>
> 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)
>>
>>
>>  
>>  

-- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.


Reply via email to