Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - terk

Pages: [1] 2
1
And when category is not selected a blank allert window pops up

2
Hi guys!

I'm sorry if this topic has been already discussed but I couldn't find it.

Please help me with next problem: when a user uploads a photo and this upload doesn't fit (size, extention, fields) rules, user gets no error message but a new upload interface. When good upload happens user gets his(hers) pic on the screen as it's ment to be. How can I solve a problem with no error message?

http://www.ipoding.ru/foto/member.php?action=uploadform  you have to be a registered user to upload photos.

3
Hi, everybody.
I've a strange problem, for some reason my gallery doesn't allow nor users, neither admins add anything (photos, comments) with russian in fields. After submiting the page just refresh's (I think, the request is sent to server) with no changes. It accepts only digits and latin symbols. BUT admin panel alows modifing existing photos info and comments from latin into cyrrillic. I've set the charset to win-1251 (allows russian), I didn't find anything in the forum that can solve my problem. Can someone help me, plz?

http://www.ipoding.ru/foto/

4
FAQ, Tips / Re: How can I add more allowed file extensions?
« on: July 12, 2007, 03:20:32 PM »
I fixed it myself =)
after http://www.4homepages.de/forum/index.php?topic=15253.0
I changed 
Code: [Select]
$mime_type_match['exe'] = array("application/octet-stream");
to
Code: [Select]
$mime_type_match['exe'] = array("application/octet-stream", "application/x-msdownload");
thnx to myself and everybody else!

5
FAQ, Tips / Re: How can I add more allowed file extensions?
« on: July 12, 2007, 03:13:12 PM »
Hi! I've a problem with "exe" extention =(

What I did:

1) $mime_type_match['exe'] = array("application/octet-stream");  - I found this mime type in my hosting control panel
2) created a template exe.html
3) added in the acp "exe"

strange happens: the member.php with upload part just reloads without writing any errors

how to fix that?

6
Discussion & Troubleshooting / Re: russian file names
« on: June 19, 2007, 04:25:24 PM »
I'm having the same problems. It's servers' bug, because when I moved to a new hosting these problems appered. Funny, but when editing names and description in CP everything works fine, but not on upload. V@no, and everybody else, how to fix that?!

7
Language Packs / Re: [Language] Russian language files & buttons
« on: April 30, 2006, 06:25:53 AM »
Если бы был Русский раздел, то мы смогли бы отвечать на вопросы, на которые знаем ответы.  :)

Или я бы смогла наконец-то узнать решение своей проблемы...
Quote
Пытаюсь войти в админку, выскакивает страничка
Not Acceptable
An appropriate representation of the requested resource /admin/index.php could not be found on this server.

А есть ли такая страничка по этому адресу на самом деле? =)

8
Language Packs / Re: [Language] Russian language files & buttons
« on: April 24, 2006, 05:02:19 PM »
Отчасти я с тобой согласен, но с другой стороны смысл в этой идее присутствует.


...вот немецкого я к сожалению не знаю....

9
Language Packs / Re: [Language] Russian language files & buttons
« on: April 23, 2006, 12:03:54 AM »
ОООООООчень сильно извиняюсь, что не совсем по делу, но вопрос есть (не про работу скрипта).

Больше всего хочу к V@no обратиться, тк он имеет большое вличние (насколько я понимаю) на этот сайт.

Просматривая эту тему, у меня невольно возникает вопрос, почему бы не сделать русскую ветку форума в разделе internationl?

С языком проблем никаких, но, думаю, ветка популярностью пользоаться будет.

10
Thanks a lot!
It was as simple as
Code: [Select]
define('ROOT_PATH', './');I just found it in lightbox.php (it was the first document I opend).
Also fixed some more things and it's working!
Thanks a lot!

11
Thx. I returned to the first error I recieved.

Quote
Security violationSecurity violation
Fatal error: Cannot instantiate non-existent class: db in /home/166413/http/foto/random.php on line 34

