[OPEN-ILS-DEV] PHP short tags (was: Website Redesign Patch)
Atre, Anoop S
anoop.atre at mnsu.edu
Sun Apr 10 22:18:35 EDT 2011
Ben
Thanks for fixing them, it really isn't a huge deal (imo) and I was just being lazy. I responded to you on IRC (as did Thomas) and requested Dan commit access since I've seen a few other issues. So I'll probably get to them tomorrow afternoon.
- - - - - - - - - - - - - - - - - - - - - - - - -
Anoop Atre
IS Developer & Integrator, MnPALS
PH: 507.389.5060
OF: 3022 Memorial Library (Office-ML 3022)
--
"Mit der Dummheit kämpfen Götter selbst vergebens"
~ Johann Christoph Friedrich von Schiller
________________________________
From: open-ils-dev-bounces at list.georgialibraries.org [open-ils-dev-bounces at list.georgialibraries.org] on behalf of Ben Shum [bshum at biblio.org]
Sent: Sunday, April 10, 2011 4:53 PM
To: Evergreen Development Discussion List
Subject: Re: [OPEN-ILS-DEV] PHP short tags (was: Website Redesign Patch)
Awesome job with this Anoop! I really enjoy the new design elements and how much community input has gone into this work.
I made a couple of changes to the repo's after Dan committed your changes.
One major thing of note that I would like to seek feedback on: use of short tag <? instead of the full tag <?php
According to my limited research, it seems there's very mixed feelings on this subject in the PHP community. The <?php is always enabled, so tends to be more portable (no matter which server we put the code on, it's supposed to be able to support it), whilst the <? short tag only works if the php.ini file has that option enabled.
Based on the articles I read, I changed all the instances of <? to <?php that I could find.
Links to articles that I found valuable, along with an excerpt from my local php.ini file:
; <? and ?> tags as PHP source which should be processed as such. It's been
; recommended for several years that you not use the short tag "short cut" and
; instead to use the full <?php and ?> tag combination. With the wide spread use
; of XML and use of these tags by other languages, the server can become easily
; confused and end up parsing the wrong code in the wrong context. But because
; this short cut has been a feature for such a long time, it's currently still
; supported for backwards compatibility, but we recommend you don't use them.
; Default Value: On
; Development Value: Off
; Production Value: Off
; http://php.net/short-open-tag
short_open_tag = Off
http://stackoverflow.com/questions/200640/are-php-short-tags-acceptable-to-use
http://perishablepress.com/press/2009/01/12/php-short-open-tag/
On Apr 9, 2011, at 7:20 AM, Dan Scott wrote:
On 8 April 2011 21:46, Atre, Anoop S <anoop.atre at mnsu.edu<mailto:anoop.atre at mnsu.edu>> wrote:
Thanks to everyone who responded here and on the IRC, I have incorporated 99% of the suggestions and here is the updated patch. I also found some errors that I had made and others that were pointed out to me so those have now been fixed. I'm sure other errors will come to light once this is applied and more folks start using the site (hopefully not too many).
Thanks Anoop! I have committed the changes to the Subversion
repository (in two commits, as I missed a large set of the new files
in the first commit).
However, when I went to push those changes live (on the road, early in
the morning - terrible timing on my part), I discovered that the
version of PHP on open-ils.org<http://open-ils.org> hates your code; not your fault,
undoubtedly, it's probably just a much older version of PHP than you
would expect. I had to checkout a previous version of
evergreen-ils.org<http://evergreen-ils.org> (r1319) and revert to that, which is why your
changes aren't visible. I'm thankful that we have version control for
the web site; hopefully no regressions have slipped in.
I'll have more time to look at this on Sunday or Monday. Almost there.
Dan
More information about the Open-ils-dev
mailing list