Author Topic: Random images problem  (Read 16430 times)

0 Members and 1 Guest are viewing this topic.

Offline djavet

  • Jr. Member
  • **
  • Posts: 79
    • View Profile
Random images problem
« on: January 28, 2003, 02:09:36 PM »
Hello,

After I installed the mod:
-> http://4homepages.de/forum/viewtopic.php?t=1020&postdays=0&postorder=asc&start=0
Scriptversion: 1.0 for 4images 1.6.1

I receive this error:
Quote
Fatal error: Call to undefined function: query_firstrow() in /home/virtual/site84/fst/var/www/html/portfolio/gallery/random.php on line 46


And if I access the random.php directly:
Quote
Warning: Unable to access ./portfolio/gallery/config.php in /home/virtual/site84/fst/var/www/html/portfolio/gallery/random.php on line 30

Warning: Failed opening './portfolio/gallery/config.php' for inclusion (include_path='.:/php/includes:/usr/share/php') in /home/virtual/site84/fst/var/www/html/portfolio/gallery/random.php on line 30

Warning: Unable to access ./portfolio/gallery/includes/db_mysql.php in /home/virtual/site84/fst/var/www/html/portfolio/gallery/random.php on line 31

Warning: Failed opening './portfolio/gallery/includes/db_mysql.php' for inclusion (include_path='.:/php/includes:/usr/share/php') in /home/virtual/site84/fst/var/www/html/portfolio/gallery/random.php on line 31

Warning: Unable to access ./portfolio/gallery/includes/constants.php in /home/virtual/site84/fst/var/www/html/portfolio/gallery/random.php on line 32

Warning: Failed opening './portfolio/gallery/includes/constants.php' for inclusion (include_path='.:/php/includes:/usr/share/php') in /home/virtual/site84/fst/var/www/html/portfolio/gallery/random.php on line 32

Fatal error: Cannot instantiate non-existent class: db in /home/virtual/site84/fst/var/www/html/portfolio/gallery/random.php on line 34


My random.php code are:
Code: [Select]
<?php
/**************************************************************************
 *                                                                        *
 *    4images - A Web Based Image Gallery Management System               *
 *    ----------------------------------------------------------------    *
 *                                                                        *
 *             File&#58; random.php                                           *
 *        Copyright&#58; &#40;C&#41; 2002 Jan Sorgalla                                *
 *            Email&#58; jan@4homepages.de                                    *
 *              Web&#58; http&#58;//www.4homepages.de                             *
 *    Scriptversion&#58; 1.0 for 4images 1.6.1                                *
 *                                                                        *
 *    Never released without support from&#58; Nicky &#40;http&#58;//www.nicky.net&#41;   *
 *                                                                        *
 **************************************************************************
 *                                                                        *
 *    Dieses Script ist KEINE Freeware. Bitte lesen Sie die Lizenz-       *
 *    bedingungen &#40;http&#58;//www.4homepages.de/4images/lizenz.php&#41; für       *
 *    weitere Informationen.                                              *
 *    ---------------------------------------------------------------     *
 *    This script is NOT freeware! Please read the Copyright Notice       *
 *    &#40;http&#58;//www.4homepages.de/4images/lizenz_e.php&#41; for further         *
 *    information.                                                        *
 *                                                                        *
 *************************************************************************/

// PATH to your 4images Gallery / PFAD zu Ihrer 4images Gallerie
define&#40;'ROOT_PATH', './portfolio/gallery/'&#41;;

include&#40;ROOT_PATH.'config.php'&#41;;
include&#40;ROOT_PATH.'includes/db_mysql.php'&#41;;
include&#40;ROOT_PATH.'includes/constants.php'&#41;;

$site_db = new Db&#40;$db_host, $db_user, $db_password, $db_name&#41;;
function is_remote&#40;$file_name&#41; &#123;
  
return &#40;preg_match&#40;'#^https?\\&#58;\\/\\/[a-z0-9\-&#93;+\.&#40;[a-z0-9\-&#93;+\.&#41;?[a-z&#93;+#i', $file_name&#41;&#41; ? 1 &#58; 0;
&#125;

$sql "SELECT COUNT&#40;*&#41; as total_images
        FROM "
