Thursday, February 14, 2013

Re: Cache errors on Heroku with update to 2.3 but works fine on local?

You're correct that Aspen and Bamboo are read only, but that doesn't apply here because the Cedar stack (which all PHP apps run on) has a writeable ephemeral file system [1].

Figured out my case though, CakePHP's default .gitignore [2] ignores the tmp directory.  Therefore, since the entire tmp directory structure didn't exist, it couldn't write the files it needed into the tmp directory.

So, when starting a new CakePHP app, make sure that you actually commit the tmp directories into your repository.

[2] https://github.com/cakephp/cakephp/blob/master/.gitignore

On Sat, Feb 9, 2013 at 12:28 PM, Simon Males <sime@sime.net.au> wrote:
Issue is not CakePHP 2.3 specific. Heroku is a read only file system[1].

Though you can write to /tmp. So in core.php, when setting
Cache::config() update the value of the 'path' key to '/tmp'. I've
also shared my production Cache::config() settings[2].

[1] https://devcenter.heroku.com/articles/read-only-filesystem
[2] https://gist.github.com/sime/4746187

On Sat, Feb 9, 2013 at 2:21 PM, Shahruk Khan <shahruksemail@gmail.com> wrote:
> Did not resolve the issue as of yet. I tried to change the caching engine to
> Redis but that requires a username / password and I never got past that.
> I've made a post on the official CakePHP group on Facebook.
>
> On Tuesday, January 29, 2013 11:43:10 PM UTC-5, Shahruk Khan wrote:
>>
>> I just updated my cake application to 2.3 and I started getting internal
>> errors on my heroku application.
>>
>> Warning (512): /app/www/app/tmp/cache/ is not writable
>> [CORE/Cake/Cache/Engine/FileEngine.php, line 336]
>>
>> Warning (2): file_put_contents(/app/www/app/tmp/logs/error.log)
>> [http://php.net/function.file-put-contents]: failed to open stream: No such
>> file or directory [CORE/Cake/Log/Engine/FileLog.php, line 88]
>>
>>
>> This works fine on my local server. Any tips?
>
> --
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Find us on Twitter http://twitter.com/CakePHP
>
> ---
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to cake-php+unsubscribe@googlegroups.com.
> To post to this group, send email to cake-php@googlegroups.com.
> Visit this group at http://groups.google.com/group/cake-php?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>



--
Simon Males

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.





--
Brad Koch

Phone: 989-372-1212

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No comments: