I'm trying to deploy a Symfony2 website on a production server but I am continually being faced by the same problem.
When I go to the website nothing is displayed on the screen. I enter the
/web/config.php URL in to the browser and nothing (I repeat nothing) is displayed. It's just a blank page. I also go to
/web/app_dev.php and the same thing happens again. No pages are displayed.
Thinking there must be an issue with the website I'm trying to upload, I have installed Symfony2 as a fresh install (without any of the files I've created). Interestingly enough, when I go to
/web/config.php it returns this error:
This script is only accessible from localhost.
I then change a bit of the code so it accepts the IP address I'm using, but then returns to the same problem of displaying nothing.
I haven't got any .htaccess rules applied to this site, and Apache is configured to use the
public_html as the document root. I had changed this to use
public_html/web as the document route but changed back thinking this was causing this problem.
Just checked the version of PHP running on the server (using
phpinfo();) and the server is runninng PHP 5.1.6, not the PHP 5.3.2 that Symfony needs to get working. I've emailed the guy who owns the server to upgrade this and to see if this makes a difference.
The server is now configured to run PHP 5.3.3, and it has made a slight difference. When visiting
/web/config.php or even just
/web/ I get an Internal Server Error now (which is more than what I got before!
I used the guide on this site, and changed the permissions to the
cache folder and
logs folder. However, yet again, another error is displayed:
Fatal error: Class 'DOMDocument' not found in /home/website/public_html/vendor/symfony/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php on line 214