Page 1 of 1

database problem

PostPosted: Tue Feb 17, 2015 1:06 pm
by deficit
trying to upgrade top the newest SVN. Get an error during updating the database schema

\. /usr/src/astguiclient/trunk/extras/upgrade_2.10.sql
-bash: /usr/src/astguiclient/trunk/extras/upgrade_2.10.sql: line 2: syntax error near unexpected token `('
-bash: /usr/src/astguiclient/trunk/extras/upgrade_2.10.sql: line 2: `UPDATE system_settings SET db_schema_version='1381',db_schema_update_date=NOW() where db_schema_version < 1381;'

any ideas

Re: database problem

PostPosted: Tue Feb 17, 2015 1:19 pm
by mflorell
You have to do that within mysql, not bash.

Re: database problem

PostPosted: Tue Feb 17, 2015 1:40 pm
by deficit
Sorry duh n my part I ran the upgrade from mysql..
Version: 2.8b0.5
SVN Version: 2277
DB Schema Version: 1401
DB Schema Update Date: 2015-02-17 12:23:22

ok it took ok except for one problem.

The USERS details pages are blank I can see all the data in mysql just not under vicidial users details..

Any ideas.

Re: database problem

PostPosted: Tue Feb 17, 2015 5:09 pm
by mflorell
What version, build and dbschema were you upgrading from?

Re: database problem

PostPosted: Thu May 07, 2015 11:23 am
by adymeblack
I'm having a similar issue. Upgrading from v2.8-426a Build: 140214-1643 Schema 2075 to v2.12-484a BUILD: 150429-1222. Users, campaigns, statuses, everything is blank and i keep seeing this error along the top:

Code: Select all
Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given in /srv/www/htdocs/vicidial/admin.php on line 1940 Warning: mysqli_fetch_row() expects parameter 1 to be mysqli_result, boolean given in /srv/www/htdocs/vicidial/admin.php on line 3681


I can log into the system, but i really can't do anything becuase the page is either blank, or i get a "unauthorized" error.

I followed the upgrade steps as directed (viewtopic.php?t=16326&highlight=) & ran the SQL upgrades.

Ideas?

Thank you kindly.

Re: database problem

PostPosted: Fri May 08, 2015 8:03 am
by adymeblack
I managed to fix my issue. I re ran the SQL upgrade files (in order, just ot be sure) and everything is good now.

Re: database problem

PostPosted: Wed May 20, 2015 11:02 am
by adymeblack
I spoke too soon, everything appears to be working however i am unable to make any changes to user accounts unless i go direct to the database. I have ran all the SQL upgrade scripts (as posted previously) but when i go to the user screen i get the following error:

Code: Select all
Warning: mysqli_fetch_row() expects parameter 1 to be mysqli_result, boolean given in /srv/www/htdocs/vicidial/admin.php on line 17759
MODIFY A USERS RECORD:

Re: database problem

PostPosted: Thu May 28, 2015 1:53 pm
by paolo
adymeblack wrote:I spoke too soon, everything appears to be working however i am unable to make any changes to user accounts unless i go direct to the database. I have ran all the SQL upgrade scripts (as posted previously) but when i go to the user screen i get the following error:

Code: Select all
Warning: mysqli_fetch_row() expects parameter 1 to be mysqli_result, boolean given in /srv/www/htdocs/vicidial/admin.php on line 17759
MODIFY A USERS RECORD:


Maybe you might want to check you User Grants

or try running

GRANT ALL PRIVILEGES ON DBName.* TO asterisk @'%' IDENTIFIED BY '1234';
GRANT ALL PRIVILEGES ON DBName.* TO asterisk @'localhost' IDENTIFIED BY '1234';
GRANT ALL PRIVILEGES ON DBName.* TO 'cron'@'%' IDENTIFIED BY '1234' WITH GRANT OPTION;
GRANT ALL PRIVILEGES ON DBName.* TO 'cron'@'%' IDENTIFIED BY '1234' WITH GRANT OPTION;
GRANT ALL PRIVILEGES ON DBName.* TO 'custom'@'%' IDENTIFIED BY 'custom1234' WITH GRANT OPTION;
GRANT ALL PRIVILEGES ON DBName.* TO 'custom'@'%' IDENTIFIED BY 'custom1234' WITH GRANT OPTION;
FLUSH PRIVILEGES;

in MYSQL

Re: database problem

PostPosted: Thu May 28, 2015 1:58 pm
by adymeblack
In my searches i found the build i was using had a couple bugs that were similar to this. I upgraded to the latest build, re ran the sql scripts and all is well.

I fogot to come back with those results last week.