[SOLVED] TT-Gallery2 (or 3?) requires short_open_tag = On

hrk
Bear Rating Disaster
Bear Rating Disaster
Posts: 75
Joined: 24 Apr 2013, 12:39

[SOLVED] TT-Gallery2 (or 3?) requires short_open_tag = On

Postby hrk » 30 Sep 2013, 12:12

I followed the README, and I get a page w/ wrong HTML: all links show an unescaped <? echo $self_uri ?>.
[url]REMOVED[/url] (it's just a test url, you won't find bear images there, sorry)

I guess I am missing something, but it's something not documented in the README and that I never saw before. From the 30seconds I gave to Bootstrap framework's homepage, it looks like it's not something I have to configure, and that's already integrated in the source files.

e: it looks like I have short_open_tag disabled by default on my production server. Who knows why.

e2: got why. :)
; This directive determines whether or not PHP will recognize code between
; <? 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
Last edited by hrk on 30 Sep 2013, 20:27, edited 2 times in total.

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: TT-Gallery2 (or 3?) and echo $self_uri

Postby fox » 30 Sep 2013, 12:23

Yeah it probably isn't shorttag clean because I never bothered to fix it. You can replace <? with <?php alternatively.

e: fixed in trunk

hrk
Bear Rating Disaster
Bear Rating Disaster
Posts: 75
Joined: 24 Apr 2013, 12:39

Re: [SOLVED] TT-Gallery2 (or 3?) requires short_open_tag = O

Postby hrk » 30 Sep 2013, 12:26

Are you still working on it?/Do you accept pushes?
In the echo $self_uri it looks like <?=$self_uri?> should work. I could replace it and push through github.

e: you're too fast. [And I graduated from trainee to disaster]

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: [SOLVED] TT-Gallery2 (or 3?) requires short_open_tag = O

Postby fox » 30 Sep 2013, 12:33

<?= is the same short tag thing which is sometimes disabled and thus some people argue should be avoided. I don't use it anymore personally.


Return to “Everything else”

Who is online

Users browsing this forum: No registered users and 2 guests