Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] phpBB-osCommerce Bridge


gabrielk

Recommended Posts

Quick update-

 

Turns out adding the line of code to my create_account.php gives me this error now upon account creation:

 

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/cworks/public_html/includes/functions/database.php on line 99

Warning: Cannot modify header information - headers already sent by (output started at /home/cworks/public_html/includes/functions/database.php:99) in /home/cworks/public_html/includes/functions/general.php on line 33

 

 

O.k. remove that code that i told you to put in and do the following

 

search for this.

 

session_begin($customer_id, encode_ip(tep_get_ip_address()), PAGE_INDEX, FALSE, $autologin, 0);

 

and replace it with this

 

// session_begin($customer_id, encode_ip(tep_get_ip_address()), PAGE_INDEX, FALSE, $autologin, 0);

 

this should be done in the create_account.php and tell me if the error disappears.

 

Optimal

Edited by Optimalkiller
Link to comment
Share on other sites

  • Replies 149
  • Created
  • Last Reply

Top Posters In This Topic

Hmmm. Unfortunately it did not disappear. The user account is still created though. If I remember correctly it worked properly once with the first suggestion you had. I do not remember editiong any files after that. After it started coming up with the error:

 

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/cworks/public_html/includes/functions/database.php on line 99

Warning: Cannot modify header information - headers already sent by (output started at /home/cworks/public_html/includes/functions/database.php:99) in /home/cworks/public_html/includes/functions/general.php on line 33

 

I am at a loss. I appreciate the help guys!

 

 

 

O.k. remove that code that i told you to put in and do the following

 

search for this.

 

session_begin($customer_id, encode_ip(tep_get_ip_address()), PAGE_INDEX, FALSE, $autologin, 0);

 

and replace it with this

 

// session_begin($customer_id, encode_ip(tep_get_ip_address()), PAGE_INDEX, FALSE, $autologin, 0);

 

this should be done in the create_account.php and tell me if the error disappears.

 

Optimal

Edited by Trevor51590
Link to comment
Share on other sites

