You are here:
/ Dashboard / Main / ExternalApplicationHostingphpBB

Hosting phpBB in Virtuoso

What is phpBB ?

phpBB is the most famous OpenSource product for online forums. Here you can find instructions how to use Virtuoso Database for hosting phpBB tables, and use it as Application Server with php hosting. There is also a description how to make Virtuoso News tables, show as phpBB forums and actually use phpBB for reading and posting news.

Install Instructions

Hosting php code on apache and using Virtuoso database.

For this purpose we must extend phpBB with support for virtuoso database. Perform the following steps:

  1. Download phpBB version 2.0.21
  2. Apply the patch phpBB-virtuoso_db.patch**
  3. Hit the address where you extracted the files via web browser. You will see the Installation page. Ex. http://localhost:8889/phpBB2/index.php
  4. Select Virtuoso from databases list and enter a ODBC DSN which will connect to Virtuoso
  5. Proceed the installation process. It is pretty straight forward and self-describing.
    • The most important part is that you end up with a phpBB/config file like this:

      <?php // phpBB 2.x auto-generated config file // Do not change anything in this file! $dbms = 'virtuoso'; $dbhost = 'Local Virtuoso phpBB'; $dbname = 'phpBB'; $dbuser = 'dba'; $dbpasswd = 'somepassword'; $table_prefix = 'phpbb_'; define('PHPBB_INSTALLED', true); ?>

      In principle, the patch may apply to other versions, but the files containing the basic data has to be updated with the version number.

Note: The upgrade function has not been tested, but in theory if you upgrade using patches you shouldn't have problems.

Hosting phpbb code in Virtuoso.

If you are using windows binary with php4, until bug #10907 is fixed, in order to host phpBB on Virtuoso you must apply the patch phpBB-virtuoso_host.patch** After you patch you can repeat the steps described in the section above.

On unix/linux system and with windows with php5 you DO NOT need to apply this patch

Using phpBB for posting and reading news in Virtuoso.

Repeat the steps above to get phpBB working as you desire. When you make your ODBC DSN make sure you enter phpBB as default database. When installing phpBB leave the tables prefix to default "phpbb_". If you do not perform those you must manually fix the sql files applied after that. Install Framework vad package (ods_dav.vad) -- It is used for user management. Using isql or conductor execute the following files in that order:

  • phpBB-news-create_procedures.sql** -- create procedures needed later.
  • phpBB-news-fill_tables.sql** -- modifies the phpBB tables and fills them with data from Virtuoso News tables and ODS tables
  • phpBB-news-create_triggers.sql** -- creates the triggers which will sync the data between phpBB and Virtuoso news tables

There is a problem with the automatic redirect after post than can be fixed by applying the patch phpBB-news-post-redirect-fix.patch**

In case you are updating the integration routines, just rerun the sql files in the same order.

In order to make new news groups or to subscribe to other servers you must use admin or conductor UI. To register in phpBB you must register in ODS app.

Note: To get the latest version of the files look into Virtuoso Commercial CVS - binsrc/samples/phpBB

Useful configuration variables


update phpbb_config set config_value='discussion.openlinksw.com' where config_name='sitename'

update phpbb_config set config_value='80' where config_name='server_port'

update phpbb_config set config_value='/' where config_name='script_path' 

update phpbb_config set config_value='OpenLink Software discussion forum server' where config_name='site_desc'

Installing Easymod 0.3.0 for phpBB module management.

  1. Download Easymod version 0.3.0
  2. Extract the downloaded file in [your phpBB installation path]/admin/mods (if mods doesn't exists - create it). So you have easymod dir under mods
  3. Apply the patch *phpBB-virtuoso_db.patch*
  4. Hit the easymod installation page with a web browser. It should be something like: http://localhost:8889/phpBB2/admin/mods/easymod/easymod_install.php
  5. You will see a step by step instruction for installing easymod. On the first page select the last radio button if you are not sure. Most probably you have local access and don't need ftp.
  6. Proceed the installation process. It is pretty straight forward and self-describing. Ignore the Warnings on the page executing the sql statements - they are only warnings.

If is highly recommended to use easymod for installing phpBB modules. That way you can make upgrade on phpBB as well as different modules. You can also revert a module after you have installed it.

Installing ldapAuthmod_1_1_8b module for LDAP authentication.

In order to use this module you need LDAP support in php. The simples way to verify you have such support is to create a php file containing phpinfo(); procedure.

phpinfo.php


<?php
  phpinfo();
?>

This will produce php hosting details, when you hit this file with a web browser. Then just look for LDAP in the page.

You can then install ldapAuthmod_1_1_8b using Easymod. However at the time of this writing the ldapAuthmod_1_1_8b is outdated and will not install cleanly on the latest versions of phpBB (2.0.20 & 2.0.21). There is a patch phpBB-ldapAuthmod_1_1_8b-fix-2.0.20.patch which fixes this problem. So:

  1. Download LDAP Auth MOD (phpBB) version 1.1.8b
  2. Extract the downloaded file in [your phpBB installation path]/admin/mods
  3. Goto the Administrations panel of phpBB and click on "Install MODs" link in the left navigation.
  4. Proceed the installation process. It is pretty straight forward and self-describing.

Now you should have LDAP support in phpBB. You can go to Administration Panel (to see the administration panel you must be logged with dav or admin account) and configure it. For example the settings for Openlink LDAP server are:


Authentication Mode: LDAP
LDAP Host Name:[name of the LDAP server]
Base DN: ou=Accounts,o=OpenLink Software,c=US
LDAP property/field containing user e-mail addresses: mail
Proxy DN: uid=[user],ou=Accounts,o=OpenLink Software,c=US
Proxy DN Password: [pass]

Please note that Proxy DN settings are important since otherwise, the users emails are lost upon login, which then creates problems with who posted what.

Also note that if the user is not found it will be verified against the local installation, so ODS registered users that doesn't overlap with LDAP user will continue to work.

Installing OpenID module for openid authentication.

In order to use this module you need CURL support in php. The simples way to verify you have such support is to create a php file containing phpinfo(); procedure.

phpinfo.php


<?php
  phpinfo();
?>

This will produce php hosting details, when you hit this file with a web browser. Then just look for CURL in the page.

You can then install OpenID using Easymod. Please note that it is save to install OpenID module after ldapAuthmod, but not the other way around. Meaning if you install OpenID you will later on have problems installing ldapAuthmod and you'll have to modify the code manually. The procedure is.

  1. Copy the directory [virtuoso cvs checkout]/binsrc/samples/phpbb2/phpBB-openid in [your phpBB installation path]/admin/mods
  2. Goto the Administrations panel of phpBB and click on "Install MODs" link in the left navigation.
  3. Proceed the installation process. It is pretty straight forward and self-describing.

To enable OpenID authentication look for "Allow OpenID logins" in the Configuration page.

  • NB the patch is against the version of phpBB2 patched with phpBB-virtuoso_host.patch and phpBB-virtuoso_db.patch
  • The latest versions of the patch files can be located in CVS checkout binsrc/samples/phpbb2 directory.
Virtuoso and the Virtuoso Website are Copyright (C) OpenLink Software 2006-
SourceForge.net Logo