php code showing error

Hi all I hope you can help, I have been given a PHP project which is causing some problems. I am getting the error below. I am looking at the code but I can not for the life of me see what the problem is. I am sure some one with a php brain will pick it up right away. I am quite new to php and eny help will be very much appreciated!

Error on page:
[b]Syntax error in file: /homepages/34/d281596727/htdocs/APR/adodb/drivers/adodb-db425884790.inc.php

Fatal error: Class ‘ADODB_db425884790’ not found in /homepages/34/d281596727/htdocs/APR/adodb/Iakt/KT_adodb.inc.php on line 52[/b]

[php]<?php
// Copyright 2001-2003 Interakt Online. All rights reserved.

//Added by Interakt
//New Connection class
//this will implement FieldHasChange for

global $ADODB_NEWCONNECTION;
$ADODB_NEWCONNECTION = ‘KTNEWConnection’;

function &KTNEWConnection($db=’’) {
GLOBAL $ADODB_LASTDB;
if (!defined(‘ADODB_ASSOC_CASE’)){
define(‘ADODB_ASSOC_CASE’,2);
}
$errorfn = (defined(‘ADODB_ERROR_HANDLER’)) ? ADODB_ERROR_HANDLER : false;
$rez = true;
if ($db) {
if ($ADODB_LASTDB != $db){
ADOLoadCode($db);
}
} else {
if (!empty($ADODB_LASTDB)) {
ADOLoadCode($ADODB_LASTDB);
} else {
$rez = false;
}
}

if (!$rez) {
	 if ($errorfn) {
		// raise an error
		$errorfn('ADONewConnection', 'ADONewConnection', -998,
				 "Could not load the database driver for $db",
				 $dbtype);
	} else{
		 ADOConnection::outp( "<p>ADONewConnection: Unable to load database driver for '$db'</p>",false);
	}
	return false;
}


$cls = 'ADODB_'.$ADODB_LASTDB;

if (file_exists(ADODB_DIR.'/Iakt/drivers/KT_adodb-'.$ADODB_LASTDB.'.inc.php') && is_readable(ADODB_DIR.'/Iakt/drivers/KT_adodb-'.$ADODB_LASTDB.'.inc.php')){
		require_once(ADODB_DIR.'/Iakt/drivers/KT_adodb-'.$ADODB_LASTDB.'.inc.php');
		if (class_exists('KT_'.$cls))	{
				$cls = 'KT_' . $cls;
		}
}

$obj = & new $cls();

if (class_exists('KT_ADORecordSet_'.$ADODB_LASTDB)){
		$obj->rsPrefix = 'KT_ADORecordSet_';
}

if ($errorfn){
          $obj->raiseErrorFn = $errorfn;
}

return $obj;

}

/*
NAME:
	unescapeQuotes
DESCRIPTION:
	if the magic_quotes_runtime are on unescape the text
	ADDED BY IAKT!
PARAMETERS:
	$text - string - escaped string
RETURN:
	string - unescaped string
*/
function unescapeQuotes($text) {
	if (get_magic_quotes_runtime()) {
		return stripslashes($text);
	} else {
		return $text;
	}
}

?>
[/php]

[ol][li]the first error you getting is a syntax error from the require_once item on line 46 named db425884790.inc.php.
[/li]
[li]the second error means, you are calling or trying to inherit from a class that does not exist. if it does exist maybe you forgot to include the corresponding files.
[/li][/ol]

Good luck

Sponsor our Newsletter | Privacy Policy | Terms of Service