Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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/ and /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

share|improve this question
up vote 0 down vote accepted

Solved it.

The first problem I had was that the server wasn't completely clean of PHP 5.1.6. So I uninstalled everything and reinstalled (properly) PHP 5.3.3.

Then, I installed php-devel (as mentioned here). I restarted the server, then I had an error message moaning about the timezone of the server. Once this set, everything worked!

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .