Database errors - embedded in PHPBB 2.0.18

Ripper

Joined: 2005-02-28
Posts: 4
Posted: Sun, 2005-11-06 04:00

The following information is required to get an answer:
Get this information from the PHP diagnostic (in the configuration wizard).
Gallery URL (optional but very useful):http://www.ripper1.com/forum/modules/gallery/
Gallery version: Gallery v1.5
Apache version: 1.3.33 (Unix)
PHP version (don't just say PHP 4, please): 4.3.11
Graphics Toolkit: Image Majik
Operating system:Windows 2000 Pro SP4
Web browser/version (if applicable): IE6

Gallery works fine on it's own. It is embedded in PHPBB 2.0.18
When you click on the link in the PHPBB overall header, these errors come up:

Quote:
Warning: mysql_connect(): Access denied for user: 'ripper1_phpb2@localhost' (Using password: NO) in /home/ripper1/public_html/forum/modules/gallery/classes/database/mysql/Database.php on line 28

Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /home/ripper1/public_html/forum/modules/gallery/classes/database/mysql/Database.php on line 29

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/ripper1/public_html/forum/modules/gallery/classes/database/mysql/Database.php on line 33

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/ripper1/public_html/forum/modules/gallery/classes/database/mysql/Database.php on line 37

Warning: Cannot modify header information - headers already sent by (output started at /home/ripper1/public_html/forum/modules/gallery/classes/database/mysql/Database.php:28) in /home/ripper1/public_html/forum/includes/page_header.php on line 491

Warning: Cannot modify header information - headers already sent by (output started at /home/ripper1/public_html/forum/modules/gallery/classes/database/mysql/Database.php:28) in /home/ripper1/public_html/forum/includes/page_header.php on line 493

Warning: Cannot modify header information - headers already sent by (output started at /home/ripper1/public_html/forum/modules/gallery/classes/database/mysql/Database.php:28) in /home/ripper1/public_html/forum/includes/page_header.php on line 494

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/ripper1/public_html/forum/modules/gallery/classes/database/mysql/Database.php on line 33

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/ripper1/public_html/forum/modules/gallery/classes/database/mysql/Database.php on line 37
Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/ripper1/public_html/forum/modules/gallery/classes/database/mysql/Database.php on line 33

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/ripper1/public_html/forum/modules/gallery/classes/database/mysql/Database.php on line 37

The gallery still works, but the user is not logged in.
I tried editing the session ID info added for the gallery script in sessions.php to match the updated 2.0.18 code format, but I still get the same errors.
Any ideas?
I had Gallery 1.4 installed on an earlier forum and it worked fine. Recent code changes to PHPBB rendered the image upload mod unusable on my forum, so I figured I go back to Gallery and this didn't work either. I can put up with the users not being logged in, but the error messages need to go bye bye. Thanks to anyone who can offer a suggestion.

 
Tim_j
Tim_j's picture

Joined: 2002-08-15
Posts: 6818
Posted: Sun, 2005-11-06 14:41

At a first glance this doesnt sound like a Gallery error.
Because of "Warning: mysql_connect(): Access denied for user: 'ripper1_phpb2@localhost' (Using password: NO)"

But Gallery 1.5 was not tested or verified for phpBB2 2.0.18 as it doesnt exist when G1.5 was released.
So what you could do is: go to http://jems.de/archive/1.5.2
download the latest version and extract the contrib/phpBB2 folder.
Follow the updated instructions.

Jens
--
Last Gallery v1 developer and translation manager.

 
JadeFist

Joined: 2003-04-25
Posts: 21
Posted: Sat, 2005-12-24 00:29

Found this fix and it seems to work for me:

Ok, the problem is caused by this line...

common.php

Find:
Code:
// We do not need this any longer, unset for safety purposes
unset($dbpasswd);

Replace with:
Code:
// We do not need this any longer, unset for safety purposes
//unset($dbpasswd);

Technically this reduces the security level this "fix" was intended to increase but unless you do it, gallery won't work anymore without you switching over to using the phpBB2 db module.

 
Ripper

Joined: 2005-02-28
Posts: 4
Posted: Sat, 2005-12-24 01:25

I got the PHPBB attachment mod working right after posting this. I no longer need Gallery embedded in my forum, although I still have it on the main site. I like Gallery very much, but there are some quirks to it that drive me nuts. It won't stop me from using it though. My visitors love it too.