问题描述:

I actually host 2 Symfony 2.8 projects on my Debian local server. I configured Apache to serve my 2 applications with these 2 URL :

App1 : http://192.168.0.1

App2 : http://192.168.0.1/app2

When I am logged into my account in App1 and navigate to App2, Symfony throws this warning :

Warning : Class __PHP_Incomplete_Class has no unserializer.

Here is my Apache virtual block conf :

<VirtualHost *:80>

ServerName 192.168.0.1

ServerAlias devserver

RewriteEngine On

RewriteCond %{HTTP:Authorization} ^(.)

RewriteRule . - [e=HTTP_AUTHORIZATION:%1]

DocumentRoot /var/www/app1/web

Alias /app2 "/var/www/app2/web"

<Directory /var/www/app1/web>

AllowOverride None

Order Allow,Deny

Allow from All

<IfModule mod_rewrite.c>

Options -MultiViews

RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-f

RewriteRule ^(.*)$ app_dev.php [QSA,L]

</IfModule>

</Directory>

<Directory /var/www/app2/web>

AllowOverride None

Order Allow,Deny

Allow from All

<IfModule mod_rewrite.c>

Options -MultiViews

RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-f

RewriteRule ^(.*)$ /app2/app_dev.php [QSA,L]

</IfModule>

</Directory>

ErrorLog /var/log/apache2/app_error.log

CustomLog /var/log/apache2/app_access.log combined

</VirtualHost>

I noticed I have no problem to navigate between my two applications when i am not logged in.

I have disabled all PHP accelerator and cleared the cache on both app, but still have this behavior.

Have you ever faced this problem ? Do you have any clue ?

Thx.

网友答案:

For those who encountered the same problem, I figured out that the session was involved. I fixed the warning by adding a session name in config.yml :

framework:
    ...
    session:
        name: "app1"
相关阅读:
Top