As I think, line 34 requires new Db class:
Code: [Select]
$site_db = new Db($db_host, $db_user, $db_password, $db_name);
So the problem migth be in /includes/db_mysql.php ?
Here is my code:
Code: [Select]
?php
/**************************************************************************
 *                                                                        *
 *    4images - A Web Based Image Gallery Management System               *
 *    ----------------------------------------------------------------    *
 *                                                                        *
 *             File: db_mysql.php                                         *
 *        Copyright: (C) 2002 Jan Sorgalla                                *
 *            Email: jan@4homepages.de                                    *
 *              Web: http://www.4homepages.de                             *
 *    Scriptversion: 1.7.1                                                *
 *                                                                        *
 *    Never released without support from: Nicky (http://www.nicky.net)   *
 *                                                                        *
 **************************************************************************
 *                                                                        *
 *    Dieses Script ist KEINE Freeware. Bitte lesen Sie die Lizenz-       *
 *    bedingungen (Lizenz.txt) für weitere Informationen.                 *
 *    ---------------------------------------------------------------     *
 *    This script is NOT freeware! Please read the Copyright Notice       *
 *    (Licence.txt) for further information.                              *
 *                                                                        *
 *************************************************************************/
if (!defined('ROOT_PATH')) {
  die("Security violation");
}

class Db {
  var $no_error = 0;
  var $connection;
  var $query_id = 0;
  var $query_count = 0;
  var $query_time = 0;
  var $query_array = array();
  var $table_fields = array();

  function Db($db_host, $db_user, $db_password = "", $db_name = "", $db_pconnect = 0) {
    $connect_handle = ($db_pconnect) ? "mysql_pconnect" : "mysql_connect";
    if (!$this->connection = $connect_handle($db_host, $db_user, $db_password)) {
      $this->error("Could not connect to the database server ($db_host, $db_user).", 1);
    }
    if ($db_name != "") {
      if (!@mysql_select_db($db_name)) {
        @mysql_close($this->connection);
        $this->error("Could not select database ($db_name).", 1);
      }
    }
    return $this->connection;
  }

  function close() {
    if ($this->connection) {
      if ($this->query_id) {
        @mysql_free_result($this->query_id);
      }
      return @mysql_close($this->connection);
    }
    else {
      return false;
    }
  }

  function query($query = "") {
    unset($this->query_id);
    if ($query != "") {
      if ((defined("PRINT_QUERIES") && PRINT_QUERIES == 1) || (defined("PRINT_STATS") && PRINT_STATS == 1)) {
        $startsqltime = explode(" ", microtime());
      }
      if (!$this->query_id = @mysql_query($query, $this->connection)) {
        $this->error("<b>Bad SQL Query</b>: ".htmlentities($query)."<br /><b>".mysql_error()."</b>");
      }
      if ((defined("PRINT_QUERIES") && PRINT_QUERIES == 1) || (defined("PRINT_STATS") && PRINT_STATS == 1)) {
        $endsqltime = explode(" ", microtime());
        $totalsqltime = round($endsqltime[0]-$startsqltime[0]+$endsqltime[1]-$startsqltime[1],3);
        $this->query_time += $totalsqltime;
        $this->query_count++;
      }
      if (defined("PRINT_QUERIES") && PRINT_QUERIES == 1) {
        $query_stats = htmlentities($query);
        $query_stats .= "<br><b>Querytime:</b> ".$totalsqltime;
        $this->query_array[] = $query_stats;
      }
      return $this->query_id;
    }
  }

  function fetch_array($query_id = -1, $assoc = 0) {
    if ($query_id != -1) {
      $this->query_id = $query_id;
    }
    if ($this->query_id) {
      return ($assoc) ? mysql_fetch_assoc($this->query_id) : mysql_fetch_array($this->query_id);
    }
  }

  function free_result($query_id = -1) {
    if ($query_id != -1) {
      $this->query_id = $query_id;
    }
    return @mysql_free_result($this->query_id);
  }

  function query_firstrow($query = "") {
    if ($query != "") {
      $this->query($query);
    }
    $result = $this->fetch_array($this->query_id);
    $this->free_result();
    return $result;
  }

