
iworld admin - 2006-08-08 00:35:54
This could be a really great class, many people are obviously trying to integrate with phpBB and there seem to be few options. Unfortunately many of us are not great programmers. I have lots of php scripts and have dopne lots of hacks to get them customized, but I'm not a programmer. I don't like programming. I just want to get something done.
So I tried this class and this is where I'm at:
I added the file as it is to my directory with login and user management scripts. Called phpbb.php
I log the user into my system then called the class this way:
$x= new phpbb('patch/to/phpbb/');
$x->login($username, $password);
The first thing I found is that in php 4 the "public" needs to be removed on ALL functions and not just the first. That wasn't really clear.
Then I got an error that it couldn't open config.php due to the path being outside the openbase dir restriction. Which it is not. So I changed the class call to this:
$x= new phpbb('/www/vhosts/csac/phpbb2/');
$x->login($username, $password);
I'm guessing that maybe 'patch/to/phpbb' means to put the path to the phpBB directory there. If so I'm not sure if that needs to be done within the phpbb.php file also or not.
Still had path problems so in the login function I replaced the three instances of
require_once( $this->patch . "
with
require_once( "/www/vhosts/csac/phpBB2/
This explicit path definition seemed to allow it to get a bit further.
However, now I get an error related to the phpBB includes/db.php function:
Warning: main(db/mysql.php): failed to open stream: No such file or directory in /usr/local/apache/vhosts/csac/phpBB2/includes/db.php on line 31
Warning: main(): Failed opening 'db/mysql.php' for inclusion (include_path='.:/usr/local/lib/php') in /usr/local/apache/vhosts/csac/phpBB2/includes/db.php on line 31
Fatal error: Cannot instantiate non-existent class: sql_db in /usr/local/apache/vhosts/csac/phpBB2/includes/db.php on line 60
I'd really like to get this figured out since it would be great to be able to use the whole package, such as registration etc.
It's possible I'm doing something obviously wrong. I'm not certain if I'm using it right or not. It's too bad there are not any examples or any better documentation to work from.
Any idea how to make this work?
I have php 4.something and the latest phpBB (2.0.21)