Probs synching

hypnotone - January 18, 2008 - 23:07
Project:phplist Integration Module
Version:5.x-1.x-dev
Component:User interface
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed
Description

I was trying to synchronize users and got an error message of user warning: Table 'dpdb.phplist_user_user doesn't exist, which is indeed true. Dpdb is the name of my Drupal database, not the phplist database name I listed in the config settings. Do the phplist tables have to reside in the Drupal database?

#1

jdev - January 19, 2008 - 08:15

I'm also having same problem.

#2

jdev - January 20, 2008 - 14:02

I get following errors while syncing.

* warning: Missing argument 1 for _phplist_uniqueid() in /www/sites/all/modules/phplist/phplist.module on line 654.
* warning: Missing argument 2 for _phplist_uniqueid() in /www/sites/all/modules/phplist/phplist.module on line 654.
* user warning: Table 'mydb.user_user' doesn't exist query: SELECT id FROM user_user WHERE uniqid='f53a7a67a069669b15ad579a5850d11f' in /www/includes/database.mysqli.inc on line 151.
* warning: Missing argument 1 for _phplist_uniqueid() in /www/sites/all/modules/phplist/phplist.module on line 654.
* warning: Missing argument 2 for _phplist_uniqueid() in /www/sites/all/modules/phplist/phplist.module on line 654.
* user warning: Table 'mydb.user_user' doesn't exist query: SELECT id FROM user_user WHERE uniqid='856f546976b4a5e3bad5bf02b3d76fed' in /www/includes/database.mysqli.inc on line 151.

I'm using mydb for both Drupal and phplist.
I have used prefix phplist_ for tables, but it seems doesn't check that.
--
Sharique

#3

ccdoss - January 22, 2008 - 20:58

I'm having a similar problem.

#4

paulbeaney - January 22, 2008 - 22:40

Hi,

Your phpList tables should be able to reside on any database server, locally or remotely, and certainly don't have to be in the same one as your Drupal database (although there's no reason why they can't).

I have been unable to reproduce these problems - and I have tried putting my phpList database on localhost and a remote server. The only time I managed to get an error (although not the same as yours) is when I was accessing a MySQL 4.7 database from my Drupal server, which is MySQL 5. That was a MySQL error though - a collation issue.

I have made some changes to the module tonight and uploaded it to CSV so can I ask that you try this update and see if that alleviates the problem. If not, I will delve further and no doubt will need to come back to you for more information.

Regards,

- Paul

#5

bec - February 8, 2008 - 22:22

I was having this problem with any phplist db transaction; it happens because phplist.module doesn't switch to the phplist database correctly. It looks like the $db_url array wasn't getting set, even though _phplist_dburl() was getting called... I fixed it by editing my settings.php to use multiple databases; see How to connect to multiple databases within Drupal. The $db_url part of my settings.php file looked like this before:

<?php
$db_url
= 'mysql://drupal_db_user:drupal_db_pass@drupal_db_host/drupal_db_name';
?>

and now looks like this:

<?php
$db_url
['default'] = 'mysql://drupal_db_user:drupal_db_pass@drupal_db_host/drupal_db_name';
$db_url['phplist'] = 'mysql://phplist_db_user:phplist_db_pass@phplist_db_host/phplist_db_name';
?>

also, a note: the url components don't seem to be urlencoded when the db url is created within the _phplist_dburl() function, a possible problem for people with odd characters in their db passwords.

#6

paulbeaney - February 10, 2008 - 17:13

This is a bit strange as I have 3 Drupal installations and they all work fine without having to edit settings.php. I was aware of being able to do this, although I stuck with the admin page way of defining the database parameters as it seemed a bit more user friendly.

I'd be surprised if URL encoding the database URL made a difference since anything you enter into settings.php is not url-encoded either. Presumably either method could cause problems for people with illegal characters in their passwords?

#7

paulbeaney - February 12, 2008 - 22:30

I have just uploaded a new version of the module which fixes bugs with new Drupal users the first time they login. This should solve the last of these problems.

Regards,

- Paul

#8

mdixoncm - February 13, 2008 - 17:46
Title:Probs synching» Patch should solve problems
Status:active» patch (code needs review)

While #5 will definitely fix the problem - this patch should solve the bug at source. There was a small problem with the code that is adding the DB defined in the settings page into the $db_url array ...

Cheers,

Mike

AttachmentSize
phplist_fix_db_url.patch289 bytes

#9

paulbeaney - February 13, 2008 - 20:38

Mike,

My copy of Eclipse doesn't recognise that file as a valid patch. Could you post your complete _phplist_dburl() function please?

Thanks,

- Paul

#10

Steven Jones - February 13, 2008 - 20:42
Title:Patch should solve problems» Probs synching

Setting title back.

#11

Liliplanet - February 25, 2008 - 16:14

Yes, that is the source of my problem. The module does not update of where the PHPList installation is installed and keeps it as the local db (where the module is installed).

Would love to know how to fix this please as no matter how many times I re-install it stays with the same error.

Any suggestions would be great, thanx!
Lilian

#12

that0n3guy - February 29, 2008 - 16:55

I am also getting the "user warning: Table 'dbname.phplist_user_user' doesn't exist query" errors. I tried the patch in #8 and it did not seem to work. With the patch I no longer get errors, but nothing seems to happen after I hit the sync button, it just goes to a blank page and when I check my database, no users were synced.

Could this be because my modules are installed in sites/default/modules instead of sites/all/modules (isnt that where the handbook says to put them?).

I am using XAMPP on pclinusos with mysql 5.0.51. The drupal database and phplist database are on the same server.

#13

that0n3guy - February 29, 2008 - 17:34

Alright, I got my sync to work. Some of these step may not have had anything to do with it now working, Im just telling you what I did:

-deleted my phplist database that was named listsdb and created a new one named phplist
-I added a password to my mysql database user(I am using xampp on my home computer and it defaults to no password so thats why there wasnt one in the first place)
-I modified my settings.php (for drupal) and my config.php (for phplist) so they had a password to access the database
-it syncs and works now.

Hopefully this will help find the root of this problem.
(now I need to figure out how to use this with anonymous users)

#14

paulbeaney - March 1, 2008 - 20:40

I have applied mdixoncm's patch to CVs now. Seems to fix the last of the problems where Drupal seems to not be able to switch to the phpList database in My Account - My Newsletters and other places.

Regards,

- Paul

#15

paulbeaney - March 11, 2008 - 14:09
Status:patch (code needs review)» closed

Done and dusted.

#16

jdev - March 11, 2008 - 18:10

Thanks

#17

timkolke - April 14, 2008 - 22:30

Hi.

Using 5.x-1.0 and still getting the "user warning: Table 'database.phplist_user_user' doesn't exist query".

Phplist db tables are prefixed with phplist_ and phplist_user_

Using Drupal 5.5

Any ideas? Thanks!

#18

paulbeaney - April 19, 2008 - 16:53

Hi timkolke,

Sorry, I don't have any ideas for you. As far as I can tell the latest version is pretty much watertight in terms of switching correctly between the databases (phpList and Drupal). Do you get any errors on the "My Newsletters" tab in My Account?

Regards,

- Paul

 
 

Drupal is a registered trademark of Dries Buytaert.