500 Server error returned for valid content



Legacy PHP system
7 years ago
6 years ago


(Reporter: John Dennis, Unassigned)


Firefox Tracking Flags

(Not tracked)




7 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv: 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:


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:


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. 


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...
Connecting to www.mozilla.org||: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] 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.
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.

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.
Last Resolved: 6 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.