Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

EDIT
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.

EDIT #2
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!

EDIT #3
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

1 Answer 1

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.