  function get_numrows($query_id = -1) {
    if ($query_id != -1) {
      $this->query_id = $query_id;
    }
    return mysql_num_rows($this->query_id);
  }

  function get_insert_id() {
    return ($this->connection) ? @mysql_insert_id($this->connection) : 0;
  }
 
  function get_next_id($column = "", $table = "") {
    if (!empty($column) && !empty($table)) {
      $sql = "SELECT MAX($column) AS max_id
              FROM $table";
      $row = $this->query_firstrow($sql);
      return (($row['max_id'] + 1) > 0) ? $row['max_id'] + 1 : 1;
    }
    else {
      return NULL;
    }
  }

  function get_numfields($query_id = -1) {
    if ($query_id != -1) {
      $this->query_id = $query_id;
    }
    return @mysql_num_fields($this->query_id);
  }

  function get_fieldname($query_id = -1, $offset) {
    if ($query_id != -1) {
      $this->query_id = $query_id;
    }
    return @mysql_field_name($this->query_id, $offset);
  }

  function get_fieldtype($query_id = -1, $offset) {
    if ($query_id != -1) {
      $this->query_id = $query_id;
    }
    return @mysql_field_type($this->query_id, $offset);
  }

  function affected_rows() {
    return ($this->connection) ? @mysql_affected_rows($this->connection) : 0;
  }

  function is_empty($query = "") {
    if ($query != "") {
      $this->query($query);
    }
    return (!mysql_num_rows($this->query_id)) ? 1 : 0;
  }

  function not_empty($query = "") {
    if ($query != "") {
      $this->query($query);
    }
    return (!mysql_num_rows($this->query_id)) ? 0 : 1;
  }
 
  function get_table_fields($table) {
    if (!empty($this->table_fields[$table])) {
      return $this->table_fields[$table];
    }
    $this->table_fields[$table] = array();
    $result = $this->query("SHOW FIELDS FROM $table");
    while ($row = $this->fetch_array($result)) {
      $this->table_fields[$table][$row['Field']] = $row['Type'];
    }
    return $this->table_fields[$table];
  }

  function error($errmsg, $halt = 0) {
    if (!$this->no_error) {
      echo "<br /><font color='#FF0000'><b>DB Error</b></font>: ".$errmsg."<br />";
      if ($halt) {
        exit;
      }
    }
  }
} // end of class
?>

Maweryk, maybe you can post yours db_mysql.php?

12
Try this:

Code: [Select]
// PATH to your 4images Gallery / PFAD zu Ihrer 4images Gallerie
define('ROOT_PATH', '/usr/local/httpd/htdocs/.../foto/');

include(ROOT_PATH.'config.php');
include(ROOT_PATH.'includes/db_mysql.php');
include(ROOT_PATH.'includes/constants.php');

Good luck!

Markus


Now i get this:

Quote
Warning: main(): open_basedir restriction in effect. File(/usr/local/httpd/htdocs/.../foto/config.php) is not within the allowed path(s): (/home/166413) in /home/166413/http/foto/random.php on line 30

Warning: main(/usr/local/httpd/htdocs/.../foto/config.php): failed to open stream: Not owner in /home/166413/http/foto/random.php on line 30

Warning: main(): open_basedir restriction in effect. File(/usr/local/httpd/htdocs/.../foto/config.php) is not within the allowed path(s): (/home/166413) in /home/166413/http/foto/random.php on line 30

Warning: main(/usr/local/httpd/htdocs/.../foto/config.php): failed to open stream: Not owner in /home/166413/http/foto/random.php on line 30

Warning: main(): Failed opening '/usr/local/httpd/htdocs/.../foto/config.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/166413/http/foto/random.php on line 30

Warning: main(): open_basedir restriction in effect. File(/usr/local/httpd/htdocs/.../foto/includes/db_mysql.php) is not within the allowed path(s): (/home/166413) in /home/166413/http/foto/random.php on line 31

