If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Hybrid View

Zen Cart and PHPBB integration problem resolved

This is just a heads up for anyone who was having a problem with integration since the 1.2.7 upgrade of Zen Cart, like I was. Nothing I did solved the issue. I tried all of the suggestions, including having both Zen Cart and PHPBB in the same database. None of it worked.

Here is what worked.

1. I installed a fresh, unedited copy of BOTH Zen Cart and PHPBB (I've tried this now both ways, using separate databases and just separate table prefixes in the same database, it works in both cases), making sure I had the latest version of both before proceeding any further. I was up to date, so....

2. I tested the integration by entering several new members to the cart. They all showed up as new forum members. So far, so good.

3. I copied ALL of the database information from the already existing databases for both into the new database(s), but I only imported the data, not the structure (this was the problem, something in the structure of one of these pieces of software was conflicting with the other. I have no idea what it was.) After getting past the "Duplicate entry" issue because I was copying myself as admin over the existing admin, also myself, (as Homer would say, "DOH!"), I managed to swap over all of the data from the cart and the forum into the new database. This resolved all of my previous issues with integration and it has been working fine for a few weeks now.

I also noticed a possible reason for my initial problem. When I went back to playing with the old cart and forum, which were still both installed and working (except for the integration issue) on the website where this problem was detected originally, I noticed that if I rolled back the versions of Zen Cart and tried upgrading again, I got several SQL error messages during the upgrades. If I went into the database and checked, the updates I could look at were successful, yet the page kept tossing errors. I checked the SQL before and after the upgrades (I had several copies of the database in various stages of upgrading, so I could see side-by-side what was going on) and the chenges were definitely being made... The only problem was, for some reason, one of the upgrades neglected to add one new table, so each time I ran an upgrade, it tried to write into that table, which didn't exist. Going directly into the database gave me the chance to spot the missing table and also allowed me to create it since the upgrade wasn't doing it... For some reason, the error messages were not giving me that clue. They usually do that.

I went way back to 1.2.6 (or older, I forget now) and started over. I must have missed an upgrade along the way the first time, because now both the old and the new system are working fine. Maybe in the future, you can add levels to the upgrade scripts like PHPBB does so those of us that miss an upgrade or three can jump to the current level instead of having to install each upgrade until we reach the latest version? I won't let it happen again, but I'm not the only one who missed an upgrade, I'm sure.

One other thing I noticed. If I run the SQL patches from the admin panel, the system adds a second zen_ prefix to the new tables it creates. For example, the SQL error table zen_upgrade_exceptions becomes zen_zen_upgrade_exceptions. I have to go into the database and remove the extra zen_ prefix from any new table or the cart does not get upgraded. If I run the SQL script through phpMyAdmin, it does not add the extra zen_ prefix. The admin panel SQL upgrade does not change any of the existing tables, only tables that are created during the upgrade. It's not a problem for me since I know how to get around it now, but it was a bit confusing at first. I just run all upgrade scripts through phpMyAdmin now. Problem solved.

I hope some of this helps someone who may be arm-wrestling with integration like I was.

Re: Zen Cart and PHPBB integration problem resolved

What an adventure.

I'm guessing that there was some sort of permissions issue preventing the table from being created as intended. Either that or something peculiar with how the DB_PREFIX was being handled through the process.

As to the SQLPatches comments... it normally doesn't operate as you described.
1. Upgrades were *never* intended to be run via SQL Patches. Upgrades are intended to be run from zc_install only, esp so it can do error-checking and dependency-evaluation as it goes along.
2. Table prefixes are only added based on the DB_PREFIX setting in your configure.php files.
Sorry to hear you've had peculiar troubles. I'm just stating for the record that a future reader of this thread should note that the above measures should NOT normally be necessary, and to only attempt them as a last resort.

Ripper, thanks for sharing the details ... I know you've had a very rough ride with this one. Very glad to hear it's working again.

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

Re: Zen Cart and PHPBB integration problem resolved

I'm on Zencart 1.3.6 and for quite a while, I've been having a ridiculous time trying to get phpBB2 to be integrated but couldn't. Tried all the helpful suggestions ard the forums but nothing worked. Pretty much the same problem what a lot of people seems to be having.
I finally resorted to do a painful require-by-require trace of it all and I've finally got mine to work. But the cause is so ridiculous that it's quite funny (it would be hilarious if I didn't stay up whole night for this).
I'm not sure if all the problems out there are related to this (I actually doubt it), but hopefully this helps someone skip what I just went thru tonight.

So, the problem is kinda like what a lot of people are having ard here. Forum link doesn't appear, nick not in register page. Nothing I did with configuration.php worked.

Started tracing thru all the require() back and forth. The problem it seems for me is that the forum link and nick field doesn't appear because no matter what I do, my phpbb installation fail the tests in the phpbb class (In my installation of zc, there's a class.phpbb.php AND a class.phpBB.php. I assumed that it's just old fileset left over but the phpbb class i'm talking about is in class.phpbb.php).
I finally narrow it down in class.phpbb.php , to around line 75 - 79.

It appears that although the class could find the config.php of phpbb very well, it is unable to extract the database login data. And therefore, unable to connect and failing the installation tests.
I eventually realise it is because the string functions are all acting quite odd,

Code:

if (substr($line,0,1)!='$') continue;

was evaling to TRUE all the time?? And thus bypassing all the assignments.
And when I comment that out, the if statements all eval funny, giving false all the time?
I got tired and tried hardcoding the database data into the variables and it worked perfectly.

I'm certain there's a perfectly logical explaination to this but right now, it doesn't matter so much to me. I will probably come back and see what exactly it is about these string functions that's not right (I am guessing it's just some escape character thing), but right now, i got the forum to run, which is all I want for now.