Ciao a tutti,
Sono nuovo del forum e di php,sto cercando di installare su altervista un programma Openstamanager dopo innumerevoli problemini dovuti alla mia inesperienza sono riuscito finalmente ad arrivare alla pagina di login.
cliccando qui http://tecnicocdc.altervista.org/openstamanager
ora se metto utente e password (admin admin) e premo accedi mi da questo errore:
Fatal error: Class 'Dbo' not found in /membri/tecnicocdc/openstamanager/core.php on line 59
posto il file incriminato:
<?php
header("Content-Type: text/html; charset=UTF-8");
ob_start();
session_start();
$time = microtime();
$time = explode(' ', $time);
$time = $time[1] + $time[0];
$__start = $time;
ini_set("magic_quotes","Off");
ini_set("register_globals","Off");
ini_set( 'date.timezone', 'Europe/Rome' );
//error_reporting( "E_ALL & ~E_NOTICE" );
$script_filename = str_replace( "\\", "/", __FILE__ ); //fix for Windows
$script_name = substr( $script_filename, strrpos($script_filename, "/")+1, 20 );
$docroot = preg_replace( "/\/$/", "", str_replace( "\\", "/", $_SERVER['DOCUMENT_ROOT'] ) );
$rootdir = str_replace( $script_name, "", $script_filename );
$rootdir = substr( str_replace( $docroot, "", $rootdir ), 0, -1 );
$docroot = $docroot.$rootdir;
//short_open_tag deve essere a TRUE
if( ini_get("short_open_tag")==FALSE ){
echo "<center><span>Devi impostare la variabile <b>short_open_tag</b> del tuo <b>php.ini</b> a <big><b>On</b></big>.</span></center>\n";
exit;
}
include_once("config.inc.php");
//Se manca il tema nel config carico quello di default
if( $theme_path=="" ){
$theme = "default";
$theme_path = $rootdir."/share/themes/".$theme;
}
$jscript_modules = array();
$css_modules = array();
$infos = array();
$errors = array();
include($docroot."/lib/dbo.class.php");
include($docroot."/lib/functions.php");
include($docroot."/lib/htmlbuilder.php");
array_push($css_modules, $rootdir."/lib/jscripts/jquery/jquery-ui.custom.css");
array_push($jscript_modules, $rootdir."/lib/jscripts/jquery.js");
array_push($jscript_modules, $rootdir."/lib/jscripts/jquery/jquery-ui.custom.min.js");
array_push($jscript_modules, $rootdir."/lib/jscripts/jquery/jquery.ui.datepicker-it.js");
array_push($jscript_modules, $rootdir."/lib/jscripts/functions.js");
array_push($css_modules, $theme_path."/style.css");
$dbo = new Dbo();
$dbo->Connect();
?>
da quanto ho capito questo file si collega a questo dbo.class.php
<?
/*
DATABASE CLASS
*/
class Dbo{
//connection to the DBMS
function connect(){
global $db_host;
global $db_username;
global $db_password;
global $db_name;
if( $conn = @mysql_connect( $db_host, $db_username, $db_password ) )
if( @mysql_select_db($db_name, $conn) )
return "ok";
else
return mysql_error();
else
return mysql_error();
}
//query on the table
function query($sql){
if( @mysql_query($sql) ){
$id = mysql_insert_id();
if( $id==0 )
return 1;
else
return $id;
}
else{
write_error( mysql_error(),"300px" );
return false;
}
}
//fetch row
function fetchRow($sql){
$rows = @mysql_fetch_row( mysql_query($sql) ) or write_error( mysql_error(),"300px" );
return $rows;
}
//record count
function fetchNum($sql, $hide_error=0){
if( $hide_error==0 )
$num = @mysql_num_rows( mysql_query($sql) ) or write_error( mysql_error(),"300px" );
else
$num = @mysql_num_rows( mysql_query($sql) );
return $num;
}
//fetch records
function fetchArray($sql){
$i=0;
if( $q=@mysql_query($sql) )
while( $rs=mysql_fetch_array( $q, MYSQL_ASSOC ) ){
$array[$i]=$rs;
$i++;
}
else
if( $hide_error==0 )
write_error( mysql_error(),"300px" );
return $array;
}
//fetch records (numero al posto del nome del campo)
function fetchRows($sql){
$i=0;
if( $q=@mysql_query($sql) )
while( $rs=mysql_fetch_row($q) ){
$array[$i]=$rs;
$i++;
}
else
if( $hide_error==0 )
write_error( mysql_error(),"300px" );
return $array;
}
//Returns the last inserted record
function last_inserted_id(){
return mysql_insert_id();
}
//Esegue più query prese da un dump SQL
function multiQuery( $filename, $delimiter = ';' ) {
$inString = false;
$escChar = false;
$sql = '';
$stringChar = '';
$queryLine = array();
$queryBlock = file_get_contents( $filename );
$sqlRows = split ( "\n", $queryBlock );
$delimiterLen = strlen ( $delimiter );
do {
$sqlRow = current ( $sqlRows ) . "\n";
$sqlRowLen = strlen ( $sqlRow );
for ( $i = 0; $i < $sqlRowLen; $i++ ) {
//if ( ( substr ( ltrim ( $sqlRow ), $i, 2 ) === '--' || substr ( ltrim ( $sqlRow ), $i, 1 ) === '#' ) && !$inString ) {
if ( ( substr ( ltrim ( $sqlRow ), $i, 2 ) === '--' ) && !$inString ) {
break;
}
$znak = substr ( $sqlRow, $i, 1 );
if ( $znak === '\'' || $znak === '"' ) {
if ( $inString ) {
if ( !$escChar && $znak === $stringChar ) {
$inString = false;
}
}
else {
$stringChar = $znak;
$inString = true;
}
}
if ( $znak === '\\' && substr ( $sqlRow, $i - 1, 2 ) !== '\\\\' ) {
$escChar = !$escChar;
}
else {
$escChar = false;
}
if ( substr ( $sqlRow, $i, $delimiterLen ) === $delimiter ) {
if ( !$inString ) {
$sql = trim ( $sql );
$delimiterMatch = array();
if ( preg_match ( '/^DELIMITER[[:space:]]*([^[:space:]]+)$/i', $sql, $delimiterMatch ) ) {
$delimiter = $delimiterMatch [1];
$delimiterLen = strlen ( $delimiter );
}
else {
$queryLine [] = $sql;
}
$sql = '';
continue;
}
}
$sql .= $znak;
}
} while ( next( $sqlRows ) !== false );
foreach( $queryLine as $singleQuery ){
mysql_query( $singleQuery );
}
}
//closing db connection
function close(){
@mysql_close();
}
}
?>
allego anche il file config.inc
<?
$script_filename = str_replace( "\\", "/", __FILE__ ); //fix for Windows
$script_name = substr( $script_filename, strrpos($script_filename, "/")+1, 20 );
$docroot = preg_replace( "/\/$/", "", str_replace( "\\", "/", $_SERVER['DOCUMENT_ROOT'] ) );
$rootdir = str_replace( $script_name, "", $script_filename );
$rootdir = "/openstamanager";
$docroot = "/membri/tecnicocdc/openstamanager";
$theme = "default";
$theme_path = $rootdir."/share/themes/".$theme;
$theme = "default";
$theme_path = $rootdir."/share/themes/".$theme;
$db_engine = "mysql";
$db_host = "localhost";
$db_username = "tecnicocdc";
$db_password = "metallica";
$db_name = "my_tecnicocdc";
?>
GRAZIE A CHIUNQUE MI POSSA AIUTARE