ZF-6343: Update .htaccess to enable short open tags

Issue Type: Improvement Created: 2009-04-19T12:41:27.000+0000 Last Updated: 2009-07-14T08:37:09.000+0000 Status: Resolved Fix version(s): Reporter: Rob Allen (rob) Assignee: Matthew Weier O'Phinney (matthew) Tags: - Zend_Tool

Related issues: Attachments:


Would be nice if the .htaccess file created by Zend_Tool added the php_flag short_open_tags on in it.


Posted by Uli Wolf (uli) on 2009-05-10T15:19:03.000+0000

This would cause a internal server error in combination with php running through mod_fcgid on apache, please do not implement this!

It would cause the following error-message:

{quote}{color:red} [alert] [client 82.XXX.XXX.XXX] /path/to/your/zfproject/.htaccess: Invalid command 'php_value', perhaps misspelled or defined by a module not included in the server configuration{color}{quote}

Posted by Uli Wolf (uli) on 2009-05-10T15:22:16.000+0000

Of course the invalid command would be php_flag, but php_value also creates this error.

Posted by Till Klampaeckel (till) on 2009-05-10T15:29:16.000+0000

If this really needs to be enabled, please wrap it in . This wouldn't error out with php-cgi.

Posted by Uli Wolf (uli) on 2009-05-10T15:41:39.000+0000

You are right, didn't think about this. I'd either use: {quote} php_flag short_open_tags on {quote}


{quote} php_flag short_open_tags on {quote}

Posted by Ralph Schindler (ralph) on 2009-06-28T15:14:37.000+0000

Fixed in r16346

Posted by Ralph Schindler (ralph) on 2009-07-14T06:12:43.000+0000

Fixed removed in r16346

Posted by Matthew Weier O'Phinney (matthew) on 2009-07-14T08:35:31.000+0000

Our policy regarding short_open_tag has changed. While we previously encouraged its use, the fact of the matter is that in the php.ini-recommended settings, it's disabled, which causes issues when going between servers. We have since re-thought our position, and are no longer recommending their use in ZF projects. Zend_Tool's code generation has been updated to use normal tags. If you need short tags for your project, you are encouraged to enable the setting in your .htaccess, server settings, or php.ini.

Have you found an issue?

See the Overview section for more details.


© 2006-2019 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.