| Summary: | Use the full PHP open tag <?php not just the <? | ||
|---|---|---|---|
| Product: | Community | Reporter: | Wayne Beaton <wayne.beaton> |
| Component: | Website | Assignee: | phoenix.ui <phoenix.ui-inbox> |
| Status: | RESOLVED WONTFIX | QA Contact: | |
| Severity: | minor | ||
| Priority: | P3 | CC: | denis.roy, info, jasonweathersby, nathan |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| URL: | http://download.eclipse.org/birt/downloads/ | ||
| Whiteboard: | |||
|
Description
Wayne Beaton
Wayne, We have not changed these sites lately. Do you know if anything on the server has changed? Jason Nathan, can you take a quick look? last november I did copy the Nova theme to here: /home/data/httpd/download.eclipse.org/birt/downloads/eclipse.org-common/themes/ Those are included in all the php files like: <?php require_once($_SERVER['DOCUMENT_ROOT'] . "/birt/downloads" . "/eclipse.org-common/system/app.class.php"); require_once($_SERVER['DOCUMENT_ROOT'] . "/birt/downloads" . "/eclipse.org-common/system/nav.class.php"); require_once($_SERVER['DOCUMENT_ROOT'] . "/birt/downloads" . "/eclipse.org-common/system/menu.class.php"); require "download.inc"; $App = new App(); $Nav = new Nav(); $Menu = new Menu(); include($App->getProjectCommon()); Not certain how this would cause the issue though. I'd recommend you update your eclipse.org-common as a first step. Then i can take another look at it. Update: Looks like this may be a server config issue with download.eclipse.org Nova/header.php The open tag is <? instead of <?php On the new download server, I had not enabled short open tags. I've changed this -- but we should always use <?php to indicate the beginning of script. Can you fix header.php and check others? Moving to Phoenix Denis, Should I change this on the download server? Jason > Should I change this on the download server?
Jason, I would simply wait for us (Nathan) to fix the files in the master copy of eclipse.org-common. You could then simply update your copy in your Birt directory. That way you get all the updates that Nathan has put in.
Renaming the bug. We can use <?= $variable ?> in HTML without problems... But for code blocks we should use <?php ?> for maximum compatibility. We should do a scan of e.o-c to fix this. There are four different pairs of opening and closing tags which can be used in php. Two of those, < ? php ?> and < script language="php"> < /script>, are always available. The other two are short tags and ASP style tags, and can be turned on and off from the php.ini configuration file. As such, while some people find short tags and ASP style tags convenient, they are less portable, and generally not recommended. In my experience most servers do have short tags enabled. Typing <?= is far more convenient than typing <?php echo The programmers convenience is an important factor, so why are they not recommended? James, First, I have removed the shameless plug to your term papers website. It is not appropriate here, and I'm frankly bored with all the SPAM for term paper websites I've been removing lately -- mostly on our Wiki. Second, your experience may be a bit lacking, since most Entreprise distros disable PHP short_open_tags by default. Additionally, short_open_tags is disabled by default in PHP 5.3+, and it's possible it may be deprecated for php 6.0. We have thousands of hits for this on www.eclipse.org, so we're likely stuck with the short open tags for a while. Let's just agree to use the long form when developing new pages. |