Server Fault is a question and answer site for system and network administrators. 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 not sure if this question belongs here or StackOverflow...

Some time ago I wrote a web app using Zend Framework and since then it ran flawlessly on a standard shared hosting (lampp stack). I bought a VPS and set up a few sites without a problem using NGINX and PHP-FPM. I decided to migrate the mentioned site to the new server - ZF doesn't render layout or any templates. It just prints the layout.phtml file without interpreting the code in it. There aren't any errors in the logs. The version in Zend/Version.php says '1.7.1'.

The first thing that comes to mind is the version of PHP but it is 5.x - the same that was running on the shared hosting. I'm completely clueless here.

Should I upgrade to latest ZF? What would you do to debug it?

share|improve this question
UPDATE: I upgraded ZF to the latest version and nothing's changed. – pinkeen Dec 10 '10 at 16:12
up vote 0 down vote accepted

Your templates probably use short opening tags <? or <?=$foo versus <?php or <?php echo $foo. This is turned off by default in PHP 5.3 (possibly earlier) so you have enable it in your php.ini file.

share|improve this answer
I haven't touched php code for a long, long time. I've read that short opening tags are evil and I didn't use them anywhere, except for the templates, because the ZF docs said specifically that they can be used in ZF templates... Supposedly ZF parses templates in a different way than ordinary php scripts. Nevertheless, I'll check it out and post the results. – pinkeen Dec 10 '10 at 16:21
Thank you, It works now! But could somebody explain this to me? When I was coding this site, ZF docs explicitly stated that short tags are evil except the templates. What's more, even then, [short openings] wouldn't work by default in normal php scripts (and I didn't use them) but they did work in templates. What's changed? – pinkeen Dec 10 '10 at 16:27
I agree, it makes perfect sense. I feel so dumb that I forgot about this basic issue and panicked right away. I'm not a newbie but I never managed a production server before (but I have set up various stacks for development a dozen times). – pinkeen Dec 10 '10 at 16:46

Your Answer


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.