Fatal error at logon [message #1998] |
Mon, 20 April 2009 19:21 ![Go to next message Go to next message](/theme/default/images/down.png) |
gpatti
Messages: 283 Registered: August 2008
|
Senior Member |
|
|
Tony,
In my production environment I have just started getting a fatal error at logon (happening for all users). I'm not sure whether it relates to me updating the version of std.table.class.inc (that we were discussing earlier today in another thread) although replacing the old version has not solved the issue, so it looks to be coincidental, unless I have accidentally changed something else.
Looking at the code it is some kind of unhandled exception, but I don't understand the get_class($exception) that is being returned.
The error displayed on screen is:
Fatal Error: Uncaught exception fron DOMException, message = Invalid Character Error (# 256).
Error in line 286 of file '/home/medaltes/domains/medaltest.com/includes/error.inc'.
Script: /menu/menu.php
User Id: GPATTISON
Remote Address: 62.49.26.129
Request URI: /menu/menu.php?session_name=menu6&selection=medals
The following is found in errorlog.html:
</pre>
<h2>2009-04-20 19:39:50</h2><p>Fatal Error: Uncaught exception fron DOMException, message = Invalid Character Error (# 256).</p><p>Error in line 286 of file '/home/medaltes/domains/medaltest.com/includes/error.inc'.</p ><p>Script: /menu/menu.php</p><p>User Id: GPATTISON</p><p>Remote Address: 62.49.26.129</p><p>Request URI: /menu/menu.php?session_name=menu6&selection=medals</p>
<p>Page Stack:</p>
<pre>
[0] medals
</pre>
<pre>
0: array =
file: string = /home/medaltes/domains/medaltest.com/includes/include.xml.ph p5.inc
line: integer = 395
function: string = createElement
class: string = DOMDocument
type: string = ->
args: array =
0: string = 0
1: array =
file: string = /home/medaltes/domains/medaltest.com/includes/include.xml.ph p5.inc
line: integer = 372
function: string = addLookup2XMLdoc
args: array =
0: array =
0: array =
: string =
1: array =
: string =
2: array =
file: string = /home/medaltes/domains/medaltest.com/includes/include.xml.ph p5.inc
line: integer = 646
function: string = addData2XMLdoc
3: array =
file: string = /home/medaltes/domains/medaltest.com/public_html/menu/menu.p hp
line: integer = 147
function: string = buildXML
args: array =
4: array =
</pre>
Can you help with any explanations?
Thanks,
Graham
[Updated on: Mon, 20 April 2009 19:45] Report message to a moderator
|
|
|
Re: Fatal error at logon [message #1999 is a reply to message #1998] |
Tue, 21 April 2009 04:24 ![Go to previous message Go to previous message](/theme/default/images/up.png) ![Go to next message Go to next message](/theme/default/images/down.png) |
AJM
Messages: 2361 Registered: April 2006 Location: Surrey, UK
|
Senior Member |
|
|
There is something invalid which is trying to be inserted into the XML document. The error is triggered in file include.xml.php5.inc at line 395 where it calls the createElement() function. The error log shows that the argument is the value '0' (zero) when it should be a string. It would appear that you have added something to $this->lookup_data without giving it a name. This should be an associative array, not an indexed array.
Tony Marston
http://www.tonymarston.net
http://www.radicore.org
|
|
|
Re: Fatal error at logon [message #2000 is a reply to message #1998] |
Tue, 21 April 2009 04:42 ![Go to previous message Go to previous message](/theme/default/images/up.png) ![Go to next message Go to next message](/theme/default/images/down.png) |
gpatti
Messages: 283 Registered: August 2008
|
Senior Member |
|
|
Tony,
I use a tailored login screen for my app so thought that the problem was occurring during the login process. However, investigating further, I have discovered that the error occurs even if I try and access the standard login screen directly. That is to say, the error is occurring just trying to run /menu/menu.php and BEFORE the login screen is even displayed (and presumably therefore, before I am running any user defined code).
I am wondering whether it's either to do with XSL transormations (and have asked my hosting company to investigate that) or whether I have some corruption in the menu database.
Would you concur with either of those thoughts and have any suggestions as to how I might track to the point of error?
Incidentally - the problem only occurs on the production server, not on my local copy.
Thanks,
Graham
[Updated on: Tue, 21 April 2009 04:44] Report message to a moderator
|
|
|
Re: Fatal error at logon [message #2001 is a reply to message #2000] |
Tue, 21 April 2009 04:51 ![Go to previous message Go to previous message](/theme/default/images/up.png) ![Go to next message Go to next message](/theme/default/images/down.png) |
AJM
Messages: 2361 Registered: April 2006 Location: Surrey, UK
|
Senior Member |
|
|
The error is definitely occuring in the addLookup2XMLdoc() function, so the contents of $this->lookup_data is invalid. It has nothing to do with the XSL transformation. You need to step though with your debugger to see where $this->lookup_data is being filled with invalid data.
Tony Marston
http://www.tonymarston.net
http://www.radicore.org
|
|
|
|
Re: Fatal error at logon [message #2003 is a reply to message #2002] |
Tue, 21 April 2009 05:24 ![Go to previous message Go to previous message](/theme/default/images/up.png) ![Go to next message Go to next message](/theme/default/images/down.png) |
AJM
Messages: 2361 Registered: April 2006 Location: Surrey, UK
|
Senior Member |
|
|
It is standard practice to have a test server where you can test your amendments before you release them to the production server. The test server should be competely under your control (such as your local PC) so you should have no problem with installing a debugger.
I personally do all my development work on a laptop which runs Apache, MySQL, PostgreSQL and Oracle. My IDE is Zend which has its own debugger.
Tony Marston
http://www.tonymarston.net
http://www.radicore.org
|
|
|
|
|
|
Re: Fatal error at logon [message #2007 is a reply to message #2005] |
Tue, 21 April 2009 06:04 ![Go to previous message Go to previous message](/theme/default/images/up.png) ![Go to next message Go to next message](/theme/default/images/down.png) |
AJM
Messages: 2361 Registered: April 2006 Location: Surrey, UK
|
Senior Member |
|
|
You might also check the contents of 'logon.class.inc' and 'mnu_user.class.inc' to ensure that nothing has been corrupted. These classes are referenced without accessing the database in order to construct the logon screen. You might want to reload the files on the production server to ensure they are exactly the same as on your test server.
The error message definitely shows that $this->lookup_data contains entries which have an index number, not an index name, and numeric names are invalid in XML.
The attached update will detect and report the error properly instead of producing a DOMException.
Tony Marston
http://www.tonymarston.net
http://www.radicore.org
|
|
|
Re: Fatal error at logon [message #2008 is a reply to message #1998] |
Tue, 21 April 2009 06:37 ![Go to previous message Go to previous message](/theme/default/images/up.png) |
gpatti
Messages: 283 Registered: August 2008
|
Senior Member |
|
|
Having recopied the contents of /menu from the dev server to the prod server the problem has cleared. I had clearly somehow corrupted one of the files in this subsystem.
I have included the updated error reporting mods, but we'll have to wait for a future error to see that in action now!
Thanks again for your very speedy assistance.
Graham
|
|
|