HELP Error when trying to create users in Phorum from main system
Posted by KWood
|
HELP Error when trying to create users in Phorum from main system November 02, 2008 08:23AM |
Registered: 17 years ago Posts: 30 |
I am trying to create users in Phorum when they are created i the main system..
I have used the you made in another tread but get an error:
the code (with a change in sitename):
$curcwd = getcwd();
chdir("/hsphere/local/home/siteYY/siteXX/medlemv2/phorum");
define('phorum_page','create_user');
include("./common.php");
echo "Opret medlem";
/*phorum_api_user_save(array(
"user_id" => $idb, // or the user id from your main user database
"username" => $brugernavn,
"real_name" => $brugernavn,
"password" => $passencrypt,
"active" => $PH_status,
"hide_email"=> "TRUE",
"email" => $email1
));*/
chdir($curcwd);
the error:
Opret medlem Fatal error: main(): Failed opening required './include/db/.php' (include_path='.:/hsphere/shared/apache/libexec/php4ext/php/') in /hsphere/local/home/siteYY/siteXX/medlemv2/phorum/common.php on line 146
Its seems like it includes the common.php correctly but fails the create the variabels for the database (running the script under /phorum directly without using the chdir works fine...
HELP :-)
I have used the you made in another tread but get an error:
the code (with a change in sitename):
$curcwd = getcwd();
chdir("/hsphere/local/home/siteYY/siteXX/medlemv2/phorum");
define('phorum_page','create_user');
include("./common.php");
echo "Opret medlem";
/*phorum_api_user_save(array(
"user_id" => $idb, // or the user id from your main user database
"username" => $brugernavn,
"real_name" => $brugernavn,
"password" => $passencrypt,
"active" => $PH_status,
"hide_email"=> "TRUE",
"email" => $email1
));*/
chdir($curcwd);
the error:
Opret medlem Fatal error: main(): Failed opening required './include/db/.php' (include_path='.:/hsphere/shared/apache/libexec/php4ext/php/') in /hsphere/local/home/siteYY/siteXX/medlemv2/phorum/common.php on line 146
Its seems like it includes the common.php correctly but fails the create the variabels for the database (running the script under /phorum directly without using the chdir works fine...
HELP :-)
|
Re: HELP Error when trying to create users in Phorum from main system November 02, 2008 09:08AM |
Admin Registered: 21 years ago Posts: 8,532 |
I don't see what's going wrong for you. What seems to be missing, are the variables from include/db/config.php. Maybe $PHORUM is out of scope or so (although that shouldn't happen IMO). You could try adding this to the start of your code:
[code="php"]
global $PHORUM;
[/code]
Something to start with for debugging is checking if include/db/config.php is loaded when you start your script.
Maurice Makaay
Phorum Development Team
my blog
linkedin profile
secret sauce
[code="php"]
global $PHORUM;
[/code]
Something to start with for debugging is checking if include/db/config.php is loaded when you start your script.
Maurice Makaay
Phorum Development Team
my blog
linkedin profile
secret sauce
|
Re: HELP Error when trying to create users in Phorum from main system November 02, 2008 09:36AM |
Registered: 17 years ago Posts: 30 |
|
Re: HELP Error when trying to create users in Phorum from main system November 02, 2008 09:55AM |
Admin Registered: 21 years ago Posts: 8,532 |
Based on the error, $PHORUM['DBCONFIG'] or at least $PHORUM['DBCONFIG']['type'] is empty. So try to track if that is setup correctly from include/db/config.php and track if it is still available when common.php tries to load the db layer code at line 146.
Maurice Makaay
Phorum Development Team
my blog
linkedin profile
secret sauce
Maurice Makaay
Phorum Development Team
my blog
linkedin profile
secret sauce
|
Re: HELP Error when trying to create users in Phorum from main system November 02, 2008 10:01AM |
Registered: 17 years ago Posts: 30 |
This is pretty wierd... as for testing I change line 146 to:
require_once( "./include/db/{$PHORUM['DBCONFIG']['type']}.php".test );
which gives the following error:
Fatal error: main(): Failed opening required './include/db/mysql.phptest' (include_path='.:/hsphere/shared/apache/libexec/php4ext/php/') in /hsphere/local/home/madam/madammangor.dk/medlemv2/phorum/common.php on line 146
So because I added some tekst at the end, suddently the $PHORUM has value...
it still only the adin that fails,,,
Phorum is working fine on it self...
I Am really lost...
require_once( "./include/db/{$PHORUM['DBCONFIG']['type']}.php".test );
which gives the following error:
Fatal error: main(): Failed opening required './include/db/mysql.phptest' (include_path='.:/hsphere/shared/apache/libexec/php4ext/php/') in /hsphere/local/home/madam/madammangor.dk/medlemv2/phorum/common.php on line 146
So because I added some tekst at the end, suddently the $PHORUM has value...
it still only the adin that fails,,,
Phorum is working fine on it self...
I Am really lost...
|
Re: HELP Error when trying to create users in Phorum from main system November 02, 2008 10:24AM |
Registered: 17 years ago Posts: 30 |
Hi again
The $PHORUM variable is passed trough... changing line 146 to this:
require_once( "./include/db/{$PHORUM['DBCONFIG']['type']}.php".$PHORUM['DBCONFIG']['type'] );
gives the output:
Fatal error: main(): Failed opening required './include/db/mysql.phpmysql' (include_path='.:/hsphere/shared/apache/libexec/php4ext/php/') in /hsphere/local/home/madam/madammangor.dk/medlemv2/phorum/common.php on line 146
I just dont get it...
The $PHORUM variable is passed trough... changing line 146 to this:
require_once( "./include/db/{$PHORUM['DBCONFIG']['type']}.php".$PHORUM['DBCONFIG']['type'] );
gives the output:
Fatal error: main(): Failed opening required './include/db/mysql.phpmysql' (include_path='.:/hsphere/shared/apache/libexec/php4ext/php/') in /hsphere/local/home/madam/madammangor.dk/medlemv2/phorum/common.php on line 146
I just dont get it...
|
Re: HELP Error when trying to create users in Phorum from main system November 02, 2008 10:29AM |
Registered: 17 years ago Posts: 30 |
The weird continues:
changing line 146 to:
require_once("./include/db/{$PHORUM['DBCONFIG']['type']}.php".p );
gives:
Fatal error: main(): Failed opening required './include/db/mysql.phpp' (include_path='.:/hsphere/shared/apache/libexec/php4ext/php/') in /hsphere/local/home/madam/madammangor.dk/medlemv2/phorum/common.php on line 146
but
require_once("./include/db/{$PHORUM['DBCONFIG']['type']}.ph".p );
gives:
Opret medlem Fatal error: main(): Failed opening required './include/db/.php' (include_path='.:/hsphere/shared/apache/libexec/php4ext/php/') in /hsphere/local/home/madam/madammangor.dk/medlemv2/phorum/common.php on line 146
I just dont get this...
changing line 146 to:
require_once("./include/db/{$PHORUM['DBCONFIG']['type']}.php".p );
gives:
Fatal error: main(): Failed opening required './include/db/mysql.phpp' (include_path='.:/hsphere/shared/apache/libexec/php4ext/php/') in /hsphere/local/home/madam/madammangor.dk/medlemv2/phorum/common.php on line 146
but
require_once("./include/db/{$PHORUM['DBCONFIG']['type']}.ph".p );
gives:
Opret medlem Fatal error: main(): Failed opening required './include/db/.php' (include_path='.:/hsphere/shared/apache/libexec/php4ext/php/') in /hsphere/local/home/madam/madammangor.dk/medlemv2/phorum/common.php on line 146
I just dont get this...
|
Re: HELP Error when trying to create users in Phorum from main system November 02, 2008 10:39AM |
Admin Registered: 23 years ago Posts: 9,240 |
|
Re: HELP Error when trying to create users in Phorum from main system November 02, 2008 10:46AM |
Registered: 17 years ago Posts: 30 |
|
Re: HELP Error when trying to create users in Phorum from main system November 02, 2008 10:48AM |
Admin Registered: 23 years ago Posts: 9,240 |
sure from common.php but from different includes.
The first error message is with a wrong change on the first include.
The second error message is after your echo
[code="php"]
echo "Opret medlem";
[/code]
so you are including common.php twice. somewhere lower in your code.
Thomas Seifert
The first error message is with a wrong change on the first include.
The second error message is after your echo
[code="php"]
echo "Opret medlem";
[/code]
so you are including common.php twice. somewhere lower in your code.
Thomas Seifert
Sorry, only registered users may post in this forum.
