• Welcome to the Chevereto User Community!

    Here, users from all over the world come together to learn, share, and collaborate on everything related to Chevereto. It's a place to exchange ideas, ask questions, and help improve the software.

    Please keep in mind:

    • This community is user-driven. Always be polite and respectful to others.
    • Support development by purchasing a Chevereto license, which also gives you priority support.
    • Go further by joining the Community Subscription for even faster response times and to help sustain this space
  • Chevereto Support CLST

    Support response

    Support checklist

    • Got a Something went wrong message? Read this guide and provide the actual error. Do not skip this.
    • Confirm that the server meets the System Requirements
    • Check for any available Hotfix - your issue could be already reported/fixed
    • Read documentation - It will be required to Debug and understand Errors for a faster support response

No dB tables installation during upgrade

Status
Not open for further replies.

Enky

Chevereto Member
Hi,

I'm trying ton upgrade from the previous database less version of Chevreto to the last one (with database) and it's look like not working.

My database was empty, no tables.
Code:
mysql> show tables;
Empty set (0.00 sec)

When I try to launch the update.php I get this error :


The update Script can set the maintenance mode

Please try again in a few moments. This is caused for this SQL error: [SQL 42S02] [mysql 1146] > Table '***.chv_options' doesn't exist

So chevreto can find the database but I dont know why it don't want to create my schema ...


I put the error_reporting tag to true but nothing append.

any idea ?

Regards
Justin
 
Once Chevereto loads it always check/repair/install the tables, and if it can't do this job it will always shout the chevereto_die() function. This means that if you load the update script and you see the instructions the tables should be already created at this point. I think that the problem is that this queries are made using PDO::exec which doesn't trow a PDOExeption on failure, it just return the number of affected rows (0 which can be evaluated as FALSE).

This means that (1) It must be changed to PDO->prepare or (2) I must try to insert the PDOException from the FALSE PDO::exec. It will be useful if you can provide me FTP access so I can wrote the new method and test it right away.
 
Problem; it's on my test platform with no access to internet...

BTW you can give me the hotfix and I can test.
 
Humm it's look like not working ...

I change the file

-rw-r--r-- 1 www-data www-data 12293 Jun 27 21:11 class.db.php
-rw-r--r-- 1 www-data www-data 12286 Jun 26 10:21 class.db.php-old

www-data@Leonard:/home/www/includes/classes$ md5sum class.db.php
ceec131a22617e367a7d15d4ecd7bd8e class.db.php

and no error message (I double check on the apache log)
 
Mmm the PDOExeption should be there, perhaps in your server setup you disallow the PDOExeption. Try to install a stock server like xampp or something like that with the default config.
 
Mmm but PDO should be notice that...

Let's try this... In the patched file that I've sent replace this:
PHP:
$this->db = new PDO($pdo_connect, __CHV_DB_USER__, __CHV_DB_PASS__, array(PDO::ATTR_TIMEOUT => 30));

With this:
PHP:
$this->db = new PDO($pdo_connect, __CHV_DB_USER__, __CHV_DB_PASS__, array(PDO::ATTR_TIMEOUT => 30, PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION));

Other possible value is PDO::ERRMODE_WARNING
 
Status
Not open for further replies.
Back
Top