Guest Posted May 23, 2004 Share Posted May 23, 2004 I am very please to see someone has final made a phpBB2 implementation contribution. However like all contributions I'm having a few diffculties with it. When I run the ../admin/bb_default.php I get the following Fatal error: Cannot redeclare tep_db_connect() (previously declared in /home/gamerigs/public_html/catalog/admin/includes/functions/database.php:13) in /home/gamerigs/public_html/catalog/admin/includes/functions/database.php on line 13 I know this is quite a common error but I cant seem to resolve it. I was wondering if anyone else was having this problem? Quote Link to comment Share on other sites More sharing options...
Guest Posted May 24, 2004 Share Posted May 24, 2004 This error seems to happen to just about every contribution after searching the forums. Is it when a database call gets called twice or something? I've tried commenting out lines but it just casuses more errors? wasslipu 1 Quote Link to comment Share on other sites More sharing options...
sw45859 Posted May 24, 2004 Share Posted May 24, 2004 normally this error is caused by the application_top.php being included twice i wish i could tell you where but with the phpbb contribution theres alot to search through to find it. just know that it is more than likely due to the application_top being included twice in the same file or in an included file. Quote Link to comment Share on other sites More sharing options...
Guest Posted May 26, 2004 Share Posted May 26, 2004 normally this error is caused by the application_top.php being included twice i wish i could tell you where but with the phpbb contribution theres alot to search through to find it. just know that it is more than likely due to the application_top being included twice in the same file or in an included file. So if I comment out some code linking to the database.php to application_top.php, I might be able to eliminate the proiblem? Fatal error: Call to undefined function: tep_db_connect() in /home/gamerigs/public_html/catalog/admin/includes/application_top.php on line 62 I get this if I cooment out the funcrtion in database.php line 13 but then I get this if I comment out thiss line in application_top? Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/gamerigs/public_html/catalog/admin/includes/functions/database.php on line 45- select configuration_key as cfgKey, configuration_value as cfgValue from configuration [TEP STOP] I dont think commenting out is the way to go? Quote Link to comment Share on other sites More sharing options...
sw45859 Posted May 28, 2004 Share Posted May 28, 2004 no you don't comment out the function, you have to find out where the application_top.php is being called twice, if you comment out that function it will disable it throughout the cart, look in the bb_default.php and find every place where the application_top.php is called, and comment out only the include, ADVICE: comment one, refresh page until the error dissappears. Quote Link to comment Share on other sites More sharing options...
aalishan Posted May 30, 2004 Share Posted May 30, 2004 I am unable to open the zip . Winzip bounce back with a message to re-download the file .tried several time ..no use .. Is anyone else getting the similar problem .. if yes .. Author: Chaveiro could you please look into this. I am downloading the contribution from http://www.oscommerce.com/community/contri...ll/search,phpBB Thanks Quote Link to comment Share on other sites More sharing options...
Guest Posted May 31, 2004 Share Posted May 31, 2004 I am unable to open the zip . Winzip bounce back with a There are TWO files that have to be merged before they can be Extracted. You probably only download 1 of the files when there are actually 2. Use WinRAR to unzip as well,. Quote Link to comment Share on other sites More sharing options...
Guest Posted May 31, 2004 Share Posted May 31, 2004 no you don't comment out the function, you have to find out where the application_top.php is being called twice, if you comment out that function it will disable it throughout the cart, look in the bb_default.php and find every place where the application_top.php is called, and comment out only the include, ADVICE: comment one, refresh page until the error dissappears. Strange there was only one call to application_top in bb_defualt and it was already commented out. /*require('includes/application_top.php');if (!tep_session_is_registered('customer_id')) { exit; } */ If I uncommented it and refreshed it, it went to a blank page with no error messages. Quote Link to comment Share on other sites More sharing options...
Guest Posted June 2, 2004 Share Posted June 2, 2004 anyone else getting this when posting topics/replies to the integrated forums? Warning: Cannot modify header information - headers already sent by (output started at /home/croppi2/public_html/staging/modules.php:28) in /home/croppi2/public_html/staging/includes/modules/phpbb2/viewtopic.php on line 555 I know that the standard answer to this is that there is typically a language file somewhere with extra whitespace after the closing ?> in the file, but it seems I've checked all of them multiple times and can't find any whitespace left. Anyone else with this problem? I know that there are other websites with this integration working . . . -jared Quote Link to comment Share on other sites More sharing options...
Guest Posted June 2, 2004 Share Posted June 2, 2004 Yeah I had this error, I commented out some code and it works now. Not sure how I did it now. It was quite easy though. Quote Link to comment Share on other sites More sharing options...
Guest Posted June 2, 2004 Share Posted June 2, 2004 Thanks, I think. So I'm an idiot for spending a ton of time and not finding it, since it was quite easy. <grin> Can you look at your code and tell me what you've commented out? Thanks! -jared Quote Link to comment Share on other sites More sharing options...
digital_soul18 Posted June 4, 2004 Share Posted June 4, 2004 if you want to make that *.zip file work then rename the file as *.rar then open it. internet explorer seems to change it automatically when downloading it which can get frustrating... use winrar to open... if it already has the *.rar extension and you cant see the extensions for other files (ie. a text file called 'textfile1' will only show 'textfile1' rather then textfile1.txt) then do this: in XP open my computer click on 'Tools' at the top click on Folder options click on the View tab unclick "hide extension for known file types" its exactly the same in win98 and other operting systems but the "hide extension for known file types" is worded differently, just look for it and u'll find it once thats done you should see the file name with a *.rar.zip extension, rename it and remove the *.zip done.. :ph34r: Quote Link to comment Share on other sites More sharing options...
Guest Posted June 4, 2004 Share Posted June 4, 2004 Thanks, I think. So I'm an idiot for spending a ton of time and not finding it, since it was quite easy. <grin> Can you look at your code and tell me what you've commented out? Thanks! -jared Around line 526 of view topic.php comment out this --> //// Set a cookie for this topic // /*if ( $userdata['session_logged_in'] ) { $tracking_topics = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_t']) ) ? unserialize($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_t']) : array(); $tracking_forums = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f']) ) ? unserialize($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f']) : array(); if ( !empty($tracking_topics[$topic_id]) && !empty($tracking_forums[$forum_id]) ) { $topic_last_read = ( $tracking_topics[$topic_id] > $tracking_forums[$forum_id] ) ? $tracking_topics[$topic_id] : $tracking_forums[$forum_id]; } else if ( !empty($tracking_topics[$topic_id]) || !empty($tracking_forums[$forum_id]) ) { $topic_last_read = ( !empty($tracking_topics[$topic_id]) ) ? $tracking_topics[$topic_id] : $tracking_forums[$forum_id]; } else { $topic_last_read = $userdata['user_lastvisit']; } if ( count($tracking_topics) >= 150 && empty($tracking_topics[$topic_id]) ) { asort($tracking_topics); unset($tracking_topics[key($tracking_topics)]); } $tracking_topics[$topic_id] = time(); setcookie($board_config['cookie_name'] . '_t', serialize($tracking_topics), 0, $board_config['cookie_path'], $board_config['cookie_domain'], $board_config['cookie_secure']); } */ Obviously the cookies arent needed any more. That should get that code to disappear that appears when you post etc. Quote Link to comment Share on other sites More sharing options...
Guest Posted June 4, 2004 Share Posted June 4, 2004 Thanks! That makes sense, now that I think about it. No need for phpbb to manage those cookies. I commented out the cookie serializing code in posting.php, viewtopic.php, and viewforum.php. All seems well now, except for the following: When I enable the right column, at the same points where I used to get the cookie-caused error messages, now I get the following in the shopping cart infobox (the first one I have in column_right): Fatal error: Call to a member function on a non-object in /home/croppi2/public_html/staging/includes/boxes/shopping_cart.php on line 39 Now I need to figure that one out. Ideas are certainly welcome. -jared Quote Link to comment Share on other sites More sharing options...
Guest Posted June 4, 2004 Share Posted June 4, 2004 well this is no fun - - I thought for sure that the error would most likely be caused by something else trying to use a variable called $cart (though I admit it didn't seem likely that a bb would have a cart). Alas, grepping through the entire contrib only yields the word "cart" in the installation instructions, referring to code that is already existent in login.php. Grrrrrr -jared Quote Link to comment Share on other sites More sharing options...
Guest Posted June 4, 2004 Share Posted June 4, 2004 now I'm confused. It's gotta be a conflict with the $cart variable because when I comment out the first chunk of code in shopping_cart.php that references $cart, the error is still reported, but this time on the NEXT section of code that references $cart. Now to find out how . . . still, anyone that's figured this out already is welcome to jump in. -jared Quote Link to comment Share on other sites More sharing options...
Ernst_Steininger Posted June 6, 2004 Share Posted June 6, 2004 I have encountered that there is a call in some routines which looks like: tep_redirect(tep_href_link(FILENAME_LOGIN,",,'SSL')); If you comment out this line on every instance, everything will run without problems. // tep_redirect(tep_href_link(FILENAME_LOGIN,",,'SSL')); The only problem which still exists is that I am not able to get the UserID over the first page. If you login on oscommerce and than switch to the Board you are perfectly loged in. But if then you go to another Page it will loose the login status and you will be anonymus. Does anyone have an idea what can be the reason. -- Ernst :rolleyes: Quote Link to comment Share on other sites More sharing options...
Guest Posted June 7, 2004 Share Posted June 7, 2004 Thanks, Ernst! That did the trick! FWIW, I just logged in, then went back into the catalog, viewed a few items, then went back to the forums and was still logged in . . . Only difference is that I have a *slightly* modified login.php, renamed login_bb.php, so that I don't go back to the main website after logging in at via the forum login link. -jared Quote Link to comment Share on other sites More sharing options...
Ernst_Steininger Posted June 7, 2004 Share Posted June 7, 2004 Hi Jcal, what did you change on the Login.php and where did you add the Login_BB.php call? Please advice me so that I can try it. Thanks, Ernst Quote Link to comment Share on other sites More sharing options...
Jeff2004 Posted June 27, 2004 Share Posted June 27, 2004 I installed phpbb 208a and found the login problem same with Ernst Steininger Could anyone solve the problem? Quote Link to comment Share on other sites More sharing options...
Guest Posted June 28, 2004 Share Posted June 28, 2004 Only difference is that I have a *slightly* modified login.php, renamed login_bb.php, so that I don't go back to the main website after logging in at via the forum login link. Yes I am interested too in this slighty modified login_bb.php. How did you do it? Its so anoying how the forum goes out to the main page to login in users and then back to the index page for the catalog. Quote Link to comment Share on other sites More sharing options...
raas Posted June 28, 2004 Share Posted June 28, 2004 Hello Cant seem to find if Gamerigs got the problem with database solved..!!??? Fatal error: Cannot redeclare tep_db_connect() (previously declared in /home/.sites/28/site1/web/admins/includes/functions/database.php:13) in /home/.sites/28/site1/web/admins/includes/functions/database.php on line 13 So I've look trough the code and I cant seem to find anywhere where application_top is called... It looks like gamerigs got it solved when i follw thread, just can't find out how :( Quote Link to comment Share on other sites More sharing options...
Guest Posted June 29, 2004 Share Posted June 29, 2004 (edited) Yes I got that problem solved but only the other day. Took about a week to work out. You need to goto your admin/includes/application_top.php The file is full of requests for functions, they are called like this 'require'. What is happening is one function is getting called more than once or something like that. Any way I found if I changed all the require to require_once everything should work as it stops the fuction being called more than once. eg. // include the list of project filenames require_once(DIR_WS_INCLUDES . 'filenames.php'); define('FILENAME_QUICK_UPDATES', 'quick_updates.php'); //Quickupdates // include the list of project database tables require_once(DIR_WS_INCLUDES . 'database_tables.php'); Edited June 29, 2004 by Gamerigs Quote Link to comment Share on other sites More sharing options...
raas Posted June 29, 2004 Share Posted June 29, 2004 Nize and simple solution :P but tehn iI get this Warning: ksort() expects parameter 1 to be array, null given in /home/.sites/28/site1/web/admins/bb_default.php on line 94 and then below phpbb menu with admin index, forum index and prewivew forum... When I click admin index the same page loads again bb_default?pane=right, no possibility to ad or manage :unsure: Quote Link to comment Share on other sites More sharing options...
raas Posted June 29, 2004 Share Posted June 29, 2004 A little update... It only seems to be problems with the right menu... i can call admin_forums, admin_board etc and controll it from there... :blink: Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.