bugGNU FM - Bugs: bug #26497, Can't install locally since the...

 
 

bug #26497: Can't install locally since the move from mdb2 to adodb

Submitted by:  David Mignot <idflood>
Submitted on:  Fri 08 May 2009 06:01:12 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sat 09 May 2009 04:13:21 PM UTC, comment #4:

Thanks, I don't know why I don't thought about that. With that, i moved to the same error as i posted in comment #2.

In the "Error" table, I changed "id INTEGER(11) AUTO_INCREMENT KEY," to "id SERIAL PRIMARY KEY,".

Next, "Delete_Request" table has a missing )
PRIMARY KEY(code)"); becomes PRIMARY KEY(code))");

Should i commit thoses changes, including the $adodb_connect_string thing?

I'm now blocked with:
Fatal error: Uncaught exception 'ADODB_Exception' with message 'postgres7 error: [-18: ERROR: relation "relationship_flags" does not exist] in EXECUTE("CREATE TABLE User_Relationship_Flags ( uid1 INTEGER, uid2 INTEGER, flag VARCHAR(12) REFERENCES Relationship_Flags(flag), PRIMARY KEY (uid1, uid2, flag), FOREIGN KEY (uid1, uid2) REFERENCES User_Relationships (uid1, uid2))") ' in /usr/share/php/adodb/adodb-exceptions.inc.php:78 Stack trace: #0 /usr/share/php/adodb/adodb.inc.php(1036): adodb_throw('postgres7', 'EXECUTE', -18, 'ERROR: relatio...', 'CREATE TABLE Us...', false, Object(ADODB_postgres7)) #1 /usr/share/php/adodb/adodb.inc.php(1011): ADOConnection->_Execute('CREATE TABLE Us...', false) #2 /home/idflood/workspace/librefm/trunk/gnukebox/install.php(272): ADOConnection->Execute('CREATE TABLE Us...') #3 {main} thrown in /usr/share/php/adodb/adodb-exceptions.inc.php on line 78

David Mignot <idflood>
Project Member
Sat 09 May 2009 10:57:35 AM UTC, comment #3:

I got another error since i updated to revision 1432. I still had to add the $adodb_connect_string in install.php.

It seems the reference in "Auth" table should be changed from "Users(username)" to "Users(uniqueid)", but I'm really not sure about that.

Here is the new error (in gnukebox/install.php):
Fatal error: Uncaught exception 'ADODB_Exception' with message 'postgres7 error: [-1: ERROR: there is no unique constraint matching given keys for referenced table "users"] in EXECUTE("CREATE TABLE Auth ( token VARCHAR(32) PRIMARY KEY, sk VARCHAR(32), expires INTEGER, username VARCHAR(64) REFERENCES Users(username))") ' in /usr/share/php/adodb/adodb-exceptions.inc.php:78 Stack trace: #0 /usr/share/php/adodb/adodb.inc.php(1036): adodb_throw('postgres7', 'EXECUTE', -1, 'ERROR: there i...', 'CREATE TABLE Au...', false, Object(ADODB_postgres7)) #1 /usr/share/php/adodb/adodb.inc.php(1011): ADOConnection->_Execute('CREATE TABLE Au...', false) #2 /home/idflood/workspace/librefm/trunk/gnukebox/install.php(110): ADOConnection->Execute('CREATE TABLE Au...') #3 {main} thrown in /usr/share/php/adodb/adodb-exceptions.inc.php on line 78

David Mignot <idflood>
Project Member
Fri 08 May 2009 09:31:25 AM UTC, comment #2:

I added your suggestion to install.php since config.php has not been created yet. It fix the empty $adodb_connect_string issue.

But now i still get the second error ( column "uniqueid" referenced in foreign key constraint does not exist ).

By adding "uniqueid INTEGER unique," to user table it goes to a next error, but i'm stuck there.

Fatal error: Uncaught exception 'ADODB_Exception' with message 'postgres7 error: [-1: ERROR: syntax error at or near "(" LINE 2: id INTEGER(11) AUTO_INCREMENT KEY, ^] in EXECUTE("CREATE TABLE Error( id INTEGER(11) AUTO_INCREMENT KEY, msg TEXT, data TEXT, time INTEGER)") ' in /usr/local/php5/lib/php/adodb/adodb-exceptions.inc.php:78 Stack trace: #0 /usr/local/php5/lib/php/adodb/adodb.inc.php(1035): adodb_throw('postgres7', 'EXECUTE', -1, 'ERROR: syntax ...', 'CREATE TABLE Er...', false, Object(ADODB_postgres7)) #1 /usr/local/php5/lib/php/adodb/adodb.inc.php(1010): ADOConnection->_Execute('CREATE TABLE Er...', false) #2 /Users/davidmignot/htdocs/gnukebox/install.php(223): ADOConnection->Execute('CREATE TABLE Er...') #3 {main} thrown in /usr/local/php5/lib/php/adodb/adodb-exceptions.inc.php on line 78