.IMAGES_TABLE." a, ".CATEGORIES_TABLE." b
        WHERE a.image_active=1
        AND a.cat_id = b.cat_id
        AND b.auth_viewcat="
.AUTH_ALL."
        AND b.auth_viewimage="
.AUTH_ALL."
        "
;
$row $site_db->query_firstrow&#40;$sql&#41;;
$total_images $row['total_images'&#93;;

mt_srand&#40;&#40;double&#41;microtime&#40;&#41; * 1000000&#41;;
$number = &#40;$total_images > 1&#41; ? mt_rand&#40;0, $total_images - 1&#41; &#58; 0;

$sql "SELECT a.image_id, a.cat_id, a.image_name, a.image_active, a.image_thumb_file, a.image_comments
        FROM "
.IMAGES_TABLE." a, ".CATEGORIES_TABLE." b
        WHERE a.image_active=1
        AND a.cat_id = b.cat_id
        AND b.auth_viewcat="
.AUTH_ALL."
        AND b.auth_viewimage="
.AUTH_ALL."
        LIMIT 
$number, 1";
$row $site_db->query_firstrow&#40;$sql&#41;;
$image_id $row['image_id'&#93;;
$cat_id $row['cat_id'&#93;;
$image_name $row['image_name'&#93;;
$image_comments $row['image_comments'&#93;;
$thumb_src = &#40;is_remote&#40;$row['image_thumb_file'&#93;&#41;&#41; ? $row['image_thumb_file'&#93; &#58; ROOT_PATH.THUMB_DIR."/".$cat_id."/".$row['image_thumb_file'&#93;;

echo "<a href=\"".ROOT_PATH."details.php?image_id=$image_id\"><img src=\"".$thumb_src."\" border=\"0\" alt=\"$image_name\"></a><br>\n";
echo 
"<b>$image_name</b><br>\n";
echo 
"Comments&#58; $image_comments<br>\n";
?>


What is wrong with my random feature?
I've add aprefix to my 4images SQL table, is that? My prefix are "4images_"
Many thanks for your help and time.

Regards, Dom

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
Random images problem
« Reply #1 on: January 28, 2003, 03:35:46 PM »
The path you have set here seems to be wrong:
Code: [Select]
define('ROOT_PATH', './portfolio/gallery/');
Jan
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline djavet

  • Jr. Member
  • **
  • Posts: 79
    • View Profile
Random images problem
« Reply #2 on: January 28, 2003, 05:20:01 PM »
Hello,


Thx for your help, It's working only on the random.php page:
-> http://www.john-howe.com/portfolio/gallery/random.php

On the index page I receive this now this error:
-> http://www.john-howe.com/test.php
Quote
Fatal error: Cannot redeclare class db in /home/virtual/site84/fst/var/www/html/portfolio/gallery/includes/db_mysql.php on line 28



My code are now:
Code: [Select]
<?php
/**************************************************************************
 *                                                                        *
 *    4images - A Web Based Image Gallery Management System               *
 *    ----------------------------------------------------------------    *
 *                                                                        *
 *             File&#58; random.php                                           *
 *        Copyright&#58; &#40;C&#41; 2002 Jan Sorgalla                                *
 *            Email&#58; jan@4homepages.de                                    *
 *              Web&#58; http&#58;//www.4homepages.de                             *
 *    Scriptversion&#58; 1.0 for 4images 1.6.1                                *
 *                                                                        *
 *    Never released without support from&#58; Nicky &#40;http&#58;//www.nicky.net&#41;   *
 *                                                                        *
 **************************************************************************
 *                                                                        *
 *    Dieses Script ist KEINE Freeware. Bitte lesen Sie die Lizenz-       *
 *    bedingungen &#40;http&#58;//www.4homepages.de/4images/lizenz.php&#41; für       *
 *    weitere Informationen.                                              *
 *    ---------------------------------------------------------------     *
 *    This script is NOT freeware! Please read the Copyright Notice       *
 *    &#40;http&#58;//www.4homepages.de/4images/lizenz_e.php&#41; for further         *
 *    information.                                                        *
 *                                                                        *
 *************************************************************************/

// PATH to your 4images Gallery / PFAD zu Ihrer 4images Gallerie
define&#40;'ROOT_PATH', ''&#41;;

include&#40;ROOT_PATH.'config.php'&#41;;
include&#40;ROOT_PATH.'includes/db_mysql.php'&#41;;
include&#40;ROOT_PATH.'includes/constants.php'&#41;;

$site_db = new Db&#40;$db_host, $db_user, $db_password, $db_name&#41;;
function is_remote&#40;$file_name&#41; &#123;
  
return &#40;preg_match&#40;'#^https?\\&#58;\\/\\/[a-z0-9\-&#93;+\.&#40;[a-z0-9\-&#93;+\.&#41;?[a-z&#93;+#i', $file_name&#41;&#41; ? 1 &#58; 0;
&#125;

$sql "SELECT COUNT&#40;*&#41; as total_images
        FROM "
.IMAGES_TABLE." a, ".CATEGORIES_TABLE." b
        WHERE a.image_active=1
        AND a.cat_id = b.cat_id
        AND b.auth_viewcat="
.AUTH_ALL."
        AND b.auth_viewimage="
.AUTH_ALL."
        "
;
$row $site_db->query_firstrow&#40;$sql&#41;;
$total_images $row['total_images'&#93;;

mt_srand&#40;&#40;double&#41;microtime&#40;&#41; * 1000000&#41;;
$number = &#40;$total_images > 1&#41; ? mt_rand&#40;0, $total_images - 1&#41; &#58; 0;

$sql "SELECT a.image_id, a.cat_id, a.image_name, a.image_active, a.image_thumb_file, a.image_comments
        FROM "
.IMAGES_TABLE." a, ".CATEGORIES_TABLE." b
        WHERE a.image_active=1
        AND a.cat_id = b.cat_id
        AND b.auth_viewcat="
.AUTH_ALL."
        AND b.auth_viewimage="
.AUTH_ALL."
        LIMIT 
$number, 1";
$row $site_db->query_firstrow&#40;$sql&#41;;
$image_id $row['image_id'&#93;;
$cat_id $row['cat_id'&#93;;
$image_name $row['image_name'&#93;;
$image_comments $row['image_comments'&#93;;
$thumb_src = &#40;is_remote&#40;$row['image_thumb_file'&#93;&#41;&#41; ? $row['image_thumb_file'&#93; &#58; ROOT_PATH.THUMB_DIR."/".$cat_id."/".$row['image_thumb_file'&#93;;

echo "<a href=\"".ROOT_PATH."details.php?image_id=$image_id\"><img src=\"".$thumb_src."\" border=\"0\" alt=\"$image_name\"></a><br>\n";
// echo "<b>$image_name</b><br>\n";
// echo "Comments&#58; $image_comments<br>\n";
?>



Many thanks for your help and time.

Regards, Dom

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Random images problem
« Reply #3 on: January 28, 2003, 10:02:19 PM »
Hope this will help:
http://4homepages.de/forum/viewtopic.php?p=12199#12199
your problem is what Jan sais:
Quote
The path you have set here seems to be wrong:
Code:
define('ROOT_PATH', './portfolio/gallery/');  

Jan

try to put
Code: [Select]
define('ROOT_PATH', 'portfolio/gallery/');  
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
Random images problem
« Reply #4 on: January 28, 2003, 10:30:16 PM »
Be sure that the path is relative to the file you display the random image and be sure that you include no other files that contains a class called "Db" like in includes/db_mysql.php.

Jan
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline SLL

  • Hero Member
  • *****
  • Posts: 585
    • View Profile
Random images problem
« Reply #5 on: January 28, 2003, 10:37:18 PM »
"Fatal error: Cannot redeclare class db...." - looks like you trying to run some other scripts from the same page, don't you?

Offline djavet

  • Jr. Member
  • **
  • Posts: 79
    • View Profile
Random images problem
« Reply #6 on: January 29, 2003, 08:34:42 AM »
That's correct. I'm running a blog (pmachine) also on the same page.

What can I do for that?

Dom

Offline SLL

  • Hero Member
  • *****
  • Posts: 585
    • View Profile
Random images problem
« Reply #7 on: January 29, 2003, 09:42:13 AM »
Quote from: djavet
That's correct. I'm running a blog (pmachine) also on the same page.
What can I do for that?
Dom

Check both scripts and try to find out, if they're using the same variable names, definitions, table names, etc.
Then change duplicate names in one of the scripts to something different. Read Random Image MOD thread, I had the same problem with phpBB Fetch Info script.

Offline djavet

  • Jr. Member
  • **
  • Posts: 79
    • View Profile
Random images problem
« Reply #8 on: January 29, 2003, 09:54:21 AM »
:(
not woking I remove all the tag for my blog and.... nohing...
Snif snif... I don't know what I can do!


On this page it's working:
-> http://www.john-howe.com/portfolio/gallery/random.php

And on this one (wich is outside the gallery folder), doesn't work:
-> http://www.john-howe.com/test.php

Help ;o)

Offline djavet

  • Jr. Member
  • **
  • Posts: 79
    • View Profile
Random images problem
« Reply #9 on: January 29, 2003, 10:07:18 AM »
After a few controls, it seen that is a confilt with my blog pMachine.
If I delete all the tags from pmachine, all is working well.

Their is a conflict with the class Db.
What can I do it to resolve the problem?
I'm a web-designer, not a php coder  :(

Regards, Dom

Offline djavet

  • Jr. Member
  • **
  • Posts: 79
    • View Profile
Random images problem
« Reply #10 on: January 29, 2003, 10:32:12 AM »
Hello,

My pmachine code for db.mysql.php class is if that can help:
Code: [Select]
<?php
//
// pMachine
//
// Copyright &#40;c&#41; 2001,2002 Rick Ellis  All rights reserved.
//
// File Name&#58; db.mysql.php
//
// Description&#58;  MySQL Database Abstraction Classes
// These are two fairly basic database classes which contain only the functions 
// necessary for pMahchine. It might be necessary to add methods to these
// classes in the future, as I didn't bother with functions that are not currently
// needed.
//
/*

 EXAMPLE CODE FOR DEVELOPERS

 $db = new DB&#40;&#41;;
 Creates a new instance of the DB class and calls the constructor.  The 
 constructor automatically connects to the database.
 This is the equivalent of db_connect&#40;&#41;, used previously in pMachine.

 $db = new DB&#40;"hostname","username","password","database_name"&#41;;
 Optional arguments in the event you need to query more than one database
 or if you want to override the config.php settings.

 $query = new DB_query&#40;$db,"select * from some_table"&#41;;
 Instantiates the DB_query class.  The constructor automatically performs
 the query.

 $query->db_fetch_array&#40;&#41;;
 Retrieves an array with the results of the specified query.

 $query->row['body'&#93;;
 Accesses a particular MySQL field from the array.

 $query->db_fetch_object&#40;&#41;;
 Retrieves an object with the results of the specified query.  For practical
 purposes, this is identical to db_fetch_array&#40;&#41;.  As long a you don't reference
 query results numerically in an array, either one will produce the same results.

 $query->obj->body
 Accesses a specifc MySQL field from the object.

 $total = $query->db_num_rows&#40;&#41;;
 Equivalent of mysql_num_rows&#40;&#41; Alternately you can use it more verbose, like this&#58;

 $query->db_num_rows&#40;&#41;;
 $total = $query->num_rows;
 echo $total;

 $query->db_fetch_rows&#40;&#41;;
 Equivalent of mysql_fetch_rows&#40;&#41;;

 $query->db_result&#40;&#41;;
 Equivalent mysql_result&#40;&#41;

 $query->db_free_result&#40;&#41;; 
 Frees the memory after a query. This is done automatically after a script runs,
 so it's not necessary to use. I don't know about other RDBMS's, so I included it, 
 although if another database requires it, all of the queries throughout pMachine
 will need to be modified.

 $db->db_close&#40;&#41;;
 Closes connection to MySQL.  This is also done automatically after a script runs,
 so it's not necessary to use. It also has no effect on a persistent connection
 which pMachine uses by default.  However, other databases might need the database
 closed explicitly, so I've included it.

 EXAMPLE 

 $db = new DB&#40;&#41;;
 $sql = "select * from pm_members";
 $result = new DB_query&#40;$db, $sql&#41;;
 while &#40;$result->db_fetch_array&#40;&#41;&#41; &#123;
 echo $result->row['username'&#93;;
 echo "<br />";
 &#125;

 OR

 $db = new DB&#40;&#41;;
 $query = new DB_query&#40;$db, "select body from pm_weblog where post_id = '234'"&#41;;
 if &#40;!$query->result&#41;
     return error_message&#40;"Invalid query"&#41;;
 $query->db_fetch_object&#40;&#41;;
 $body = $query->obj->body;
 
*/


class DB 
&#123;
var $Hostname  "localhost";
var $Username  "root";
var $Password  "";
var $Database  "pmachine";
var $Connect;
    var 
$DBselect  1;
    var 
$ShowError 0;
    var 
$Selected;


function DB&#40;$host="", $user="", $pass="", $db="", $dbselect=""&#41;
&#123;
global $hostname$dbusername$dbpassword$dbname$conntype$debug;

if &#40;$host <> "" || $hostname <> ""&#41;
&#123;
$host <> "" $this->Hostname $host &#58; $this->Hostname = $hostname;
&#125;
if &#40;$user <> "" || $dbusername <> ""&#41;
&#123;
$user <> "" $this->Username $user &#58; $this->Username = $dbusername;
&#125;
if &#40;$pass <> "" || $dbpassword <> ""&#41;
&#123;
$pass <> "" $this->Password $pass &#58; $this->Password = $dbpassword;
&#125;
if &#40;$db <> "" || $dbname <> ""&#41;
&#123;
$db <> "" $this->Database $db &#58; $this->Database = $dbname;
&#125;
if &#40;$dbselect <> ""&#41; $this->DBselect  = $dbselect;
if &#40;$debug <> ""&#41; $this->ShowError = $debug;


if &#40;$conntype ==0&#41;
&#123;
$this->Connect = @mysql_connect&#40;$this->Hostname,$this->Username,$this->Password&#41;;
        
&#125; 
        
else 
        &
#123;
$this->Connect = @mysql_pconnect&#40;$this->Hostname,$this->Username,$this->Password&#41;;
        
&#125;
        
        
if &#40;!$this->Connect&#41;
&#123;
    if &#40;$this->ShowError == 1&#41;
    &#123;
    return $this->db_error&#40;"Database connection failed. Please check your config settings."&#41;;
    &#125;
    return false;
&#125;


if &#40;$this->DBselect == 1&#41;
&#123;
    
if &#40;!@mysql_select_db&#40;$this->Database,$this->Connect&#41;&#41;
    
&#123;
        
if &#40;$this->ShowError == 1&#41;
    
    &#123;
                    
return $this->db_error&#40;"MySQL Error&#58; ",$this->Connect&#41;;
    
    &#125;
    
    return false;
    
&#125;
    

    return $this->Selected $this->Database;
&#125;
&#125;
    
    
    
    
function db_select&#40;&#41;
    
&#123; 
if &#40;!@mysql_select_db&#40;$this->Database,$this->Connect&#41;&#41;
&#123;
            
if &#40;$this->ShowError == 1&#41;
    
&#123;
    
    return $this->db_error&#40;"MySQL Error&#58; ",$this->Connect&#41;;
    
&#125;
    
return false;
&#125; 

return $this->Selected $this->Database;
    &
#125;
    
    
    
    
function db_create&#40;&#41;
    
&#123;
        
if &#40;!@mysql_create_db&#40;$this->Database&#41;&#41;
    
&#123;
            
if &#40;$this->ShowError == 1&#41;
            
&#123;
                
return $this->db_error&#40;"Unable to create the database specified in your config file."&#41;;
            
&#125;
            
return false;
        &
#125; 
        
        
return true;
    &
#125;



function db_close&#40;&#41;
&#123;
mysql_close&#40;$this->Connect&#41;;
&#125; 
    
    
    
function db_error&#40;$message,$id=""&#41; 
&#123;
if &#40;$id&#41; 
&#123; 
$message .= mysql_errno&#40;$id&#41; . "&nbsp;&nbsp;" . mysql_error&#40;$id&#41;; 
&#125;
echo "<br />" $message "<br /><br />";
&#125;

&
#125;


class DB_query
&#123;
var $query 0;
var $row = array&#40;&#41;;
var $obj;
var $res;
var $numrows;
    var 
$rows   0;
    var 
$errors 0;
    var 
$result false;
   
    
function DB_query&#40;$db, $sql&#41;
&#123;
    global $debug;
    
    if &#40;$debug <> ""&#41; $this->errors = $debug;
  
    if &#40;$db->Connect <> false&#41;
    &#123;
    
if &#40;!$this->query = @mysql_query&#40;$sql&#41;&#41;
    
&#123;
    
    if &#40;$this->errors == 1&#41;
    
    &#123;
    
    return $this->db_query_error&#40;"MySQL Error&#58; ",$db->Connect&#41;;
    
    &#125;
    
    
 return $this->result;
    
&#125;
    &#125;

        
return $this->result true;
&#125;
    
    
function db_fetch_row&#40;&#41;
&#123;
return $this->row = @mysql_fetch_row&#40;$this->query&#41;;
&#125;
    
    

function db_fetch_array&#40;&#41;
&#123;
return $this->row = @mysql_fetch_array&#40;$this->query&#41;;
&#125;


function db_fetch_object&#40;&#41;
&#123;
return $this->obj = @mysql_fetch_object&#40;$this->query&#41;;
&#125;


function db_num_rows&#40;&#41;
&#123;
return $this->numrows = @mysql_num_rows&#40;$this->query&#41;;
&#125;

    
function db_result&#40;$x=0,$y=""&#41;
&#123;
return $this->res = @mysql_result&#40;$this->query, $x, $y&#41;;
&#125;
    
    
function db_free_result&#40;&#41;
&#123;
        
@mysql_free_result&#40;$this->query&#41;;
&#125; 
    
        
function db_query_error&#40;$message,$id=""&#41; 
&#123;
if &#40;$id&#41; 
&#123; 
$message .= mysql_errno&#40;$id&#41; . "&nbsp;&nbsp;" . mysql_error&#40;$id&#41;; 
&#125;
echo "<br />" $message "<br /><br />";
&#125;
&#125;
// END
?>

Offline SLL

  • Hero Member
  • *****
  • Posts: 585
    • View Profile
Random images problem
« Reply #11 on: January 29, 2003, 10:59:10 AM »
Both scripts using the same db class name, so the only solution I can see is to rename this class and all calls to this class in one of the scripts to another name. It you don't know PHP, it's not an easy task for you...

Probably PHP Guru's here give you some better ideas...

Offline djavet

  • Jr. Member
  • **
  • Posts: 79
    • View Profile
Random images problem
« Reply #12 on: January 29, 2003, 11:12:00 AM »
Hummm I see.
Ok I will give a try with the pMachine code.
Do you know (in looking the script above) what is the call to the class name?
If I change the class name to "Class DBnews", must I change also the "class DBnews_query"?


Is that like:
$db = new DB();

to :
$db = new DBnews();


And :
$query = new DB_query

to:
$query = new DBnews_query


Regards, Dom

Offline SLL

  • Hero Member
  • *****
  • Posts: 585
    • View Profile
Random images problem
« Reply #13 on: January 29, 2003, 12:31:23 PM »
You have to change duplicates only. Compare 4images and pMachine code first and find the same names.

Offline djavet

  • Jr. Member
  • **
  • Posts: 79
    • View Profile
Random images problem
« Reply #14 on: January 29, 2003, 02:18:01 PM »
Ok, After a check I find it's more simple to change 4images:

Open /includes/db_mysql.php.
Change:
class Db {

To :
class Dbgallery {

Then open global.php and a line 120 change:
$site_db = new Db($db_host, $db_user, $db_password, $db_name);

To:
$site_db = new Dbgallery($db_host, $db_user, $db_password, $db_name);


... and I receive a new error in my 4images gallery:
DB Error: Bad SQL Query: SELECT setting_name, setting_value FROM 4images_settings

Rhahhaha, I'm damned ;o)

Dom