Fatal error: The script tried to execute a method or access a property of an incomplete object.
| From: | Sturm | Date: | Wed, 02 Jan 2002 02:22:39 +0000 |
| Subject: | Fatal error: The script tried to execute a method or access a property of an incomplete object. | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-79273@lists.php.net to get a copy of this message | ||
I have a problem I'm getting the following error:
Fatal error: The script tried to execute a method or access a property of an
incomplete object. Please ensure that the class definition myappl of the
object you are trying to operate on was loaded _before_ the session was
started in c:\inetpub\wwwroot\advanced\ClientArea.php on line 23
When I try to execute the following code
<?
require('library/const.lib.php');
require('library/style.lib.php');
require('library/form.lib.php');
require('library/application.lib.php'); // This
file defines the class
?>
<html xmlns:move>
<head>
<link rel="stylesheet" type="text/css" href="<? echo
Style::StylesheetDefault() ?>" />
<script language="javascript" src="script/form.js"
type="text/javascript"></script>
</head>
<body class="ClientArea">
<?
if (isset($HTTP_SESSION_VARS['MenuItem'])) {
$MenuItem = $HTTP_SESSION_VARS['MenuItem'];
$appl = $HTTP_SESSION_VARS[APPL_NAME];
switch ($MenuItem) {
case 'WM_FILE_EXIT' :
$appl->ApplExit(); //
This line generates the error
break;
default:
break;
}
}
?>
</body>
</html>
the application.lib.php file looks like this:
<?
if (!defined('__APPLICATION_LIB_PHP__')) {
define('__APPLICATION_LIB_PHP__',1);
class MyAppl
{
var $Version;
function MyAppl()
{
$this->Version = "0.0.0.1";
}
function ApplExit()
{
echo "EXIT";
}
function ApplLogin()
{
}
}
}
?>
Anyone any ideas?
Thanks in advanced
-- Sturm