David Mignot <idflood>
Project Member
Fri 08 May 2009 08:44:58 AM UTC, comment #1:

I managed to get it working using the following in config.php:

$adodb_connect_string = str_replace('pgsql:', 'postgres:', $connect_string);

Toby Inkster <tobyink>
Project Member
Fri 08 May 2009 06:01:12 AM UTC, original submission:

Since the move from mdb2 to adodb it seems i can't install the trunk version locally.

One of the problem is the $adodb_connect_string which is empty ( if I replace it in gnukebox/install.php by $connect_string the install goes a bit further )

Here is the error I get from gnukebox/install.php without changing the $adodb_connect_string:
object(ADODB_Exception)#1 (13) { ["dbms"]=> string(16) "ADONewConnection" ["fn"]=> string(16) "ADONewConnection" ["sql"]=> string(0) "" ["params"]=> string(0) "" ["host"]=> string(0) "" ["database"]=> string(0) "" ["message:protected"]=> string(98) "ADONewConnection error: [-998: could not load the database driver for ''] in ADONewConnection(, ) " ["string:private"]=> string(0) "" ["code:protected"]=> int(-998) ["file:protected"]=> string(54) "/usr/local/php5/lib/php/adodb/adodb-exceptions.inc.php" ["line:protected"]=> int(78) ["trace:private"]=> array(3) { [0]=> array(4) { ["file"]=> string(43) "/usr/local/php5/lib/php/adodb/adodb.inc.php" ["line"]=> int(4105) ["function"]=> string(11) "adodb_throw" ["args"]=> array(7) { [0]=> string(16) "ADONewConnection" [1]=> string(16) "ADONewConnection" [2]=> int(-998) [3]=> string(41) "could not load the database driver for ''" [4]=> string(0) "" [5]=> bool(false) [6]=> bool(false) } } [1]=> array(4) { ["file"]=> string(43) "/usr/local/php5/lib/php/adodb/adodb.inc.php" ["line"]=> int(4020) ["function"]=> string(16) "ADONewConnection" ["args"]=> array(1) { [0]=> NULL } } [2]=> array(4) { ["file"]=> string(46) "/Users/davidmignot/htdocs/gnukebox/install.php" ["line"]=> int(43) ["function"]=> string(16) "NewADOConnection" ["args"]=> array(1) { [0]=> NULL } } } ["msg"]=> string(41) "could not load the database driver for ''" }

NewADOConnection(null) % line 43, file: install.php

Database connection failure

And here is the error I get if I replace the $adodb_connect_string to $connect_string:
Fatal error: Uncaught exception 'ADODB_Exception' with message 'postgres7 error: [-1: ERROR: column "uniqueid" referenced in foreign key constraint does not exist] in EXECUTE("CREATE TABLE Groups ( id SERIAL PRIMARY KEY, groupname VARCHAR(64), owner INTEGER REFERENCES Users(uniqueid), fullname VARCHAR(255), bio TEXT, homepage VARCHAR(255), created INTEGER NOT NULL, modified INTEGER, avatar_uri VARCHAR(255), grouptype INTEGER)") ' in /usr/local/php5/lib/php/adodb/adodb-exceptions.inc.php:78 Stack trace: #0 /usr/local/php5/lib/php/adodb/adodb.inc.php(1035): adodb_throw('postgres7', 'EXECUTE', -1, 'ERROR: column ...', 'CREATE TABLE Gr...', false, Object(ADODB_postgres7)) #1 /usr/local/php5/lib/php/adodb/adodb.inc.php(1010): ADOConnection->_Execute('CREATE TABLE Gr...', false) #2 /Users/davidmignot/htdocs/gnukebox/install.php(91): ADOConnection->Execute('CREATE TABLE Gr...') #3 {main} thrown in /usr/local/php5/lib/php/adodb/adodb-exceptions.inc.php on line 78

David Mignot <idflood>
Project Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by tobyink (Posted a comment)
  • -unavailable- added by idflood (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 15 May 2009 06:42:22 AM UTCidfloodOpen/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1