Updating CakePHP I

Published on and tagged with cakephp  problem  tip

At the moment I am testing my application if it works with all the changes made to trunk (see also my previous post). The first thing I noticed were a lot of warnings like:

Warning: file_put_contents(/home/dho/projects/myproject/tmp/cache/models/dbomysql_companies) [function.file-put-contents]: failed to open stream: No such file or directory in /home/dho/projects/cake/cake/basics.php on line 751

The reason for that error was that I use a non-standard CakePHP installation and I forgot to copy the tmp directory from my CakePHP installation to my project. Here my directory structure for a better understanding:

/projects
    /myproject
         /app
         /cake   // symlink to /cake/cake 
         /tmp    // this directory and its subdirectories were missing
    /cake
         /app
         /cake
         /tmp

5 comments baked

  • cake baker » Updating CakePHP II

    […] Ok, after solving my first problem, I got very similar warnings: Warning: file_put_contents(/home/dho/projects/myproject/tmp/cache/models/dbomysql_companies) [function.file-put-contents]: failed to open stream: Permission denied in /home/dho/projects/cake/cake/basics.php on line 751 […]

  • Matt Huggins

    I just downloaded CakePHP for the first time ever today, and I’m getting this error. I don’t have a “tmp” folder that came anywhere within the ZIP file I downloaded from CakePHP.org, so I’m not sure what you’re talking about when you mention copying/pasting this folder. What download should I be looking for on the CakePHP page?

  • cakebaker

    @Matt: There should be a “tmp” folder in the zip file in cake_1.1.12.4205/app, and it must be writable by the user under which Apache runs.

    The instructions in this post are no longer valid for current versions of CakePHP.

    HTH

  • injate

    Basically just chmod 777 app/tmp and all subfolder in app

    cd app
    chmod 0777 tmp
    cd tmp
    chmod 0777 -R *

  • cakebaker

    @injate: Yes, you are right.

Bake a comment




(for code please use <code>...</code> [no escaping necessary])

© daniel hofstetter. Licensed under a Creative Commons License