Warning: main(/usr/local/httpd/htdocs/.../foto/includes/db_mysql.php): failed to open stream: Not owner in /home/166413/http/foto/random.php on line 31

Warning: main(): open_basedir restriction in effect. File(/usr/local/httpd/htdocs/.../foto/includes/db_mysql.php) is not within the allowed path(s): (/home/166413) in /home/166413/http/foto/random.php on line 31

Warning: main(/usr/local/httpd/htdocs/.../foto/includes/db_mysql.php): failed to open stream: Not owner in /home/166413/http/foto/random.php on line 31

Warning: main(): Failed opening '/usr/local/httpd/htdocs/.../foto/includes/db_mysql.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/166413/http/foto/random.php on line 31

Warning: main(): open_basedir restriction in effect. File(/usr/local/httpd/htdocs/.../foto/includes/constants.php) is not within the allowed path(s): (/home/166413) in /home/166413/http/foto/random.php on line 32

Warning: main(/usr/local/httpd/htdocs/.../foto/includes/constants.php): failed to open stream: Not owner in /home/166413/http/foto/random.php on line 32

Warning: main(): open_basedir restriction in effect. File(/usr/local/httpd/htdocs/.../foto/includes/constants.php) is not within the allowed path(s): (/home/166413) in /home/166413/http/foto/random.php on line 32

Warning: main(/usr/local/httpd/htdocs/.../foto/includes/constants.php): failed to open stream: Not owner in /home/166413/http/foto/random.php on line 32

Warning: main(): Failed opening '/usr/local/httpd/htdocs/.../foto/includes/constants.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/166413/http/foto/random.php on line 32

Fatal error: Cannot instantiate non-existent class: db in /home/166413/http/foto/random.php on line 34

