Warnings in database.mysql.inc and dbfm.module

abebantegui - July 13, 2009 - 07:57
Project:DataBase File Manager
Version:5.x-4.3
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

I don't have OG installed.

Error #1
This node is accessible by a specific user account: http://localhost/baseline.qconsult.ph/dbfm_send/6
I logged out and tried to access the link directly then I got this error:

File Cannot be Accessed / Access Restricted
user warning: Table 'qconsult.og_uid' doesn't exist query: SELECT * FROM og_uid WHERE uid = '0' in C:\apache2triad\htdocs\baseline.qconsult.ph\includes\database.mysql.inc on line 174.

How do I get around this?

Error #2
Change the read permissions of a folder to a specific role, clicked the 'Save Changes' button and clicked a different linked then I got this error:

* warning: array_diff() [function.array-diff]: Argument #1 is not an array in /etc/drupal/5/sites/all/modules/dbfm/dbfm.module on line 4066.
* warning: array_diff() [function.array-diff]: Argument #2 is not an array in /etc/drupal/5/sites/all/modules/dbfm/dbfm.module on line 4067.

I found a patch http://drupal.org/node/423848 that fixes this problem.

Configurations:
Apache2Triad version 1.5.4
Apache version 2.2.0
MySQL version 5.0.18
PostgreSQL version 8.1.2
Openssl version 0.9.8a
Slimftpd version 3.18
Xmail version 1.22
Perl version 5.8.7
PHP version 5.1.2
Python version 2.3.5

Drupal 5.19 with the following modules:
content_access
event
event_manager
event_manager_block
event_views
image
img_assist
jquery_update
jstools
mimemail
nodewords
nodewords_bypath
nodewords_nodetype
page_title
pathauto
token
views
wysiwyg
fckeditor

DBFM modules:
dbfmgreybox-5.x-3.1.tar.gz
dapi-5.x-1.0.tar.gz
dbfm-5.x-4.3.tar.gz
jstools-5.x-0.6.tar.gz
Clean URLs = enabled

#1

abebantegui - July 13, 2009 - 08:39

I was not clear about Error #1. What I meant is that is do you have patch to get rid of the error: "table does not exist"?

I tried inserting the code in get_user_groups() in dbfm.module:

$groupsql = "SELECT nid, title FROM {node} WHERE type = '" . variable_get(dbfm_node_grp, "group") . "' ORDER BY title";
$queryResult = db_query($groupsql);
$numret = db_num_rows($queryResult);
if ($numret == 0) {
if (isset($_SESSION['grouparr'])) {
return $_SESSION['grouparr'];
}
}

I also tried inserting the code in get_user_roles() in dbfm.module:

$groupsql = "SELECT nid, title FROM {node} WHERE type = '" . variable_get(dbfm_node_grp, "group") . "' ORDER BY title";
$queryResult = db_query($groupsql);
$numret = db_num_rows($queryResult);
if ($numret == 0) {
if (isset($_SESSION['rolearr'])) {
return $_SESSION['rolearr'];
}
}

In any case, I'm still getting the warning message.

#2

geoff_eagles - July 14, 2009 - 07:55

The patch proved problematical for a number of users - if you read further down in that issue I've included the replacement function as a text file which may work better for you. The replacement function should completely remove the dependency on OG .... and stop the error messages.

#3

abebantegui - July 15, 2009 - 09:31
Status:active» closed

Hi geoff_eagles:

The "patchAsFile.txt" fixed problem #2.

As for problem #1, I had to create the table og_uid and inserted 1 record and the error disappeared. Anyways, I'm happy with my dbfm now.

Here's what I did for problem #1:

CREATE TABLE og_uid (
nid int(11) NOT NULL,
og_role int(1) NOT NULL DEFAULT 0,
is_active int(1) NOT NULL DEFAULT 0,
is_admin int(1) NOT NULL DEFAULT 0,
uid int(11) NOT NULL,
created int(11) NULL DEFAULT 0,
changed int(11) NULL DEFAULT 0,
PRIMARY KEY (nid, uid)
)

INSERT INTO `og_uid` ( `nid` , `og_role` , `is_active` , `is_admin` , `uid` , `created` , `changed` )
VALUES ('', '0', '0', '0', '0', '0', '0');

If in the future there is a newer version of dbfm with the fixes for errors 1 & 2 and a working search button, I'll be glad to give it a go and let you know of any quirks.

I'm closing this issue.

Thanks!

Abe

 
 

Drupal is a registered trademark of Dries Buytaert.