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
phpNuke 6.5 or up ?
Yes phpNuke 6.5
Did you make any changes like adding modules or blocks.
Also do a search in all files for: trigger_error(
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
Did you add any bug/security fixes from a website like nukecops.com or nukefixes.com ?
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.
Open modules/coppermine/index.php
and replace the line: require_once("mainfile.php") intodefine('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"
REMOVE
"DB is a" comes out.
change:define('inside_mod', 1);
$inside_mod = 1;
require_once("mainfile.php");
echo "DB is a ". $db. "<BR>\n";
into:require_once("mainfile.php");
global $db;
echo "DB is a ". $db. "<BR>\n";
also try:
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);
No Both of them wont work. Sorry.
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
Distl you've found out that you are not using phpNuke 6.5 or up ?
Else place a link to your gallery in here.
Yes sorry I am using 6.0 and it wont work with that version.
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.