1
wishcraft
XOOPS 2.5.8 ~ Error : Error: Class 'Xmf\IPAddress' not found

Hey how are you all going? I thought I would enquire about this bug I have just found upgrading labs.coop to XOOPS 2.5.8 ~ do you test this on an Ubuntu environment or WAMP cause it upgradedhttp://helpingkidsfoundation.org/ without any worries but when I put it onhttp://labs.coop I get the following error:

Quote:

A problem has occurred on our server!
Page is currently unavailable

We are working on a fix
Please come back soon ...

Error : Error: Class 'Xmf\IPAddress' not found


Notabilty I know trabis has been working on a new Xmf wrapping handler this is obviously it but for some reason It is throwing this error, if you need a copy of the filebase and database let me know, also seeming there will have to be now a XOOPS 2.5.9 can I request for load balancing the following changes to the MySQL Database for the final before we cross over to the next database handling platform in XOOPS 2.6..

// changes for SQL Transaction for Single End Session Writting ~ Load balancing
// class/database/mysqldatabase.php
class XoopsMySQLDatabase extends XoopsDatabase
{
    
/**
     * Database connection
     *
     * @var mysqli
     */
    
public $conn;


    
/**
     * fired with the class destructs
     *
     */
    
public function __destruct()
    {
        
$this->queryF('COMMIT');
    }

    
/**
     * connect to the database
     *
     * @param bool $selectdb select the database now?
     * @return bool successful?
     */
    
public function connect($selectdb true)
    {
        static 
$db_charset_set;
        if (!
extension_loaded('mysqli')) {
            
trigger_error('notrace:mysqli extension not loaded'E_USER_ERROR);

            return 
false;
        }

        
$this->allowWebChanges = ($_SERVER['REQUEST_METHOD'] !== 'GET');

        if (
$selectdb) {
            
$dbname constant('XOOPS_DB_NAME');
        } else {
            
$dbname '';
        }
        if (
XOOPS_DB_PCONNECT == 1) {
            
$this->conn = new mysqli('p:' XOOPS_DB_HOSTXOOPS_DB_USERXOOPS_DB_PASS$dbname);
        } else {
            
$this->conn = new mysqli(XOOPS_DB_HOSTXOOPS_DB_USERXOOPS_DB_PASS$dbname);
        }

        if (!
$this->conn) {
            
$this->logger->addQuery(''$this->error(), $this->errno());

            return 
false;
        }
        if (!isset(
$db_charset_set) && defined('XOOPS_DB_CHARSET') && XOOPS_DB_CHARSET) {
            
$this->queryF("SET NAMES '" XOOPS_DB_CHARSET "'");
        }
        
$db_charset_set 1;
        
$this->queryF('SET SQL_BIG_SELECTS = 1');
    
        
// Start SQL Transaction
        
$this->queryF('START TRANSACTION');

        return 
true;
    }
    
    
//.......
    
}


Notice the changes is only introducing a __destruct as well as 1 line added to the connect with is calling the Opening to an SQL Transaction and is commited when the class to the database destructs...

Download a Font ~http://fonts.labs.coop

Resized Image

Resized Image

Web Font: *.zip | *.7z | *.rar |*.tar.gz

2
Cesagonchu
Re: XOOPS 2.5.8 ~ Error : Error: Class 'Xmf\IPAddress' not found

Thanks for sharing!

3
geekwright
Re: XOOPS 2.5.8 ~ Error : Error: Class

For the record, 2.5.8 was extensively tested on multiple Linux variants as well as multiple stacks on Windows. Somehow, you are skipping the autoloader if Xmf\IPAddress can't be found. The autoloader is started when class/xoopsload.php is included.

For the database transactions, we stay in the default autocommit mode unless the application (module) says otherwise. Since the core uses MyISAM by default, there is no benefit to an explicit transaction, so we don't interfere. For application use, forcing a transaction would break things, since in MySQL transactions cannot nest. It also gets complicated if you are using DDL in the application.

The autocommit behavior already accomplishes what you suggest adding, and the application can easily change that by issuing its own START TRANSACTION.

Lots of the details change in 2.6, and explicit transactions are already used there.

Login

Who's Online

266 user(s) are online (147 user(s) are browsing Support Forums)


Members: 0


Guests: 266


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Mar 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits