简体   繁体   中英

I can't reinstall symfony2

I am using symfony2 standard version, on linux mint 12.

I created a symfony2 project 2 days and everything went well, i installed a wrong bundle and messed up the project so i decided to delete the Symfony folder, and reinstall symfony.

And now, if i do php app/check.php i get the timezone error, although my timezone is set correctly, and the configuration page looks like this

在此处输入图像描述

i tried

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

and i tried

chmod -R 777 app/cache app/logs

could not fix it

Edit

php bin/vendors install --reinstall fixed the issue (Hakan Deryal thank you sir). However, I found out that if you rename the Symfony folder to symfony or any other name, you'll get the error, or everything goes normal but when you press Configure your Symfony Application online you'll get this error

Server error
The website encountered an error while retrieving http://localhost/mysite/web/app_dev.php/_configurator/. It may be down for maintenance or configured incorrectly.
Here are some suggestions:
Reload this webpage later.
HTTP Error 500 (Internal Server Error): An unexpected condition was encountered while the server was attempting to fulfill the request.

So my next question is how to change of the symfony2 project, say you have 2 symfony2 project on localhost, they can't have the same name

Hi some time just clearing cache is not enough.

Event I came across the same type of problem, after clearing the cache, try to rebuild it.

commands are:

$ sudo php app/console cache:clear 
$ sudo php app/console cache:warmup
$ sudo chmod 777 -R app/cache app/logs

The best way to set permission is to use ACLs:

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

You could also try a chown www-data app/logs

Symfony reinstall at this point is not very relevant

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM