PDA

View Full Version : vB Drupal NG Beta 2 released


elmuerte
07-18-2006, 03:00 AM
The second beta of vbDrupal NG.
This beta should be compatible with vBulletin 3.6 also the installation process has been fixed so that upgrading from an existing vbDrupal 4.6 should work completely.

Note: make a backup of your database before installing this version, just in case.
Also if you are going to upgrade from an vbDrupal 4.6 install first try the whole process on a backup copy of your existing install. Mostlikely you will need to replace old modules and themes with versions suitable for 4.7

You can download it here:
http://prdownloads.sourceforge.net/vbdrupal/vbDrupal-4.7.2.0_beta_2.zip?download

Note: you can download a fixed version of the old defaultvb theme here:
http://prdownloads.sourceforge.net/vbdrupal/theme-defaultvb.zip?download

elmuerte
07-18-2006, 03:03 AM
I still haven't completed porting my current vbDrupal 4.6 site to vbDrupal NG so I'm not 100% sure if the process is "flawless".
Also the vBulletin 3.6 support isn't fully tested, actually hardly tested. I hope you can do must of the grunt work for me ;)

Gman
07-18-2006, 09:37 AM
I finally have my vbulletin license, so hopefully I can help with the testing. I have lots in the air with crash testing drupal as is, and now I need to try vb with vbdrupal.

Of course, without my day job suffering for it. Thanks again.

bugsbunny
07-18-2006, 05:33 PM
Warning: mysqli_real_escape_string() [function.mysqli-real-escape-string]: Couldn't fetch mysqli in /includes/class_core.php on line 1080

Warning: mysqli_query() [function.mysqli-query]: Couldn't fetch mysqli in /includes/class_core.php on line 1093

Warning: mysqli_error() [function.mysqli-error]: Couldn't fetch mysqli in /includes/class_core.php on line 846

Warning: mysqli_errno() [function.mysqli-errno]: Couldn't fetch mysqli in /includes/class_core.php on line 864

.. still get the error..

Gman
07-18-2006, 10:39 PM
I am not on the computer with the error text, but I did have one error on the install. During the update.php portion, I got an error on the 168 or 169 update. I remember looking at it, and it seems that the update database file has one mention of the forum table, which does not exist.

I then ran update.php again, and the update continued and concluded well.

Also, I don't know if this is singular to my install, but I couldn't log in when running update.php, so I had to turn off the login verification that drupal told me to do, and then it all worked fine after that.

Now I am just running around setting up my first vb forum, and then I will try out many drupal modules. I have over 60 modules that hope to use, so I will try to test them all ASAP and come back with the results.

Greg

elmuerte
07-19-2006, 02:48 AM
@bugsbunny damnit, guess I'll have to set up an php5.1+mysqli environment

@Gman what's your system setup (PHP version, webserver software, etc)

elmuerte
07-19-2006, 06:56 AM
ok, have been messing with a php5.1+mysql5.0 through mysqli today and I think I fixed most of the issues. The biggest issue was that for mysqli not all database update queries were run (a lot of the early queries before there was mysqli in drupal).
with the current cvs code the update process runs without errors, but only when I disable javascript it doesn't work well. But I think something is broken in my apache2+php5.1 setup since posting forms results in empty pages too.

(I hate mysqli)

Gman
07-19-2006, 11:41 AM
The error is:

Warning: Table 'forum.vb_drupal_forum' doesn't exist query: SHOW FULL COLUMNS FROM vb_drupal_forum in \drupal\includes\database.vbulletin.inc on line 89
{ "status": true, "percentage": 74, "message": "Updating system module" }

But there is no drupal_forum table to act on.

Possible culprit is this line in updates.inc file near update 146

$ret[] = update_sql("ALTER TABLE {forum} ADD vid int(10) unsigned NOT NULL default '0'");

or this near update 159

if (count($forum_query)) {
$forum_status = db_query("INSERT INTO {forum} (vid, nid, tid) VALUES ". implode(',', $forum_query), $forum_args);
}

and update 169 tries to cast all tables in pgsql to the UTF-8/Unicode encoding (not my error, just pointing this out).

I know that some drupal modules try to look into tables, even if not directly needed, tracker looking at the comments table. So it might be worth just leaving a blank drupal_forum table present, just so custom modules don't fail.

As for my system, I am running on XP Pro, Apache 2.2.2, myslq 4.1, PHP 5, vb3.5.4.

Greg

Pete
07-19-2006, 12:23 PM
Up & running with Gallery2, the main reason I wanted drupal. Thanks a million!

Wound up uninstalling drupal & dropping the tables trying to get Beta 1 going last week, so can't comment on update success.

I had to disable the login check in update.php as well; also ran it from the forum directory vs root. Was getting the "unsupported database" error which appears common on the drupal forums. Lots of suggestions there, but I think the "false" login check did it.

My stuff, if it matters: PHP4.4.2, Mysql4.1.20-standard, vb3.5.4, db type: mysql (not mysqli).

elmuerte
07-19-2006, 12:46 PM
@Gman: actualy that error was caused on an other way, it used an other method to query the database, it only happened with mysqli. It has been addressed and will be included in the next release.

@pete: a normal php4.3+ with mysql (not mysqli) shouldn't cause any errors (since this is my development environment). You would only need to disable the login check if the vbulletin cookie isn't reachable. If that is the case you should adjust vbulletin's cookies settings before continuing.

Gman
07-19-2006, 01:29 PM
No I meant that is the error I got last night when I installed this on my localhost.

I have noticed that the forum list populates when setting up a new forum block in drupal, but the list does not populate when I am trying to set a default forum on the content-type settings page.

Also, the forum block says no threads, even though I just created a few. Is there a time delay before the drupal block will see the forum posts?

Great product. I am really liking the way that the user permissions are integrated well. This is a dream when setting up drupal editors and vbulletin moderators. I can do it all with by creating 1 role in drupal, that links to the correct usergroup in vb. Then I just assign the user to that one drupal role and all is done. :)

elmuerte
07-20-2006, 01:31 PM
ugh.. I think the next release is going to be another beta, had to make some core changes so other things might be broken again.
anyway, full mysqli and php >5.0.5 support is starting to look good

Gman
07-20-2006, 02:46 PM
I have another error. I created a custom field in the user's profile in vbulletin, but when I try to actually add content into that field, I get this error.

Fatal Error: Cannot use object of type stdClass as array in admincp/user.php on line 764.

But maybe this is just a vbulletin error, since I am not in drupal at all at this point. Would php 5.x cause any trouble for vbulletin 3.5.4?

The really odd thing is that it actually saves the data?

elmuerte
07-20-2006, 03:42 PM
that's kinda interesting, found that issue today and fixed it.
there's a variable collision between vbulletin and drupal, the worst thing is, that variable isn't even used where it collides (e.g. a bug in vbulletin).
anyway, it's fixed in the next release

ryuuguu
07-21-2006, 01:14 AM
Problems with a clean setup vb 3.5.4
Server Type Linux Users
Web Server Apache v1.3.33
PHP 4.3.10
PHP Max Post Size 8.00 MB
PHP Maximum Upload Size 2.00 MB
PHP Memory Limit 32.00 MB
MySQL Version 4.0.27-log
MySQL Packet Size 16.00 MB
installed vbDrupal-4.7.2.0_beta_2 using instructions at
http://www.vbdrupal.org/node/4
I got error when going drupal page first time
Unsupported database type

The database type is unsupported. Please use either mysql for MySQL 3.x & 4.0.x databases, mysqli for MySQL 4.1.x+ databases, or pgsql for PostgreSQL databases. The database information is in your settings.php file.

I check my settings.php and just an expermintal commented out section.
I checked my vb config.php and this line is in it
$config['Database']['dbtype'] = 'mysql';

I found in database.inc in db_set_active which is displaying the error does not have global variable $db_url, $db_type, $active_db set.

Any suggestions on what I may have done wrong?

Cheers,
Grant

elmuerte
07-21-2006, 02:29 AM
"The database type <?> is unsupported."
At the <?> place you should have the type of database that isn't supported, but apperently it's empty. This would mean that the $db_url variable was not properly constructed.
A proper value for $db_url would be:
vbulletin://<username>:<password>@<hostname>/<database>
come to think if it, the username,password, hostname and database aren't even needed since vbulletin already made the database connection.

anyway, could you add the following code to the end of the includes/vbdrupal/bootstrap.inc file:

print_r($db_url);
die();

ryuuguu
07-21-2006, 02:50 AM
I put a
var_dump($db_url);
var_dump($db_type);
var_dump($active_db);

in and all of them are NULL.

I was looking through beta-1 posts and it talks about upgrading the the DB from 4.6.8. Am I supposed to install 4.6.8 first then upgrade or this just how the code is structured internally.

Cheers,
Grant

elmuerte
07-21-2006, 03:14 AM
Please download the following script, save it in the drupal base dir and open it and report the info back to me:
http://vbdrupal.cvs.sourceforge.net/*checkout*/vbdrupal/vbdrupal-ng/forum/drupal/scripts/dev/system_info.php

There is no need to install any other version first.

ryuuguu
07-21-2006, 09:58 AM
exact same as above when opening the index script. I looked in the script and on line 29 and 30

require_once './includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);

it calls the bootstrap function same as index.php which the prints the bad database message and dies.

I also checked I do have one .htaccess on the path above with

### CNC_START: BEGIN CUSTOM WEBSITE CONFIGURATION
### DO NOT EDIT THIS SECTION, CHANGES WILL BE LOST
Options +Indexes
php_value error_reporting 7
php_flag display_errors on
### CNC_END: END CUSTOM WEBSITE CONFIGURATION


I did a quick hack and inserted

$info['Database class'] = get_class($vbulletin->db);
$res = $vbulletin->db->query_first('SHOW VARIABLES LIKE "version"');
$info['Database version'] = $res['Value'];
$info['$base_path'] = $base_path;
$info['$base_url'] = $base_url;
$info['Database interface'] = DB_INTERFACE;
$info['$db_prefix'] = $db_prefix;
var_dump($info);

just before the code that dies in database.inc and it game me

Fatal error: Call to a member function on a non-object in /big/dom/xryuuguu/www/drupal/includes/database.inc

which is line
$res = $vbulletin->db->query_first('SHOW VARIABLES LIKE "version"');

So I guess the VB code is not running.

I checked drupal/sites/defualt/seeting.php and I have

$vb_dir = "/big/dom/xryuuguu/www/forum";


cheers,
Grant

elmuerte
07-21-2006, 11:56 AM
oops...
rushed the script a bit, please download it again

ryuuguu
07-21-2006, 06:18 PM
that looks better, I checked database & path variables and they look correct to me.

!incomplete!:
Due to an error not all information could be collected.

$base_path:
http://www.ryuuguu.com/drupal/

$base_url:
http://www.ryuuguu.com/drupal

$db_prefix:
vbdrupal_

$db_url:
vbulletin://xryuuguu:********@MySQL.ryuuguu.com/xryuuguu-vbulletin

$vb_dir:
/big/dom/xryuuguu/www/forum

Database class:
vb_database

Database version:
4.0.27-log

PHP version:
4.3.10

vBulletin version:
3.5.4

vbDrupal path:
/big/dom/xryuuguu/www/drupal

vbDrupal version:
4.7.2.0 beta 2


Cheers,
Grant

elmuerte
07-22-2006, 03:24 AM
ugh.. wth...
I have absolutely no idea why, apperently, $db_url is broken in db_set_active
because the value of $db_url is added to the list at the very last moment (after the db_set_active failed).

elmuerte
07-22-2006, 03:52 AM
Ok, download the script again. Now I'm only interested in the value of "Database driver"
if that is not "./includes/database.vbulletin.inc" then please add the following line to the _end_ of the file includes/vbdrupal/bootstrap.inc:
$db_url = 'vbulletin://authentication:done@by/vbulletin';
(this is how it will be done in the future)

ryuuguu
07-22-2006, 11:08 AM
that is the value of database driver.(I did new install on another account so values have changed)

I noticed that in vb drupal setting it says
"The system path to vbDrupal.This variable should have been automatically set when visiting the vbDrupal update script." and when I got there is was blank. I don't know if this a clue or not.

I guess I'll practice my PHP reading skill. The scirpt you sent will help because it always good to a have correctly working example to start from.

$base_path:
http://airshipsnow.com/forum/drupal/

$base_url:
http://airshipsnow.com/forum/drupal

$db_prefix:
vbdrupal_

$db_url:
vbulletin://xairshipsnow:********@MySQL.airshipsnow.com/xairshipsnow-vbforum

$vb_dir:
/big/dom/xairshipsnow/www/forum

Database class:
vb_database

Database driver:
./includes/database.vbulletin.inc

Database interface:
DB_INTERFACE

Database version:
4.0.27-log

PHP version:
4.3.10

vBulletin version:
3.5.4

vbDrupal path:
/big/dom/xairshipsnow/www/forum/drupal

vbDrupal version:
4.7.2.0 beta 2


Thanks,
Grant

elmuerte
07-22-2006, 12:45 PM
I noticed that in vb drupal setting it says
"The system path to vbDrupal.This variable should have been automatically set when visiting the vbDrupal update script." and when I got there is was blank. I don't know if this a clue or not.
Tha variable is only needed from within vBulletin to bootstrap vbdrupal (e.g. the other way around). If the variable isn't set it will automatically be set to the correct value when you visit the update.php script of vbdrupal (just like the vbdrupal url).

anyway, I take it from the "Database interface" value that it still doesn't work.
that's really odd, since apperently the test for the database driver was succesfull and that is actually the switch that triggers the "unsupported database" error. The construction of the database driver string is almost identical to the original used by vbdrupal.

ryuuguu
07-22-2006, 10:32 PM
Not sure if this the right track but I am checking where $vbulletin exists. Is it supposed to be global through all scopes? It exists in the script that call

require_once './includes/bootstrap.inc';

but in the function drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); called on the next line it does not exist. Is this normal?

elmuerte
07-23-2006, 03:08 AM
$vbulletin is created by vbulletin's global.php which is included from includes/vbdrupal/bootstrap.inc which included from includes/bootstrap.inc

ryuuguu
07-23-2006, 07:51 AM
Found it :)

in orum/drupal/includes/vbdrupal/bootstrap.inc
(soory not using code labels because it was removing line formatting.)

function _drupal_bootstrap($phase) {
global $conf;

//@mh: let "modules" override\extend bootstrap routines?
// maybe convert this to a real module like system configurable through $conf?
// this way there would be a better single sign-on possibility within drupal
if (function_exists('vbdr_drupal_bootstrap'))
vbdr_drupal_bootstrap($phase);

switch ($phase) {
case DRUPAL_BOOTSTRAP_DATABASE:
drupal_unset_globals();
// Initialize the configuration
conf_init();
// Initialize the default database.
require_once './includes/database.inc';
db_set_active();
break;


when I comment out drupal_unset_globals(); db_set active works.

Cheers,
Grant

elmuerte
07-23-2006, 08:25 AM
please double check you edited the right file. there are two bootstrap.inc files
includes/bootstrap.inc
and
includes/vbdrupal/bootstrap.inc

the "DRUPAL_BOOTSTRAP_DATABASE" step from the includes/bootstrap.inc file should never be executed.
the piece of code you showed is from includes/bootstrap.inc and not from includes/vbdrupal/bootstrap.inc

ryuuguu
07-23-2006, 08:50 AM
in includes/bootstrap.inc the line is under function
_drupal_bootstrap($phase) {
in my copy of includes/vbdrupal/bootstrap.inc
the line is 197 under function
vbdr_drupal_bootstrap(&$phase) {
I re-unzipped vbDrupal-4.7.2.0_beta_2.zip to make sure I had not accidently changed the file.

Cheers,
Grant

elmuerte
07-23-2006, 09:47 AM
ah... this is a bug.
but your setup is also a security risk
the bug will only surface when you've got 'register_globals' enabled, and this is a security risk. Actually this should have been done automatically when you rename the .htaccess_new to .htaccess.

e.g., the entry:
php_value register_globals 0

ryuuguu
07-23-2006, 10:27 AM
I'll test out the code tomorrow(it is 1:00 am my time) and add
php_value register_globals 0
Thanks
Grant

ryuuguu
07-23-2006, 08:14 PM
I'm back.:)
Now I don't get a database error but I get the System maintenance screen even though I am logged in as the admin.
Any suggestions on where start looking at this problem?

Cheers,
Grant

elmuerte
07-24-2006, 01:48 AM
check the cookie path and domain in vbulletin.
you might need to remove the cookies by hand after changing these values.

Gman
07-24-2006, 08:34 AM
Yes, always delete old cookies after changing those settings.

Also, if you are testing on a localhost and are using a non-standard port, like localhost:8080, the default cookie setting option in vbulletin will be wrong. It will try to append the port # onto the cookie, which will cause the cookies to not function correctly.

To get past this, just check the custom box and manually enter the cookie domain, without the port number.

ryuuguu
07-24-2006, 06:27 PM
I came back today but can not login because of two database errors in the login script.

1) tries to access vbvbdrupal_cache it should be accessing vbdrupal_cache (an extra vb at at begining

2)tries to write to vbdrupal_sessions.cache but there is no field cache.
(note the table name is correct only one vb)

Is there an update script I am supposed to run first thing or is it supposed run automatically. (possible it did not becaue of my databaes problems earliry)

Cheers,
Grant

elmuerte
07-25-2006, 02:23 AM
1) grrr... damn bug... I can't figure that one out
2) uhm.. yes, you need to run the vbdrupal update.php script, this will adjust the database tables.

ryuuguu
07-25-2006, 04:04 AM
1)I will look for this one also, FYI when I made a table vbvbdrupal_cache but the I got a report the the vbdrupal_cache had not been locked when updating.

Could you point me to the function that produces the error pages and emails. I would like to put a var_dump(debug_backtrace()); in it so I can work things through.


2) ran update and so that error went away.

cheers,
Grant

elmuerte
07-25-2006, 07:22 AM
1) found and fixed it, apperently vbulletin adds the prefix to the tables for the lock query, so I've changed the table locking function in database.vbulletin.inc to:

function db_lock_table($table) {
global $vbulletin;
if (defined('DISABLE_LOCKING')) return;
$table = db_prefix_tables('{'.db_escape_table($table).'}');
// within the vBulletin scope
if (preg_match('#^'.TABLE_PREFIX.'#', $table)) {
$table = preg_replace('#^'.TABLE_PREFIX.'#', '', $table); // strip vBulletin prefix, it's appended by lock_tables
$vbulletin->db->lock_tables(array($table => 'WRITE'));
}
else {
// completely different prefix
db_query('LOCK TABLES '. $table .' WRITE');
}
}

fixed in upcoming RC1