| Author |
Message |
AnaT
Nuke Cadet


Joined: Jul 08, 2004
Posts: 8
|
Posted:
Thu Jul 08, 2004 7:28 am |
  |
Hi,
I installed PHPNuke 6.9 some time ago and everything works just fine. But: when I click on "Forums" on the Administration page, I get the following error message:
Fatal error: Cannot instantiate non-existent class: sql_db in XXX/nuke/html/db/db.php on line 86.
Line 86 is the following one:
$db = new sql_db($dbhost, $dbuname, $dbpass, $dbname, false);
Does anybody know what's wrong here? The file mysql.php seems to define the class sql_db (I'm running a MySQL-Database).
My PHP is ok so far, but I've got to admit that I'm not really very good at everything concerning classes... ;-(.
I really would appreciate your help!
Thanx a lot,
AnaT |
|
|
   |
 |
telli
Support Mod


Joined: Aug 21, 2003
Posts: 335
|
Posted:
Thu Jul 08, 2004 10:05 am |
  |
|
   |
 |
AnaT
Nuke Cadet


Joined: Jul 08, 2004
Posts: 8
|
Posted:
Thu Jul 08, 2004 11:18 am |
  |
No, it's located in the folder nuke/html/ which is inside the server path.
It should probably be located outside because of database-password, right?
But I don't see the connection to the class-problem... *help* |
|
|
   |
 |
telli
Support Mod


Joined: Aug 21, 2003
Posts: 335
|
Posted:
Thu Jul 08, 2004 12:43 pm |
  |
|
   |
 |
AnaT
Nuke Cadet


Joined: Jul 08, 2004
Posts: 8
|
Posted:
Thu Jul 08, 2004 12:49 pm |
  |
no, I didn't change anything. I couldn't even enter the forum administration page once and I didn't edit the files. That's why I really don't see where the problem can be... |
|
|
   |
 |
telli
Support Mod


Joined: Aug 21, 2003
Posts: 335
|
Posted:
Thu Jul 08, 2004 1:17 pm |
  |
|
   |
 |
AnaT
Nuke Cadet


Joined: Jul 08, 2004
Posts: 8
|
Posted:
Mon Jul 12, 2004 12:59 am |
  |
thanx for your answer and sorry for not responding earlier - I was away for the weekend...
Yes, the problem has been there since I started. I tried reuploading the admin/modules/forums.php as well as the /modules/Forums-folder, but nothing changed... |
|
|
   |
 |
AnaT
Nuke Cadet


Joined: Jul 08, 2004
Posts: 8
|
Posted:
Mon Jul 12, 2004 2:23 am |
  |
I just noticed that of course the config.php is not inside the server path, only the referring config.php which contains the include-command to include the "real" config.php which is of course outside the server path...
But I don't think this has anything to do with my problem, does it??? |
|
|
   |
 |
Evaders99
Site Admin


Joined: Aug 17, 2003
Posts: 12373
|
Posted:
Mon Jul 12, 2004 2:29 pm |
  |
|
     |
 |
verbaljo
Private


Joined: Jul 01, 2004
Posts: 41
|
Posted:
Mon Jul 12, 2004 11:06 pm |
  |
|
    |
 |
AnaT
Nuke Cadet


Joined: Jul 08, 2004
Posts: 8
|
Posted:
Tue Jul 13, 2004 8:43 am |
  |
hi verbaljo,
first of all, thanks for your hint - yes, sound exactly like the same problem.
But unfortunately I wasn't able to solve it with the code snippet given by Evaders99.
First of all, just like you, I didn't really know where to put it. I tried putting it in the same place you did - mainfile.php, but .... what did you mean by "replacing ONLY the require_once line for the Forums case"? The part that seems to be the right one in mainfile.php looks like this - at least in my mainfile.php:
| Code: |
if ($forum_admin == 1) {
require_once("../../../config.php");
require_once("../../../db/db.php");
} elseif ($inside_mod == 1) {
require_once("../../config.php");
require_once("../../db/db.php");
} else {
require_once("config.php");
require_once("db/db.php");
/* FOLLOWING TWO LINES ARE DEPRECATED BUT ARE HERE FOR OLD MODULES COMPATIBILITY */
/* PLEASE START USING THE NEW SQL ABSTRACTION LAYER. SEE MODULES DOC FOR DETAILS */
require_once("includes/sql_layer.php");
$dbi = sql_connect($dbhost, $dbuname, $dbpass, $dbname);
} |
I tried replacing all three require_once-lines, but then I get the following error message:
Fatal error: main(): Failed opening required '../../../../config.php' (include_path='.:/usr/local/lib/php') in /homepages/xx/xxx/htdocs/xxx/nuke/html/mainfile.php on line 88
Which config.php should be targeted in these require_once-lines? I got one "pseudo-config" referring only to the real one which I placed outside the server path. If it's the real one that should be targeted, I would have to add the corresponding path (I put in in /pincs/phpnuke/ on my account, which should correspond to /homepages/xx/xxx/htdocs/pincs/phpnuke/ on the "real" server). But I already tried adding the pincs/phpnuke-path, it didn't work either...
Thanks again for every help...
Ana.T |
|
|
   |
 |
AnaT
Nuke Cadet


Joined: Jul 08, 2004
Posts: 8
|
Posted:
Tue Jul 13, 2004 11:24 am |
  |
Hi Evaders99,
I just finished the update to BBToNuke 2.08 - doesn't change anything... The error message is just the same... Well, at least now I've got an updated system... .
Any other idea? How about the code snippet you provided for verbaljo? I also tried this but had some problems (as described in my previous post in this thread). Could you maybe help me with this????
Thanks for your help,
AnaT |
|
|
   |
 |
verbaljo
Private


Joined: Jul 01, 2004
Posts: 41
|
Posted:
Thu Jul 15, 2004 7:32 am |
  |
I will reply tonite when I get home and check my code.
My situation is slightly changed now as I have installed Admin Secure, which includes the setPath fix. Also, I am in the process of moving to a new host, so I should really wait until I know my set-up works before offering you advice
-vj |
|
|
    |
 |
Evaders99
Site Admin


Joined: Aug 17, 2003
Posts: 12373
|
Posted:
Thu Jul 15, 2004 4:58 pm |
  |
I'm not sure I understand the problem.
If you've moved your real config.php file out of your Nuke's installation folder, then use the code I provided to create a config.php file to point to your real config.php file. That's all the code was designed to do.
If there's something else with your set up, please give us the error messsages and the details your setup, so we can check it out. |
_________________ Helping those that help themselves
Read FIRST or DIE!
"Fighting is terrible, but not as terrible as losing the will to fight."
Star Wars Rebellion Network - Need Help? Evaders Squadron Coding |
|
     |
 |
AnaT
Nuke Cadet


Joined: Jul 08, 2004
Posts: 8
|
Posted:
Fri Jul 16, 2004 12:31 pm |
  |
THANKS A LOT!!
That was exactly the information I was missing - as I said, I didn't know where to put the code snippet your provided. I now replaced my "pseudo"-config.php with your code and after some adaptations to my file structure, it's working!!!
I even solved the "You are not authorised to administer this board"-problem, so it seems now I can start creating forums!!!!
THANKS AGAIN! It took me some time to understand what you meant, but you really helped me a lot!!!! |
|
|
   |
 |
|
|