Gallery 1.5.1 and phpBB 2.0.18

jaimexyz

Joined: 2004-04-09
Posts: 5
Posted: Thu, 2005-12-15 15:07

Hello,

I updated the integration of Gallery 1.5.1 and phpBB 2.0.18, but seems to be something wrong between this two versions.

I went to http://galleryupdates.jpmullan.com/ and download the last files and in the changelog file they talk about:

Quote:
2005-10-05 Jens Tkotz <jens@peino.de> 1.5.2-cvs-b13

* Adapted modules.php to fit with phpBB2 2.0.17

but the modules.php is the same old one.

The error message I get is:

Quote:
Warning: mysql_connect(): Access denied for user: 'xxxxxxxx@localhost' (Using password: NO) in /home/clubmccl/public_html/phpBB2/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/clubmccl/public_html/phpBB2/modules/gallery/classes/database/mysql/Database.php on line 29

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/clubmccl/public_html/phpBB2/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/clubmccl/public_html/phpBB2/modules/gallery/classes/database/mysql/Database.php on line 37

I can surf thru the gallery but can´t login. Im not sure what´s wrong, please help.

Thanks

 
JadeFist

Joined: 2003-04-25
Posts: 21
Posted: Thu, 2005-12-22 09:00

Hi, I am using Gallery 1.5.1 and it was successfully embedded in phpBB2 2.0.17. I manually upgraded just the changed files to phpBB2 2.0.18. Once I did this I went back into the files I'd previously modified and modified them again, based on the instructions found in the Gallery 1.5.1 install (\contrib\phpBB2) folder:

* File: phBB2/includes/page_header.php
* File: phpBB2/includes/sessions.php
* File: phpBB2/templates/subSilver/overall_header.tpl

The problem is that I get the same type errors as the user posted above. Has anyone posted the correct file modifications yet? Will Gallery 1.5.1 embed and work properly with phpBB2 2.0.18?

Here is the manual modification instructions I am referencing:

*******************************************************
* File: phpBB2/includes/page_header.php
*******************************************************

Find:
'U_VIEWONLINE' => append_sid('viewonline.'.$phpEx),
'U_LOGIN_LOGOUT' => append_sid($u_login_logout),
'U_GROUP_CP' => append_sid('groupcp.'.$phpEx),

After add:
'U_GALLERY' => append_sid('modules.'.$phpEx.'?op=modload&name=gallery&file=index'),

*******************************************************
* File: phpBB2/includes/sessions.php
*******************************************************

Find:
{
$sessiondata = array();
$session_id = ( isset($_GET['sid']) ) ? $_GET['sid'] : '';
After add:
// Added for Gallery
if(!isset($_GET['sid'])) {
$session_id = ( isset($_POST['sid']) ) ? $_POST['sid'] : '';
}
//

Again Find:
{
$sessiondata = array();
$session_id = ( isset($_GET['sid']) ) ? $_GET['sid'] : '';
Again add:
// Added for Gallery
if(!isset($_GET['sid'])) {
$session_id = ( isset($_POST['sid']) ) ? $_POST['sid'] : '';
}
//

*******************************************************
* File: phpBB2/templates/subSilver/overall_header.tpl
*******************************************************

Find:
@import url("templates/subSilver/formIE.css");
-->
</style>

After add:
<link rel="stylesheet" href="modules/gallery/css/base.css.default" type="text/css">
<link rel="stylesheet" href="modules/gallery/css/embedded_style.css.default" type="text/css">

Find: <table cellspacing="0" cellpadding="2" border="0">
<tr>
<td align="center" valign="top" nowrap="nowrap"><span class="mainmenu">&nbsp;<a href="{U_FAQ}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_faq.gif" width="12" height="13" border="0" alt="{L_FAQ}" hspace="3" />{L_FAQ}</a></span><span class="mainmenu">&nbsp; &nbsp;<a href="{U_SEARCH}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_search.gif" width="12" height="13" border="0" alt="{L_SEARCH}" hspace="3" />{L_SEARCH}</a>&nbsp; &nbsp;<a href="{U_MEMBERLIST}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_members.gif" width="12" height="13" border="0" alt="{L_MEMBERLIST}" hspace="3" />{L_MEMBERLIST}</a>&nbsp; &nbsp;<a href="{U_GROUP_CP}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_groups.gif" width="12" height="13" border="0" alt="{L_USERGROUPS}" hspace="3" />{L_USERGROUPS}</a>&nbsp;
After add:
<!-- Gallery -->
&nbsp;&nbsp;<a href="{U_GALLERY}" class="mainmenu"><img src="modules/gallery/images/g1-phpBB2-icon.png" width="12" height="13" border="0" alt="{L_GALLERY}" />Gallery</a>&nbsp;
<!-- Gallery -->

 
JadeFist

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

Found this fix and 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.

 
Grinch

Joined: 2002-08-28
Posts: 24
Posted: Mon, 2006-01-16 00:17

This did the trick for me. Does anyone know if there is an alternative and permanent fix for this issue? Technically Gallery for PHPBB is now broken.