logo
Ask your Symfony questions! Pay money and get answers fast! (more info)

Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.

If the asker does not get an answer then they have 10 days to request a refund.

$10
Why is 'symfony cc' erasing needed cache files?

Symfony 1.4 using Propel.

This is a site where we are trying to create all of the forms using the generator, with calls like this:

./symfony propel:generate-admin --theme="roboo" --module="deal" frontend Deal


My site is now completely non-functional. One mistake that we made this morning is that someone committed the cache folder to Subversion. So I:

sudo su
# I am now root
mkdir /home/fix_subversion_problems
cd /home/fix_subversion_problems
svn export https://ddd.slsapp.com/source/roboo .


Then I cd'ed back to the directory where we are working and I did "svn delete" and "svn commit". Then I did "cp -r" to move the cache folder from the clean export back to the directory where we have somethings under Subversion control. So we have the cache folder back, and it is not under Subversion control.

Then I point my browser at the site and I get a blank white screen. So I do:

tail /etc/httpd/logs/error_log-20121014


And I see:

[Tue Nov 06 20:01:08 2012] [error] [client 67.247.7.85] PHP Warning: require(/home/roboo/cache/frontend/prod/config/config_config_handlers.yml.php): failed to open stream: No such file or directory in /home/roboo/lib/vendor/symfony/lib/config/sfConfigCache.class.php on line 279
[Tue Nov 06 20:01:08 2012] [error] [client 67.247.7.85] PHP Fatal error: require(): Failed opening required '/home/roboo/cache/frontend/prod/config/config_config_handlers.yml.php' (include_path='.:/usr/share/pear:/usr/share/php') in /home/roboo/lib/vendor/symfony/lib/config/sfConfigCache.class.php on line 279


It appears that /home/roboo/cache/frontend/prod/config/ was not copied over for some reason. See the attached screenshot.

I copy all of these files over. I now get a new error:


[Tue Nov 06 20:02:47 2012] [error] [client 67.247.7.85] PHP Fatal error: require(): Failed opening required '/home/roboo/cache/frontend/prod/config/modules_homepage_config_security.yml.php' (include_path='/home/roboo:/home/roboo/plugins/sfPropelORMPlugin/lib/vendor/phing:/home/roboo/plugins/sfPropelORMPlugin/lib/vendor/propel:/home/roboo/plugins/sfPropelORMPlugin/lib/vendor/phing/../:/home/roboo/plugins/sfPropelORMPlugin/lib/vendor/phing/classes:.:/usr/share/pear:/usr/share/php') in /home/roboo/cache/frontend/prod/config/config_core_compile.yml.php on line 265


I can not find this file, modules_homepage_config_security.yml.php, anywhere. From the top of the project I do:

find . -name *modules_homepage_config_security*


This gets me nothing. Nor can I find it in previous revisions in Subversion.

One other thing, if I do "symfony cc" it erases all of the files in cache/frontend/prod/config/ . And then I get errors about how these files are missing. If Symfony erases these files, then shouldn't Symfony also create these files?

This question has been answered.

attachment image asker uploaded image

Lawrence Krubner | 11/06/12 at 3:28pm Edit


(2) Responses

See a threaded view of answers?

Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.

  • avatar
    Last edited:
    11/06/12
    4:34pm
    Ben says:

    try from the root of your project:
    sudo chmod 777 cache log -R

    Just in case you accidentally changed the ownership of the files by using sudo to copy them.

    Previous versions of this answer: 11/06/12 at 4:34pm

  • avatar
    Last edited:
    11/07/12
    4:13am
    Milena Dimitrova says:

    The cache directory should never be committed to svn - it must be ignored.
    You can physically delete the content of the cache folder as well:

    rm -r -f cache/

    then update from svn and make sure it is still empty.
    Also, please note that you should not use autogenerated partials or components from one module into another,

This question has expired.



Lawrence Krubner voted on this question.



Current status of this question: Completed



Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.

If the asker does not get an answer then they have 10 days to request a refund.