简体   繁体   English

我无法重新安装 symfony2

[英]I can't reinstall symfony2

I am using symfony2 standard version, on linux mint 12.我在 linux mint 12 上使用 symfony2 标准版。

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.我创建了一个 symfony2 项目 2 天,一切顺利,我安装了错误的包并搞砸了项目所以我决定删除Symfony文件夹,然后重新安装 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现在,如果我执行php app/check.php我会收到时区错误,尽管我的时区设置正确,配置页面如下所示

在此处输入图像描述

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). php bin/vendors install --reinstall解决了这个问题(Hakan Deryal 谢谢先生)。 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但是,我发现,如果您将Symfony文件夹重命名为symfony或任何其他名称,您将收到错误消息,或者一切正常,但是当您按下Configure your Symfony Application online时,您将收到此错误消息

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所以我的下一个问题是如何更改 symfony2 项目,假设你在本地主机上有 2 个 symfony2 项目,它们不能有相同的名称

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:设置权限的最佳方式是使用 ACL:

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您也可以尝试chown www-data app/logs

Symfony reinstall at this point is not very relevant Symfony reinstall 这个点不是很相关

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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