Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
366 views
in Technique[技术] by (71.8m points)

php - How to configure more than one Symfony2 projects on the same server

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.

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: Error: Class 'PsPdfBundlePsPdfBundle' not found in /var/www/gesalight/gesaudit2/app/AppKernel.php line 19

Otherwise if I restart again the apache2 service and I enter first on project B, then the project A displays the same error:

PHP Fatal error: Class 'AcmeContacteBundleAcmeContacteBundle' 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.

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

After few days looking for a solution, finally I found it!

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.

Thanks anyway.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...