even if I remove ' :
Code: [Select]
define(ROOT_PATH, '/usr/local/httpd/htdocs/.../foto/');
still same  :(


if I change  it to
Code: [Select]
define(ROOT_PATH.'/usr/local/httpd/htdocs/.../foto/');
I get:
Quote
Warning: Wrong parameter count for define() in /home/166413/http/foto/random.php on line 28

Warning: main(ROOT_PATHconfig.php): failed to open stream: No such file or directory in /home/166413/http/foto/random.php on line 30

Warning: main(ROOT_PATHconfig.php): failed to open stream: No such file or directory in /home/166413/http/foto/random.php on line 30

Warning: main(): Failed opening 'ROOT_PATHconfig.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/166413/http/foto/random.php on line 30

Warning: main(ROOT_PATHincludes/db_mysql.php): failed to open stream: No such file or directory in /home/166413/http/foto/random.php on line 31

Warning: main(ROOT_PATHincludes/db_mysql.php): failed to open stream: No such file or directory in /home/166413/http/foto/random.php on line 31

Warning: main(): Failed opening 'ROOT_PATHincludes/db_mysql.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/166413/http/foto/random.php on line 31

Warning: main(ROOT_PATHincludes/constants.php): failed to open stream: No such file or directory in /home/166413/http/foto/random.php on line 32

Warning: main(ROOT_PATHincludes/constants.php): failed to open stream: No such file or directory in /home/166413/http/foto/random.php on line 32

Warning: main(): Failed opening 'ROOT_PATHincludes/constants.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/166413/http/foto/random.php on line 32

Fatal error: Cannot instantiate non-existent class: db in /home/166413/http/foto/random.php on line 34


 :( :( :(

13
Hi!

I've looked through all this topic, but didn't manage to fix my issue. It's all in this:

Quote
Security violationSecurity violation
Fatal error: Cannot instantiate non-existent class: db in /home/166413/http/foto/random.php on line 34

this is my code in random.php:

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

// PATH to your 4images Gallery / PFAD zu Ihrer 4images Gallerie
define('ROOT_PATH''http://www.ipoding.ru/foto/');

include(
'http://www.ipoding.ru/foto/config.php');
include(
ROOT_PATH.'includes/db_mysql.php');
include(
ROOT_PATH.'includes/constants.php');

$site_db = new Db($db_host$db_user$db_password$db_name);
function 
is_remote($file_name) {
  return (preg_match('#^https?\\:\\/\\/[a-z0-9\-]+\.([a-z0-9\-]+\.)?[a-z]+#i'$file_name)) ? 0;
}

// NUMBER OF THUMBNAILS TO DISPLAY / NUMMER DER GEWÜNSCHTEN THUMBNAILS
$num_images 4;

$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.
        ORDER BY RAND() 
        LIMIT 
$num_images";
$result $site_db->query($sql);

while (
$row $site_db->fetch_array($result)){
  $image_id $row['image_id'];
  $cat_id $row['cat_id'];
  $image_name $row['image_name'];
  $image_comments $row['image_comments'];
  $thumb_src = (is_remote($row['image_thumb_file'])) ? $row['image_thumb_file'] : ROOT_PATH.THUMB_DIR."/".$cat_id."/".$row['image_thumb_file'];

  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: $image_comments<hr>\n";
}
?>


Password and user name of the db are typed in correctly....

I have no idea what to fix. Please help me!

My 4images: http://www.ipoding.ru/foto/index.php   ----- don't get shocked, it's all in Russian

14
Language Packs / Re: [Language] Russian language files & buttons
« on: October 26, 2005, 06:19:01 AM »
Äà òóò óæå îáðàçîâàëîñü ðóññêîå community, òàê ÷òî ðàçíîáîé îáúÿñíèì. È âñå-òàêè, íå ïîìîæåøü?

15
Language Packs / Re: [Language] Russian language files & buttons
« on: October 25, 2005, 10:39:16 PM »
Ñêîëüêî íå ÷èòàë ïîñòû â random image è íå ïðàâèë êîä â random.php íó íèêàê íå ïîëó÷àåòñÿ! Îøèáêà ñòàíäàðòíàÿ:

Quote
Security violationSecurity violation
Fatal error: Cannot instantiate non-existent class: db in /home/166413/http/foto/random.php on line 34

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

// PATH to your 4images Gallery / PFAD zu Ihrer 4images Gallerie
define('ROOT_PATH''http://www.ipoding.ru/foto/');

include(
'http://www.ipoding.ru/foto/config.php');
include(
ROOT_PATH.'includes/db_mysql.php');
include(
ROOT_PATH.'includes/constants.php');

$site_db = new Db($db_host$db_user$db_password$db_name);    <----- 34-àÿ ëèíÿÿ
function is_remote($file_name) {
  return (preg_match('#^https?\\:\\/\\/[a-z0-9\-]+\.([a-z0-9\-]+\.)?[a-z]+#i'$file_name)) ? 0;
}

// NUMBER OF THUMBNAILS TO DISPLAY / NUMMER DER GEWÜNSCHTEN THUMBNAILS
$num_images 4;

$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.
        ORDER BY RAND() 
        LIMIT 
$num_images";
$result $site_db->query($sql);

while (
$row $site_db->fetch_array($result)){
  $image_id $row['image_id'];
  $cat_id $row['cat_id'];
  $image_name $row['image_name'];
  $image_comments $row['image_comments'];
  $thumb_src = (is_remote($row['image_thumb_file'])) ? $row['image_thumb_file'] : ROOT_PATH.THUMB_DIR."/".$cat_id."/".$row['image_thumb_file'];

  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: $image_comments<hr>\n";
}
?>

Ïðè òîì ÷òî random.php ëåæèò â êîðíå ñêðèïòà:

http://www.ipoding.ru/foto/

config.php â ïîðÿäêå, íèêàê íå ìîãó ïîíÿòü, â ÷åì äåëî.


Î×ÅÍÜ ÍÀÄÅÞÑÜ ÍÀ ÏÎÌÎÙÜ V@NO ÈËÈ ÎÑÒÀËÜÍÛÕ, ÑÒÀËÊÍÓÂØÈÕÑß Ñ ÝÒÎÉ ÏÐÎÁËÅÌÎÉ!!!!

Pages: [1] 2