views:

53

answers:

2

I was working with Zend on Ubuntu and it was working correctly. Now I moved to windows for same project. But now elements of my form are not rendered correctly and their code is appeared on brower's page like this:

translate( $this->element->getElement("email")->getLabel() ) ?>

Any idea that what is the problem?

+2  A: 

Is it possible that you use short opening tags (<?) instead of the correct long version and that is not enabled in your php.ini on the Windows system?

You can either turn that feature on (directive short_open_tag) or you can "convert" your opening tag(s).

I would recommend the latter solution, because it is the cross-platform (and thus, good) way of doing things.

Franz
"Correct long version"? Flame war in 3.. 2.. 1... ;)
Pekka
It starts working by enabling short_open_tag. Yes, you are right, I have to use proper php opening tags for cross-platforms. Thanks
Awan
@Pekka: hehe, you are probably right. And I thought I was on the safe side... ;)
Franz
+3  A: 

Yes it is probably a php.ini issue you need to enable it short_open_tag = On and restart the server

Like I described as above it should work. But like Franz already said you should really avoid using the short tags. If you have to distribute your files or change to a different server it will only cause trouble again. What you should do is use the find and replace all function of your editor and replace all the short tags with the normal php tag

Chino
You're probably right, however this doesn't really solve the problem, just the symptom.
Franz
Thanks, it helped.
Awan