Hi everybody! I have a little problem. In fact I would like to install Symfony 2 and use it with ISPConfig. Once I have installed ISPConfig3 I don't know how to insert Symfony 2 in it. First I unzip the symfony2 archive into /var/www/MyProject/web but after I have an error to access to the main page. I think it is a problem in apache configuration. Is there somebody who can help me on that? Thank you very much!
ensure that you chowned all symfony files to the web[ID] user and client[id] group of the website, otherwise the files can not be accessed by apache.
Hello, Still have a problem. In fact here is the error I have in my browser when I go my website mywebsite.fr/config.php Major problems have been detected and must be fixed before continuing : - Change the permissions of the "app/cache/" directory so that the web server can write into it. - Change the permissions of the "app/logs/" directory so that the web server can write into it. I change the chown for all my folders and files and put a chmod 777 for log and cahe's folders like this : /var/www/mywebsite.fr# ls -la drwxr-xr-x 6 web2 client0 4096 13 oct. 02:04 app drwxr-xr-x 2 web2 client0 4096 13 oct. 01:41 bin drwxr-x--x 2 web2 client0 4096 13 oct. 01:28 cgi-bin -rwxr-x--x 1 web2 client0 1574 13 oct. 01:41 deps -rwxr-x--x 1 web2 client0 487 13 oct. 01:41 deps.lock -rwxr-x--x 1 web2 client0 1065 13 oct. 01:41 LICENSE lrwxrwxrwx 1 web2 client0 40 13 oct. 01:28 log -> /var/log/ispconfig/httpd/mywebsite.fr -rwxr-x--x 1 web2 client0 6405 13 oct. 01:41 README.md drwxr-xr-x 3 web2 client0 4096 13 oct. 01:41 src drwxr-x--x 2 web2 client0 4096 13 oct. 01:28 ssl drwxrwxrwx 2 web2 client0 4096 13 oct. 01:28 tmp drwxr-xr-x 13 web2 client0 4096 13 oct. 01:41 vendor drwxr-xr-x 5 web2 client0 4096 13 oct. 12:43 web /var/www/mywebsite.fr/app# ls -la -rw-r--r-- 1 web2 client0 141 13 oct. 01:41 AppCache.php -rw-r--r-- 1 web2 client0 1413 13 oct. 01:41 AppKernel.php -rw-r--r-- 1 web2 client0 1841 13 oct. 01:41 autoload.php -rw-r--r-- 1 web2 client0 40237 13 oct. 01:41 bootstrap.php.cache drwxrwxrwx 3 web2 client0 4096 13 oct. 03:09 cache -rw-r--r-- 1 web2 client0 6026 13 oct. 01:41 check.php drwxr-xr-x 2 web2 client0 4096 13 oct. 02:12 config -rwxr-xr-x 1 web2 client0 734 13 oct. 01:41 console -rw-r--r-- 1 web2 client0 13 13 oct. 01:41 .htaccess drwxrwxrwx 2 web2 client0 4096 13 oct. 02:04 logs -rw-r--r-- 1 web2 client0 1327 13 oct. 01:41 phpunit.xml.dist drwxr-xr-x 3 web2 client0 4096 13 oct. 01:41 Resources I don't know what I have missed. Thanks for reply!!
the permission change is not nescessary, just select the correct php mode. You have to use php-fcgi and enable the suexec checkbox in the website settings as described in the manual when a php script shall be able to write to the website.
Nobody has ideas? I'll try to give you my diffenrent configuration. Wich files or folders do you need to see? I still have the same errors and when I go on app_dev.fr the page is blank. Thanks
What are the exact error messages that you get in the error.log of the website and that you get on the screen.
I got this message in the error.log: [Mon Oct 15 20:39:07 2012] [warn] [client 192.168.0.48] mod_fcgid: stderr: PHP Warning: is_writable(): open_basedir restriction in effect. File(/var/www/clients/client1/web3/web/../app/logs) is not within the allowed path(s): (/var/www/clients/client1/web3/web:/var/www/clients/client1/web3/tmp:/var/www/website.fr/web:/srv/www/website.fr/web:/usr/share/php5:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/usr/share/php) in /var/www/clients/client1/web3/web/config.php on line 34 And this to the screen : Change the permissions of the "app/cache/" directory so that the web server can write into it. Change the permissions of the "app/logs/" directory so that the web server can write into it.
That is ok, I have to add the open_base_dir to the options of the website. Now when I want to open app_dev.php, the page is blank and I got this in error.log : [Mon Oct 15 21:03:07 2012] [warn] [client 192.168.0.48] mod_fcgid: stderr: PHP Fatal error: require_once(): Failed opening required '/var/www/clients/client1/web3/web/../app/bootstrap.php.cache' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/clients/client1/web3/web/app_dev.php on line 17, referer: http://website.fr/config.php
Seems as if there is a wrong path in your symfony configuration as it tries to access a file outside of the web folder. It tries to open the path: /var/www/clients/client1/web3/app/bootstrap.php.cache while all files should be inside the web folder, so it should be: /var/www/clients/client1/web3/web/app/bootstrap.php.cache
Well this is not "wrong" by Symfony. Modern PHP Frameworks avoid to put all its stuff in the document root of the webserver. Symfony needs only one single php file (app.php) in the document root for bootstraping. The source is located in ../{app,src,vendor} Having such a setup supported in a proper way natively would be awesome.
And for exact that reason there is a folder called "private" in ispconfig to hold all files and directories which shall not be accessible by http.
I thought about that, but on my system private/ is not in open_basedir by default, so I skipped that direction. Just recognized "php_open_basedir=[website_path]/web:[website_path]/private:[...]" - I will give it a try.
Hi nikro, I have the same issue. How did you resolve it?. Can you give us a litle procedure to make it work?.