Just updating. Here is line 98-99 of my database.php. Hopefully this will help you out:

 

  function tep_db_fetch_array($db_query) {
return mysql_fetch_array($db_query, MYSQL_ASSOC);

 

 

Did the error start occuring after you made the change in the create_account.php or was it happening before that?

Edited by Optimalkiller
Link to comment
Share on other sites

That error pops up after the edit on the create_account.php where I add the "// " mod and remove the other.

 

 

To be honest this one has got me stumped, All I can suggest is to redo the PHP Integration mod again and see if that error disappears there must be a typo error somewhere else.

 

Sorry

 

Optimal.

Link to comment
Share on other sites

HI,

 

Sorry, a bit of confussion. When you say its best that phpBB is installed in the same directory.... should it be right inside the oscommerce catalog? like - www.myweb.com/oscommerceshop/forum. Or can it be placed in www.myweb.com/forum.

 

The reason I ask is I tried to install it into my oscommerce folder and the quicky install won't allow me to.

So if it has to be in the oscommerce folder, that means I have to install it manually? >_< thats scary :D

 

Regards,

Nancy:D

Link to comment
Share on other sites

HI,

 

Sorry, a bit of confussion. When you say its best that phpBB is installed in the same directory.... should it be right inside the oscommerce catalog? like - www.myweb.com/oscommerceshop/forum. Or can it be placed in www.myweb.com/forum.

 

The reason I ask is I tried to install it into my oscommerce folder and the quicky install won't allow me to.

So if it has to be in the oscommerce folder, that means I have to install it manually? >_< thats scary :D

 

Regards,

Nancy:D

 

 

This is how I have setup my catalog and PhpBB and works without a problem

 

www.domainname.com/catalog/ = OsCommerce

www.domainname.com/catalog/phpbb2/ = Forums

 

so all you need to do is to create another folder in the catalog folder and call it PHPBB2 and install it from there.

 

Optimal

Link to comment
Share on other sites

This is how I have setup my catalog and PhpBB and works without a problem

 

www.domainname.com/catalog/ = OsCommerce

www.domainname.com/catalog/phpbb2/ = Forums

 

so all you need to do is to create another folder in the catalog folder and call it PHPBB2 and install it from there.

 

Optimal

 

Thanx!! for me that will be a manual install. I'll look up a couple of tutorials and give it a go in a couple of days.

 

And you just know I'll be back without a clue of what I'm doing :D

 

Nancy :D

Link to comment
Share on other sites

I fixed my problem with this SEO URLs 2.0 and this contribution. If I dont use the SEO system on login and create account (SEO isnt even used on those pages) I wont get that error.

 

I post the solution here if someone else gets the same problem. Everything you gotta do is to upload a previous version of the application_top.php (the one you had before you installed SEO 2.0) but you gotta rename the file before you upload it. I named it application_top-login.php now you just gotta open login.php and create_account.php and change:

  require('includes/application_top.php');

to

  require('includes/application_top-login.php');

 

And thats it.

Link to comment
Share on other sites

  • 2 weeks later...

If any of you are still checking this board I would appreciate any help you can give me. I installed v 1.3 and I have read all of the posts here and don't seem to find anyone sharing the same problem as me - I'm guessing my problem is so basic you all figured it out without having to post - anyway to my issue:

 

In the store when I click on "my account" or "login page" I get the following error:

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/keepsake/public_html/catalog/login.php on line 21

 

Line 21 of the login.php file is:

 

include($phpbb_root_path 'extension.inc');

 

of the code block:

 

// Added for phpBB-osCommerce Bridge

define("IN_LOGIN", true);

define('IN_PHPBB', true);

$phpbb_root_path = './phpbb2';

include($phpbb_root_path 'extension.inc');

include($phpbb_root_path 'common.'.$phpEx);

 

My store is in /public_html/catalog

My phpbb is in / public_html/catalog/phpbb2

 

Apparently I don't know as much as I thought about this, because I'm not seeing the error - any help you can give I'd appreciate it.

 

Thanks!

Link to comment
Share on other sites

  • 2 weeks later...

When I try to create a new account in osC after installing the phpbb-osCommerce Bridge, I get:

 

1146 - Table 'onestepb_osc1.phpbb_users' doesn't exist

 

SELECT count(*) AS count FROM phpbb_users WHERE username LIKE 'ozarsenal%'

 

[TEP STOP]

 

It looks like the system is looking for the phpbb_users table in the osCommerce Database, rather than the phpbb2 database.

 

How do I fix the config so it looks for the correct database at this point without it stuffing anything else up?

 

I thought I'd followed all the instructions to the letter and both installs were clean before I installed the phpBB-osCommerce Bridge v 1.3 (feb 07). Obviously I've missed something...

I have searched the forums for the last hour in [Contribution] phpBB-osCommerce Bridge and the only mention of the string I could find, doesn't have an answer to my issue. Sorry in advance if i missed it...

 

Graham

Link to comment
Share on other sites

try putting a slash after the phpbb2 path like this...

 

$phpbb_root_path = './phpbb2/';

 

 

If any of you are still checking this board I would appreciate any help you can give me. I installed v 1.3 and I have read all of the posts here and don't seem to find anyone sharing the same problem as me - I'm guessing my problem is so basic you all figured it out without having to post - anyway to my issue:

 

In the store when I click on "my account" or "login page" I get the following error:

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/keepsake/public_html/catalog/login.php on line 21

 

Line 21 of the login.php file is:

 

include($phpbb_root_path 'extension.inc');

 

of the code block:

 

// Added for phpBB-osCommerce Bridge

define("IN_LOGIN", true);

define('IN_PHPBB', true);

$phpbb_root_path = './phpbb2';

include($phpbb_root_path 'extension.inc');

include($phpbb_root_path 'common.'.$phpEx);

 

My store is in /public_html/catalog

My phpbb is in / public_html/catalog/phpbb2

 

Apparently I don't know as much as I thought about this, because I'm not seeing the error - any help you can give I'd appreciate it.

 

Thanks!

Link to comment
Share on other sites

Still no answer on this one - can anyone help?

 

 

 

When I try to create a new account in osC after installing the phpbb-osCommerce Bridge, I get:

 

1146 - Table 'onestepb_osc1.phpbb_users' doesn't exist

 

SELECT count(*) AS count FROM phpbb_users WHERE username LIKE 'ozarsenal%'

 

[TEP STOP]

 

It looks like the system is looking for the phpbb_users table in the osCommerce Database, rather than the phpbb2 database.

 

How do I fix the config so it looks for the correct database at this point without it stuffing anything else up?

 

I thought I'd followed all the instructions to the letter and both installs were clean before I installed the phpBB-osCommerce Bridge v 1.3 (feb 07). Obviously I've missed something...

I have searched the forums for the last hour in [Contribution] phpBB-osCommerce Bridge and the only mention of the string I could find, doesn't have an answer to my issue. Sorry in advance if i missed it...

 

Graham

Edited by ozarsenal
Link to comment
Share on other sites

  • 4 weeks later...

First of all sorry about my english and thanks for this contribuition.

 

My question is: When I log in OsCommerce, and then i go to phpBB with the link, the user is registered, (i can see the label where tells the 'Registered Users:') but there is no session with this user.

 

Is a cookies problem?

 

Thanks in advance!

Link to comment
Share on other sites

im having one major issue with this phpbb bridge. im going to try to be as detailed as i can. please forgive any typos or jibberish as ive just spent a long time modding oscommerce and very tired from a long day at work.

 

ok, i have oscommerce installed and working fine. i installed the latest phpbb2 under a directory named forum. i followed the mod instructions one by one and doublechecked everything. all seems to be fine except somehow the forum now doesnt look for the right mysql host. it seems since i added the mod, phpbb2 doesnt like the dots in the url of the mysql server.

 

here is my config file (edited to remove sensitive info):

<?php

 

// phpBB 2.x auto-generated config file

// Do not change anything in this file!

 

// Added for phpBB-osCommerce Bridge

if(strpos($_SERVER['PHP_SELF'],'forum/admin/')) {

 

require_once('../../includes/configure.php');

require_once('../../includes/filenames.php');

 

} elseif(strpos($_SERVER['PHP_SELF'],'forum/')) {

 

require_once('../includes/configure.php');

require_once('../includes/filenames.php');

 

} else {

 

require_once('includes/configure.php');

require_once('includes/filenames.php');

 

}

 

$dbms = 'mysql4';

$dbhost = p50mysql13.secureserver.net;

$dbname = XXXXX;

$dbuser = XXXXX;

$dbpasswd = XXXXX;

// End phpBB-osCommerce Bridge

 

$table_prefix = 'phpbb_';

 

define('PHPBB_INSTALLED', true);

 

?>

 

note the mysql host url in the above then look at the error i get below:

Warning: mysql_connect(): Unknown MySQL server host 'p50mysql13secureservernet' (1) in /home/content/k/a/t/katasuka/html/forum/db/mysql4.php on line 48

 

Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource in /home/content/k/a/t/katasuka/html/forum/db/mysql4.php on line 330

 

Warning: mysql_errno(): supplied argument is not a valid MySQL-Link resource in /home/content/k/a/t/katasuka/html/forum/db/mysql4.php on line 331

phpBB : Critical Error

 

Could not connect to the database

 

note the lack of dots. i tried manually editing mysql4.php but since i am not a php programmer i cant figure out anything on fixing this. the config file looks good to me so im clueless.

 

heres my forum url: http://world-mega-mall.com/forum/

 

any help would greatly be appreciated.

 

thank you.

Link to comment
Share on other sites

well i fixed my own problem. whoever made this bridge needs to edit the install readme to include quotes around certain things...

 

from this:

<?php

 

// phpBB 2.x auto-generated config file

// Do not change anything in this file!

 

// Added for phpBB-osCommerce Bridge

if(strpos($_SERVER['PHP_SELF'],'forum/admin/')) {

 

require_once('../../includes/configure.php');

require_once('../../includes/filenames.php');

 

} elseif(strpos($_SERVER['PHP_SELF'],'forum/')) {

 

require_once('../includes/configure.php');

require_once('../includes/filenames.php');

 

} else {

 

require_once('includes/configure.php');

require_once('includes/filenames.php');

 

}

 

$dbms = 'mysql4';

$dbhost = XXXXX;

$dbname = XXXXX;

$dbuser = XXXXX;

$dbpasswd = XXXXX;

// End phpBB-osCommerce Bridge

 

$table_prefix = 'phpbb_';

 

define('PHPBB_INSTALLED', true);

 

?>

 

to this:

<?php

 

// phpBB 2.x auto-generated config file

// Do not change anything in this file!

 

// Added for phpBB-osCommerce Bridge

if(strpos($_SERVER['PHP_SELF'],'forum/admin/')) {

 

require_once('../../includes/configure.php');

require_once('../../includes/filenames.php');

 

} elseif(strpos($_SERVER['PHP_SELF'],'forum/')) {

 

require_once('../includes/configure.php');

require_once('../includes/filenames.php');

 

} else {

 

require_once('includes/configure.php');

require_once('includes/filenames.php');

 

}

 

$dbms = 'mysql4';

$dbhost = "XXXXX";

$dbname = "XXXXX";

$dbuser = "XXXXX";

$dbpasswd = "XXXXX";

// End phpBB-osCommerce Bridge

 

$table_prefix = 'phpbb_';

 

define('PHPBB_INSTALLED', true);

 

?>

Link to comment
Share on other sites

  • 3 weeks later...

Well my friends, I hope you can help me. I installed the bridge, I tried using my existing phpBB setup, but it wasn't cooperating, since it was a new site, I reinstalled phpBB in a sub-dir, dropped all my tables and restored the osCommerce database from a backup, went back through the setup and everything is working fine. User registration, login, logout, shopping cart, all forum functions are fine.

 

My problem is in the osCommerce admin tool, I can't access phpBB admin. I've been through the code and been through the database and can't figure it out. Although the query is returning results, it isn't working -- here's a screenshot (with echo's) and the code so you can see where it is blowing up. Please help, because I am stuck! (admin from phpBB directly works fine).

 

