Brent
Brent

Reputation: 2485

Symfony 2 Deploying App to Web

When deploying symfony2 to the web it still thinks im using local folders for instant..

[public]$ php app/console cache:clear --env=prod --no-debug
[RuntimeException]
Unable to write in the "C:/Users/brent.french/Documents/www/clients/app/app/cache/prod" directory

I tried following http://symfony.com/doc/current/cookbook/deployment-tools.html with no success any ideas?

Upvotes: 1

Views: 84

Answers (2)

Anthony Raymond
Anthony Raymond

Reputation: 7862

FROM SSH :

USING ACL ON A SYSTEM SUPPORTING chmod +a

rm -rf app/cache/*
rm -rf app/logs/*

sudo chmod +a "www-data allow delete,write,append,file_inherit,directory_inherit" app/cache app/logs
sudo chmod +a "yourname allow delete,write,append,file_inherit,directory_inherit" app/cache app/logs


USING ACL ON A SYSTEM NOT SUPPORTING chmod +a

sudo setfacl -R -m u:www-data:rwx -m u:yourname:rwx app/cache app/logs
sudo setfacl -dR -m u:www-data:rwx -m u:yourname:rwx app/cache app/logs


Without using ACL

just after your opening PHP tag in : "app/console", "web/app.php" and "web/app_dev.php" add :

umask(0002); // This will let the permissions be 0775
// or
umask(0000); // This will let the permissions be 0777

Source : Symfony Doc

Upvotes: 1

Brent
Brent

Reputation: 2485

Deleted the app/cache/* folder to remove any old information and this fixed it.

Upvotes: 0

Related Questions