Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 178142 - [build.eclipse] Can't find Phoenix!
Summary: [build.eclipse] Can't find Phoenix!
Status: RESOLVED FIXED
Alias: None
Product: Community
Classification: Eclipse Foundation
Component: Servers (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Eclipse Webmaster CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 166916 175875
Blocks: 178148
  Show dependency tree
 
Reported: 2007-03-19 16:52 EDT by Nick Boldt CLA
Modified: 2007-03-21 11:39 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Boldt CLA 2007-03-19 16:52:39 EDT
[Request] 

Can you symlink Phoenix from its location on www.eclipse to a common location on build.eclipse?

[Rationale]

When I try to resolve $_SERVER['DOCUMENT_ROOT'], I get /opt/local/data/httpd/www.eclipse.org/html, which doesn't contain org.eclipse-common (Phoenix), and so standard Phoenix'y things all fail to load (app.class.php, nav.class.php, menu.class.php, etc.)

[Hack]

As a workaround, if I hack the script to force $_SERVER['DOCUMENT_ROOT'] to be equal to /opt/public/modeling, where I've checked out my own copy of Phoenix, I get this, with broken css and images (presumably due to absolute path references?):

http://build.eclipse.org/modeling/mdt/?skin=Phoenix

The only skin that doesn't fall apart is the PlainText one, which is functional but lacks the clean formatting of the normal skin:

http://build.eclipse.org/modeling/mdt/?skin=PlainText

This is workable, but it means I have to check the $_SERVER["SERVER_NAME"] to determine if I should force $_SERVER['DOCUMENT_ROOT'] = "/opt/public/modeling"; for all my scripts, in order for them to run on emft.eclipse and build.eclipse using the same code. In other words, it's a hack. ;-)
Comment 1 Nick Boldt CLA 2007-03-19 17:22:12 EDT
Checking over some old bugs, I realize this ties in with bug 166916, which is "sortafixed".
Comment 2 Denis Roy CLA 2007-03-19 21:19:38 EDT
I'll install Phoenix on build.eclipse.org for you, as this is the right thing to do ... but I have a few global changes that need to be committed first, so can this hold off a few days?  One of those changes is the relative/absolute links.
Comment 3 Denis Roy CLA 2007-03-19 21:24:39 EDT
Cancel that last comment ... I'm not going to make you wait for something that can be done now. I installed Phoenix on build.eclipse.org, so everything looks fine.  Of course, the links in the top and left nav are relative to www.eclipse.org, but that's fixed by bug 175875 which will be released shortly.  I'll leave this bug open as a reminder to upgrade Phoenix to the latest code.
Comment 4 Nick Boldt CLA 2007-03-20 11:21:41 EDT
Thanks, Denis, this works great - I don't need the "only use PlainText" hack anymore. However, I do still need this hack:

$_SERVER['DOCUMENT_ROOT'] = $_SERVER["SERVER_NAME"] == "build.eclipse.org" ? "/opt/public/modeling" : $_SERVER['DOCUMENT_ROOT'];

Do you think this is related to bug 175875? The issue is that on build.eclipse, when $_SERVER['DOCUMENT_ROOT'] == "/opt/local/data/httpd/www.eclipse.org/html", phoenix pages won't run (and because I can't do ini_set("display_errors","1"); (presume you've locked that out in the php.ini or apache conf?) I can't actually see the error messages for debugging). 

If you look at the http error logs, you should see a problem recorded a little while ago for http://build.eclipse.org/modeling/mdt/eodm/build/ (I removed the hack to test if it was still required, got a blank page, and then put the hack back.)
Comment 5 Denis Roy CLA 2007-03-20 11:41:50 EDT
> If you look at the http error logs, you should see a problem recorded a little
> while ago for http://build.eclipse.org/modeling/mdt/eodm/build/ (I removed the
> hack to test if it was still required, got a blank page, and then put the hack
> back.)

The problem reported is that you're trying to reference a page through a symbolic link, which is not permitted. However, unlike on www.eclipse.org where all the content resides under DOCUMENT_ROOT, you cannot do that here on build, as http://build.eclipse.org/modeling is not physically located in the same directory as DOCUMENT_ROOT.

I suggest you keep your includes relative.  So instead of :

require_once ($_SERVER['DOCUMENT_ROOT'] . "/modeling/mdt/build/build-common.php");

I would try something like:
require_once ("../mdt/build/build-common.php");

On a side note, you need to ini_set("display_errors","1"); *AND* ini_set("error_reporting", 2147483647); where  2147483647 is an integer representation of E_ALL.
Comment 6 Denis Roy CLA 2007-03-20 13:27:18 EDT
The latest version of Phoenix has been installed on build.eclipse.org - this includes absolute paths for common links when the server != www.eclipse.org

I don't think I have anything left to do here, but let me know if you need assistance with anything else.
Comment 7 Nick Boldt CLA 2007-03-20 14:44:51 EDT
(In reply to comment #6)
> I don't think I have anything left to do here, but let me know if you need
> assistance with anything else.

I think we're good. I had a problem w/ symlink resolution inside /opt/public/modeling/public_html but I've found a workaround for that (moving files and symlinking in the reverse direction). This means that files are actually build inside public_html instead of another folder and symlinked in, as I've done w/ emf.toro and emft.eclipse.
Comment 8 Nick Boldt CLA 2007-03-21 11:39:42 EDT
Closing.