It seems to be blowing up on "if(tep_db_num_rows($adminCheck))"

 

echo $adminCheck yields: "Resource id #40"

 

phpbb.gif

 

  require('includes/application_top.php');
 $adminCheck = tep_db_query("SELECT * FROM ".TABLE_PHPBB_USERS." WHERE username='".FORUM_USERNAME."' AND user_password=MD5('".FORUM_PASSWORD."')");
echo $adminCheck . "<br>";

 if(tep_db_num_rows($adminCheck)) {
  $current_time = time();
  $adminInfo = mysql_fetch_assoc($adminCheck);
  foreach($adminInfo as $key=>$value) {
	  $$key = $value;
  }
  $user_ip = encode_ip($_SERVER['REMOTE_ADDR']);
  $session_Data = session_begin($user_id, $user_ip, PAGE_INDEX, FALSE, 0, ADMIN);
  if(isset($session_Data['session_logged_in']) && $session_Data['session_logged_in']>0) {
	  $session_id = $session_Data['session_id'];
	  echo '<meta http-equiv="refresh" content="0;url= '.DIR_WS_FORUMS_ADMIN_PANEL.'?admin=1&sid='.$session_id.'">';
  } else {
	  // ERROR
  }
 } else {
echo "This is where I blow up...";
  // ERROR
 }

 

