Radicore Forum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » RADICORE development » Framework » Fatal error at logon
Fatal error at logon [message #1998] Mon, 20 April 2009 19:21 Go to next message
gpatti is currently offline  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 messageGo to next message
AJM is currently offline  AJM
Messages: 2309
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.


Re: Fatal error at logon [message #2000 is a reply to message #1998] Tue, 21 April 2009 04:42 Go to previous messageGo to next message
gpatti is currently offline  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 messageGo to next message
AJM is currently offline  AJM
Messages: 2309
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.

Re: Fatal error at logon [message #2002 is a reply to message #1998] Tue, 21 April 2009 05:01 Go to previous messageGo to next message
gpatti is currently offline  gpatti
Messages: 283
Registered: August 2008
Senior Member
Not sure whether I'll be able to use debugging on the production server. I don't have any control of it.
Can you give me an idea of what data gets populated in lookup_data prior to the login screen being displayed. I'll have a check in the database then.
Re: Fatal error at logon [message #2003 is a reply to message #2002] Tue, 21 April 2009 05:24 Go to previous messageGo to next message
AJM is currently offline  AJM
Messages: 2309
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.


Re: Fatal error at logon [message #2004 is a reply to message #1998] Tue, 21 April 2009 05:33 Go to previous messageGo to next message
gpatti is currently offline  gpatti
Messages: 283
Registered: August 2008
Senior Member
I agree, and I do this too. All the code is running perfectly fine on the test server. The issue is only occurring on the production server. I am really suspecting database corruption.

The error even occurs running logon.php. So I'm not even getting as far as logging in. The error occurs BEFORE the login screen is displayed.

If you want to see this you can try http://www.medaltest.com/menu/logon.php

So the error is occuring within the menu application, of which no code has been changed. This is why I am suspecting some database corruption, but am struggling how to identify it on the production server.
Re: Fatal error at logon [message #2005 is a reply to message #1998] Tue, 21 April 2009 05:39 Go to previous messageGo to next message
gpatti is currently offline  gpatti
Messages: 283
Registered: August 2008
Senior Member
I've had an idea... I'm going to unload the production menu database and load it onto my development server. Then I can see if the error is duplicated on the dev server and run with my debugger to identify it.
Re: Fatal error at logon [message #2006 is a reply to message #1998] Tue, 21 April 2009 06:01 Go to previous messageGo to next message
gpatti is currently offline  gpatti
Messages: 283
Registered: August 2008
Senior Member
That hasn't shed any light on the problem. The dev system works fine, even with the data loaded from the production menu database. I think my next course of action is a complete reload of all the code.
Re: Fatal error at logon [message #2007 is a reply to message #2005] Tue, 21 April 2009 06:04 Go to previous messageGo to next message
AJM is currently offline  AJM
Messages: 2309
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.


Re: Fatal error at logon [message #2008 is a reply to message #1998] Tue, 21 April 2009 06:37 Go to previous message
gpatti is currently offline  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
Previous Topic: why web framework for applications?
Next Topic: my SubSystem files
Goto Forum:
  


Current Time: Wed Sep 28 12:37:40 EDT 2022

Total time taken to generate the page: 0.01651 seconds