如何配置在同一台服务器上的多个项目的Symfony2 [英] How to configure more than one Symfony2 projects on the same server
问题描述
我工作2 Symfony2的项目,我的服务器上,但我有一个错误,如果我执行它们。
让我们把项目A和B。
I'm working on 2 Symfony2 projects on my server, but I have an error if I execute them. Let's call the projects A and B.
如果我重新启动我的服务器上的Apache2服务,我的项目A的网页上输入的,那么B项目显示此错误:
If I restart the apache2 service on my server and I enter on the web of project A, then the project B displays this error:
FatalErrorException:错误:类'诗\\ PdfBundle \\ PsPdfBundle'未找到
在/var/www/gesalight/gesaudit2/app/AppKernel.php 19行
FatalErrorException: Error: Class 'Ps\PdfBundle\PsPdfBundle' not found in /var/www/gesalight/gesaudit2/app/AppKernel.php line 19
否则,如果我再次重新启动的Apache2服务,我第一次进入项目B,那么A项目显示了同样的错误:
Otherwise if I restart again the apache2 service and I enter first on project B, then the project A displays the same error:
PHP致命错误:类'的Acme \\ ContacteBundle \\ AcmeContacteBundle'不
在/var/www/ohupweb/app/AppKernel.php发现第20行
PHP Fatal error: Class 'Acme\ContacteBundle\AcmeContacteBundle' not found in /var/www/ohupweb/app/AppKernel.php on line 20
如果一件作品,其他没有工作。
If one works, the other doesn't works.
当然,这两个项目有一个独立的虚拟主机指着她的相应目录。
Of course, the two projects have an independent virtual hosts pointing to her corresponding directory.
更多信息:服务器是Ubuntu服务器12.04使用PHP 5.5.12和2.4.9的Apache2。该项目A是Symfony2的V2.5和项目B是Symfony2的V2.3
More info: The server is a Ubuntu Server 12.04 with PHP 5.5.12 and Apache2 2.4.9. The project A is Symfony2 v2.5 and the project B is Symfony2 v2.3
我是什么做错了吗?任何建议?谢谢你。
What am I doing wrong? Any suggestion? Thanks.
推荐答案
在几天寻找一个解决方案,终于让我找到了!
After few days looking for a solution, finally I found it!
在php.ini文件的配置我改变opcache.enable的评价参数为0,现在它的工作...我不知道为什么,顺便说一句。
In the configuration of php.ini I changed the commented parameter of opcache.enable to 0 and now it works... I don't know why, by the way.
不管怎样,谢谢。
这篇关于如何配置在同一台服务器上的多个项目的Symfony2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!