forum.coppermine-gallery.net

Support => Older/other versions => cpg1.2 PHPnuke/Postnuke Support => Topic started by: Distl on November 08, 2003, 08:54:20 pm

Title: [SOLVED wrong Nuke] Fatal error:
Post by: Distl on November 08, 2003, 08:54:20 pm
Hi,

I get this error after update from 1.1

Call to a member function on a non-object in /home/www/html/modules/coppermine/index.php on line 31

Line 31:

$value = $db->sql_fetchrow($db->sql_query($sql));

Regards
Title: [SOLVED wrong Nuke] Fatal error:
Post by: DJMaze on November 09, 2003, 12:17:23 am
phpNuke 6.5 or up ?
Title: [SOLVED wrong Nuke] Fatal error:
Post by: Distl on November 09, 2003, 12:23:30 am
Yes phpNuke 6.5
Title: [SOLVED wrong Nuke] Fatal error:
Post by: DJMaze on November 09, 2003, 12:44:56 am
Did you make any changes like adding modules or blocks.

Also do a search in all files for: trigger_error(
Title: [SOLVED wrong Nuke] Fatal error:
Post by: Distl on November 09, 2003, 10:08:30 am
I didnt make any changes in any file.
CPG 1.1 worked fine until I updated it to the 1.2
This error is happen in every admin link.

In CPG Batch Add Pics:

Fatal error: Call to a member function on a non-object in /home/www/html/modules/coppermine/searchnew.php on line 30

In CPG Comment Mgr:

Fatal error: Call to a member function on a non-object in /home/www/html/modules/coppermine/reviewcom.php on line 30


And so on.

I couldnt find any line with trigger_error
Title: [SOLVED wrong Nuke] Fatal error:
Post by: DJMaze on November 09, 2003, 06:03:39 pm
Did you add any bug/security fixes from a website like nukecops.com or nukefixes.com ?
Title: [SOLVED wrong Nuke] Fatal error:
Post by: Distl on November 09, 2003, 06:09:13 pm
Quote from: "DJMaze"
Did you add any bug/security fixes from a website like nukecops.com or nukefixes.com ?


No. I wonder why Version 1.1 runs stable without any errors.
Title: [SOLVED wrong Nuke] Fatal error:
Post by: DJMaze on November 09, 2003, 06:21:25 pm
Open modules/coppermine/index.php
and replace the line: require_once("mainfile.php") into
Code: [Select]
define('inside_mod', 1);
$inside_mod = 1;
require_once("mainfile.php");
echo "DB is a ". $db. "<BR>\n";

Now the top of the page should say: "DB is a object"
Title: [SOLVED wrong Nuke] Fatal error:
Post by: DJMaze on November 09, 2003, 08:26:58 pm
REMOVE
Title: [SOLVED wrong Nuke] Fatal error:
Post by: Distl on November 10, 2003, 09:47:00 am
"DB is a" comes out.
Title: [SOLVED wrong Nuke] Fatal error:
Post by: DJMaze on November 10, 2003, 02:55:13 pm
change:
Code: [Select]
define('inside_mod', 1);
$inside_mod = 1;
require_once("mainfile.php");
echo "DB is a ". $db. "<BR>\n";

into:
Code: [Select]
require_once("mainfile.php");
global $db;
echo "DB is a ". $db. "<BR>\n";

also try:
Code: [Select]

require_once("mainfile.php");

include('modules/'.$name.'/include/config.inc.php');
$sql = "SELECT value FROM ".$cpg_prefix."config WHERE name='nice_titles'";
$value = sql_fetch_row(sql_query($sql, $dbi), $dbi);
Title: [SOLVED wrong Nuke] Fatal error:
Post by: Distl on November 10, 2003, 05:33:25 pm
No Both of them wont work. Sorry.
Title: [SOLVED wrong Nuke] Fatal error:
Post by: DJMaze on November 10, 2003, 06:30:30 pm
Ok now i've lost it and nobody else has the problem so please post all info that is described in this topic:

http://forum.coppermine-gallery.net/index.php?topic=1440
Title: [SOLVED wrong Nuke] Fatal error:
Post by: DJMaze on November 12, 2003, 01:20:38 am
Distl you've found out that you are not using phpNuke 6.5 or up ?

Else place a link to your gallery in here.
Title: [SOLVED wrong Nuke] Fatal error:
Post by: Distl on November 12, 2003, 09:01:44 am
Yes sorry I am using 6.0 and it wont work with that version.
Title: [SOLVED wrong Nuke] Fatal error:
Post by: DJMaze on November 12, 2003, 11:50:59 am
Here's a sneaky test version that will also work in Nuke 6.0.

This is NOT finnished and contains bugs http://www.mp3tunes.nl/coppermine/coppermine.zip
Overwrite your coppermine 1.2 install and run these in phpMyAdmin:

UPDATE nuke_users SET user_group_cp='3' WHERE uid='-1';
UPDATE nuke_users SET user_group_cp='3' WHERE uid='1';
UPDATE nuke_users SET user_group_cp='1' WHERE uid='2';

When you removed your install DON'T TRY THIS.

If you gonna try it, please post all bugs in this topic.