500 Server error returned for valid content

RESOLVED WORKSFORME

Status

www.mozilla.org
Legacy PHP system
RESOLVED WORKSFORME
7 years ago
6 years ago

People

(Reporter: John Dennis, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

7 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.16) Gecko/20110322 Fedora/3.6.16-1.fc14 Firefox/3.6.16
Build Identifier: 

I recently was given SVN access to create content on mozilla.org. The page I created was:

http://www.mozilla.org/projects/security/pki/python-nss/

It can be accessed externally as expected. However some links from that page are failing. There is a link on that page called "python-nss API documentation" which points to:

http://www.mozilla.org/projects/security/pki/python-nss/doc/api/current/html/index.html

That file exists in SVN. However trying access it externally produces a
500 Internal Server Error and any of the intermediate directories
generate a 403 Forbidden error.

Having discussed the problem with several other team members we're baffled as to why.

Is there documentation for web content authors which might detail something we've unintentionally omitted (.htaccess files?)?

Can you help us resolve the problem?

This is the SVN URL used to check in the content. 

svn.mozilla.org/projects/mozilla.org/trunk/projects/security/pki/python-nss



Reproducible: Always

Steps to Reproduce:
$ wget http://www.mozilla.org/projects/security/pki/python-nss/doc/api/current/html/index.html


Actual Results:  
$ wget http://www.mozilla.org/projects/security/pki/python-nss/doc/api/current/html/index.html
--2011-04-27 09:41:13--  http://www.mozilla.org/projects/security/pki/python-nss/doc/api/current/html/index.html
Resolving www.mozilla.org... 63.245.217.21
Connecting to www.mozilla.org|63.245.217.21|:80... connected.
HTTP request sent, awaiting response... 500 Internal Server Error
2011-04-27 09:41:14 ERROR 500: Internal Server Error.


Expected Results:  
index.html returned.

Comment 1

6 years ago
The issue here is that the server is attempting to serve HTML pages via the PHP interpreter:

[Thu Aug 23 13:13:59 2012] [error] [client 10.8.81.216] PHP Parse error:  syntax error, unexpected T_STRING in /data/www/www.mozilla.org/org/projects/security/pki/python-nss/doc/api/current/html/index.html on line 1

I suspect this will be difficult to unravel- parts of the www.mozilla.org codebase *expect* that to happen, and don't work otherwise. In any case, it's not something we (IT/WebOps) can fix. I'm punting this to the "www.mozilla.org" product, which might be able to help out.
Status: UNCONFIRMED → NEW
Component: Server Operations: Projects → Legacy PHP system
Ever confirmed: true
Product: mozilla.org → www.mozilla.org
QA Contact: mrz
John: You should remove the XML header. Our pages are served with text/html anyway.
(Reporter)

Comment 3

6 years ago
O.K. I removed the <?xml> declaration from all the files and now everything works. Thanks for the tip. Much appreciated, I would not have guessed that was the issue.

I'm not loving the solution because these files are auto generated (by epydoc) and there is no way to prevent it from adding the <?xml> declaration, which is perfectly valid.

So I have a little script I run after generating the files which nukes the xml declaration. It works, but it would be nicer if you just served the pages by their filename extension, oh well.
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.