Please help! :huh:

 

Thanks, Rachel

Link to comment
Share on other sites

Just updating. Here is line 98-99 of my database.php. Hopefully this will help you out:

 

  function tep_db_fetch_array($db_query) {
return mysql_fetch_array($db_query, MYSQL_ASSOC);

 

 

I am having the same error show up in my log, but accounts seem to be created fine. Does anyone know where/why this is called?

 

PHP Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/www/html/shop/includes/functions/database.php on line 99, referer: https :// www.mydomain.com/shop/create_account.php
Link to comment
Share on other sites

Hey guys

 

Just installed your contrib fine but I have a problem.

 

When a cusomer logs in its fine untill he goes to the homepage. Then it appers that he is logged out untill he clicks onto another page?

 

Can anybody help?

Link to comment
Share on other sites

Hey guys

 

Just installed your contrib fine but I have a problem.

 

When a cusomer logs in its fine untill he goes to the homepage. Then it appers that he is logged out untill he clicks onto another page?

 

Can anybody help?

Link to comment
Share on other sites

Hey guys

 

Just installed your contrib fine but I have a problem.

 

When a cusomer logs in its fine untill he goes to the homepage. Then it appers that he is logged out untill he clicks onto another page?

 

Can anybody help?

 

Sorry I've got this problem sorted. But now I have another. I cannot get oscommerce admin to login to phpbb admin. I just keep getting the error page?

 

Has anybody got any idea's?

Link to comment
Share on other sites

Hey again

 

HELLOOOO!!!!!!!!!!! IS ANYBODY THERE?

 

Right I'm still having trouble with the oscommerce admin logging into phpbb admin, but that is not an urgent problem. This one is!

 

When customers are trying to register they are getting this error:

 

?> 1062 - Duplicate entry '50' for key 1

 

insert into phpbb_users (user_id, username, user_password, user_session_time, user_regdate, user_email, user_from) values ('50', 'mr testert', '******************', '1179311924', '1179311924', '[email protected]', '0')

 

[TEP STOP]

 

 

Please can anybody help me out?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...