|
|
Re: fud_sql_error_handler() not defined for FUDAPI calls [message #29592 is a reply to message #29585] |
Mon, 02 January 2006 16:37 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
Actually to work fudapi.inc.php requires you to load GLOBALS.php. This files loads core.inc for you automatically, so there should be no need for additional includes.
As far as permission error goes, you need to either unlock the forum, or chmod the error_log file 666.
FUDforum Core Developer
|
|
|
Re: fud_sql_error_handler() not defined for forum_login.php calls [message #29598 is a reply to message #29592] |
Mon, 02 January 2006 19:13 |
|
naudefj
Messages: 3771 Registered: December 2004
Karma: 28
|
Senior Member Administrator Core Developer |
|
|
Thank you for the reply and sorry for the confusing subject - s/FUDAPI/forum_login.php/g.
As you can see from the code below, forum_login.php loads the required settings from GLOBALS.php by itself:
/* load forum config */
$data = file_get_contents($GLOBALS['PATH_TO_FUD_FORUM_GLOBALS_PHP']);
eval(str_replace('<?php', '', substr_replace($data, '', strpos($data, 'require'))));
/* db.inc needs certain vars inside the global scope to work, so we export them */
foreach (array('COOKIE_DOMAIN','COOKIE_NAME','COOKIE_TIMEOUT','COOKIE_PATH','FUD_OPT_1', 'FUD_OPT_3', 'FUD_OPT_2', 'DBHOST', 'DBHOST_USER', 'DBHOST_PASSWORD', 'DBHOST_DBNAME','DATA_DIR','INCLUDE') as $v) {
$GLOBALS[$v] = $$v;
}
Best regards.
Frank
|
|
|
|
Re: fud_sql_error_handler() not defined for forum_login.php calls [message #29606 is a reply to message #29601] |
Tue, 03 January 2006 05:38 |
|
naudefj
Messages: 3771 Registered: December 2004
Karma: 28
|
Senior Member Administrator Core Developer |
|
|
Thank you very much.
In addition to your patch, can you please also commit the following (db.inc also needs DBHOST_TBL_PREFIX):
--- forum_login.php.old 2006-01-02 23:34:48.000000000 -0600
+++ forum_login.php 2006-01-02 23:35:13.000000000 -0600
@@ -56,7 +56,7 @@
eval(str_replace('<?php', '', substr_replace($data, '', strpos($data, 'require'))));
/* db.inc needs certain vars inside the global scope to work, so we export them */
- foreach (array('COOKIE_DOMAIN','COOKIE_NAME','COOKIE_TIMEOUT','COOKIE_PATH','FUD_OPT_1', 'FUD_OPT_3', 'FUD_OPT_2', 'DBHOST', 'DBHOST_USER', 'DBHOST_PASSWORD', 'DBHOST_DBNAME','DATA_DIR','INCLUDE') as $v) {
+ foreach (array('COOKIE_DOMAIN','COOKIE_NAME','COOKIE_TIMEOUT','COOKIE_PATH','FUD_OPT_1','FUD_OPT_3','FUD_OPT_2','DBHOST','DBHOST_USER','DBHOST_PASSWORD','DBHOST_DBNAME','DBHOST_TBL_PREFIX','DATA_DIR','INCLUDE') as $v) {
$GLOBALS[$v] = $$v;
}
|
|
|
|
|