Personal tools
You are here: Home iber Blog Plone How to migrate from phpbb to Plone

How to migrate from phpbb to Plone How to migrate from phpbb to Plone

Document Actions
Getting Plone and phpBB to use the same Usernames and Passwords HOWTO. A way of integrating Plone with phpBB mySql members info rather than a full migration.

Here is a link to the main info.
"from phpbb to Plone":

Informational Links:

Products required for Plone/phpBB MySQL connection (install from
command line in Debian):

apt-get install python-mysqldb

Products required for Plone/phpBB MySQL connection (from within Zope):


Untar into /user/lib/zope/lib/python/Products

Restart Zope. Verify that both exUserFolder and ZMySQLDA installed
properly by clicking on the Control Panel --> Products links in the
ZMI. If they didn't, figure out why.

In ZMI root, add:

"Z MySQL Database Connection" from the dropdown menu.

Supply the database, and the username and password for access when prompted.

If it works, it should say the connection is open.

Access your phpBB Database using phpMyAdmin:

ExUserFolder requires the table name, username column name, password
column name, and a Zope Roles column name. Inside the phpbb2
database, the usernames and passwords for phpBB are located in the
phpbb_users table. All of the above information is there with the
exception of the Zope Roles column. I had to create this 'zope_roles'
column in the phpbb_users table as this is where Zope/Plone stores its
Roles for that particular user. The column had the following

Field: zope_roles
Type: varchar(255)
Null: No
Default: Member

I also had to run the following SQL within the phpbb2 database:

username varchar(64) NOT NULL PRIMARY KEY,
password varchar(64) NOT NULL,
roles varchar(255)

CREATE TABLE UserProperties (
username varchar(64) NOT NULL,
prop_key varchar(128) NOT NULL,
value text NOT NULL,
istemporary int

CREATE UNIQUE INDEX username_prop_idx on UserProperties(username,prop_key );
CREATE INDEX username_idx on UserProperties(username);

This SQL came with the exUserFolder product and is required.

Modifying the password encryption used in exUserFolder:

PhpBB stores md5 hashes of your password in its database. As
supplied, exUserFolder uses DES encryption. In order to use md5
hashes I needed to edit located in
exUserFolder/mysqlAuthSource/ and add the following (replaced
"Original cryptPassword function"):

# Original cryptPassword function
# def cryptPassword(self, username, password):
# salt =username[:2]
# secret = crypt(password, salt)
# return secret

# Alternate cryptPassword function, returns md5 hash of the password
def cryptPassword(self, username, password):
passhash =
secret = passhash.hexdigest()
return secret

I also had to add ",md5" to the import statement at the beginning of
the file in order to use md5 encryption.

NOTE: This code was taken from in exUserFolder/pgAuthSourceAlt

Restart Zope from either the ZMI or the command line. md5 hashes now are used.

In your Plone root in the ZMI (e.g. /testing/):

If there is an acl_users folder in the Plone site, delete it. Do NOT
delete acl_users from the ZMI root or you will be screwed.

Add "ex User Folder" from drop down menu in your Plone root. Supply
the following information:

Add MySQL Authentication Source
Database Connection: MySQL_database_connection
Table Name: phpbb_users
Username Column: username
Password Column: user_password
Roles Column: zope_roles

Restart Zope from either the ZMI or the command line.

Success! You can now log into Plone using an existing name from phpBB!

If you receive an error, take a look at the error message in your
Plone portal and your traceback in your Error Log in the ZMI. From
those two error screens, you should have an idea what went wrong.
Correct your mistakes and restart Zope. Test. Wash, lather, rinse,
repeat until successful.

We're not out of the woods yet. We still need to deal with a couple things.

First off, Joining a Plone site from the Plone side will cause a
problem. As supplied, anyone can join a Plone site by clicking the
Join link at the top of the page. Joining a Plone/phpBB website from
the Plone side is BAD as phpBB needs additional information from you
in order to function properly. In order to fix this, we need the Join
link to always take you to the phpBB registration screen instead of
the Plone registration screen.

Change link to where Join points:

Click portal_registration in the ZMI.

Change action from 'string:${portal_url}/join_form' to

This takes care of directing the anonymous user to Join at the
bulletin board. However, it doesn't keep someone that is savvy with
Plone from accessing the /join_form within Plone itself.

To keep someone from accessing the join_form:

Customize the join_form in portal_skins/plone_forms/ by clicking on
join_form and then on the customize button.

In portal_skins/custom/ click on join_form and then click on its Security tab.

Uncheck Acquire from the View action and check it for Manager.

Now only the manager of the website can get to this form. Anyone else
will be prompted to log in instead. If down the road you want to go
back to allowing people access to join_form, just delete it out of
your /custom/ folder or rename it.

Second, phpBB doesn't have as rigid of username requirements as Plone
does. Because of this, members of your phpBB website can use
non-standard characters in their usernames that Plone will not want to
work with. These non-standard characters include .,# <at> !{})*%, etc, and
can cause errors for that user if he/she tries to log in with that
non-standard name. Errors are primarily the lack of a Member Folder.
To fix this on phpBB's side, do the following:

In line 106 of includes/functions_validate is a list of not allowed chars:

// Don't allow " and ALT-255 in username.
if (strstr($username, '"') || strstr($username, '&quot;') ||
strstr($username, chr(160)))

You can add more characters to this line by putting as many as you
want of thes before the last two "))":

|| strstr($username, 'CHARACTER')

Here is where we will add our characters. Once done, replace the
existing one on your server and you're done.

That's it! You should now have a fully functional integration between
Plone and phpBB!

Tuesday, April 05, 2005 in Plone  |  Permalink |  Comments (0)
iber Blog
« June 2019 »
Su Mo Tu We Th Fr Sa
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
Recent entries:
World Plone Day 2009 in Lviv, Ukraine
World Plone Day in Lviv, Ukraine.
Plug & Plone Logo
Plone on Content Technology Vendor map 2008
Plone, SEO and international calls.
Plone skins development
Alfresco vs Plone, is Alfresco the perfect open source ECMS
Plone-dislike keyword proposal
The Plone Blog launched
BusinessWeek Magazine published Best of The New Web Report
Mambo CMS, Mambo foundation and Miro Software
Plone disadvantages, SQL Storage capability
Lviv Photos : St. George Cathedral
Why people choose Drupal over Plone
Zope Hosting and Performance, ZEO
How does the Yahoo Publisher Network compare to Adsense?
How to delete spam in COREBlog
What is Zope
Separate Data.fs files for each Zope instance, cache size
Export an OWL ontology into a working Plone content-type
Python guru Interview - Guido van Rossum
Google job interview at Google Hyderabad
Zope disadvantages
President of Ukraine : Yushchenko speaks to Congress
Connect brain with Sony PlayStation.
Free open source enterprise software stack
MarketWatch: Ukraine's small market draws interest in revolution's wake
How to migrate from phpbb to Plone
Google agrees to acquire Urchin, statistic software.
Content Management Systems (2)
Digital (1)
Google (3)
Internet Marketing (2)
Open Source Software (3)
Plone (13)
Search Engine Optimization (1)
Ukraine (5)
Zope (5)

Powered by Plone