0

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?

1
  • UPDATE: I upgraded ZF to the latest version and nothing's changed. Commented Dec 10, 2010 at 16:12

1 Answer 1

0

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.

3
  • 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. Commented Dec 10, 2010 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? Commented Dec 10, 2010 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). Commented Dec 10, 2010 at 16:46

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.