Author Topic: query problems with MySQL 5.0.x  (Read 229650 times)

0 Members and 1 Guest are viewing this topic.

Offline sigma.

  • Full Member
  • ***
  • Posts: 148
  • cydonian.com/potd
    • View Profile
    • sigma's gallery
Re: query problems with MySQL 5.0.x
« Reply #90 on: June 24, 2008, 11:13:31 PM »
I've made all of the changes suggested in this thread and everything works except that I cannot upload or edit images from the admin control panel. I'm using 4images 1.7.1 with MySQL 5.2.5.

I know 1.7.4 may offer a solution but I can't really upgrade because of all the mods I've made.

Any ideas?

Im having the exact same problem. I tried Vano's fixes but nothing changed.

Offline axlrose

  • Newbie
  • *
  • Posts: 17
    • View Profile
    • A free classified ads online
Re: query problems with MySQL 5.0.x
« Reply #91 on: September 03, 2008, 09:54:21 PM »
Greetings!

Admin, Mods & Fellow members,

Here's my site problem for reference:
http://freeadsph.com/faq.php
http://freeadsph.com/contact.php

Using:
4images Version: 1.7.6
PHP Version: 4.4.6
MySQL Version: 5
http://www.freeadsph.com/


I don't know if this is the right thread for me to ask question after exploring for possible answer i found this 7 pages thread and my problem looks similar but i don't know where to start really since my site properly running until my host upgraded yesterday from MSql 4/Php4 to MSql 5/Php 5 .

My problem to wit:

Admin Problem:

DB Error: Bad SQL Query: SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits, c.cat_name, u.user_name FROM
(4images_images i, 4images_categories c) LEFT JOIN 4images_users u ON (u.user_id = i.user_id) WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id IN (0, 13, 11, 10, 9, 2, 6, 7, etc...) AND i.image_date >=1219531456 ORDER BY RANT () LIMIT 3 Unknown column "i.user_id"in'on clause.

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/freeads/public_html/includes/db_mysql.php on line 116


User Problem: An unexpected error occured. Please try again later

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/freeads/public_html/includes/db_mysql.php on line 116


Not only that as i observe when i minimize its size the contents/layout will also minimize. So, what's wrong? Can anyone help me? Or do i have to re-install again it.
Give me an idea please or can someone help me to solve this problem.


Thanks a lot...


Regards,
axlrose
from Philippines

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
Re: query problems with MySQL 5.0.x
« Reply #92 on: September 04, 2008, 02:21:39 AM »
Hello and welcome to 4images forum.

faq.php and contact.php are not part of 4images package, you must have made them yourself, and since only they are affected I can assume the problem is in their code.

Either way, this is a weird error. Can you attach faq.php file? (zip it first)
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 axlrose

  • Newbie
  • *
  • Posts: 17
    • View Profile
    • A free classified ads online
Re: query problems with MySQL 5.0.x
« Reply #93 on: September 04, 2008, 06:43:50 AM »
Hello and welcome to 4images forum.

faq.php and contact.php are not part of 4images package, you must have made them yourself, and since only they are affected I can assume the problem is in their code.

Either way, this is a weird error. Can you attach faq.php file? (zip it first)

Thanks for the quick reply.
Attached herewith the weird error files.

Thanks...

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
Re: query problems with MySQL 5.0.x
« Reply #94 on: September 04, 2008, 08:25:23 AM »
As it was discribed in this topic, replace
Code: [Select]
        FROM ".IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c
With
Code: [Select]
        FROM (".IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c)
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 axlrose

  • Newbie
  • *
  • Posts: 17
    • View Profile
    • A free classified ads online
Re: query problems with MySQL 5.0.x
« Reply #95 on: September 04, 2008, 09:56:07 AM »
As it was discribed in this topic, replace
Code: [Select]
        FROM ".IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c
With
Code: [Select]
        FROM (".IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c)

Actually, i do that already. But, still not working?
Do i have to re install it? What do you think?

Offline Nicky

  • Administrator
  • 4images Guru
  • *****
  • Posts: 3.195
    • View Profile
Re: query problems with MySQL 5.0.x
« Reply #96 on: September 04, 2008, 10:13:30 AM »
hi,

for test, try only with this code in faq.php

Code: [Select]
<?php 
/************************************************************************** 
 *                                                                        * 
 *    4images - A Web Based Image Gallery Management System               * 
 *    ----------------------------------------------------------------    * 
 *                                                                        * 
 *             File: faq.php                                           * 
 *        Copyright: (C) 2002 Jan Sorgalla                                * 
 *            Email: jan@4homepages.de                                    * 
 *              Web: http://www.4homepages.de                             * 
 *    Scriptversion: 1.7                                                  * 
 *                                                                        * 
 *    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.                              * 
 *                                                                        * 
 *************************************************************************/ 

$main_template "faq"

define('GET_CACHES'1); 
define('ROOT_PATH''./'); 
define('GET_USER_ONLINE'1); 
include(
ROOT_PATH.'global.php'); 
require(
ROOT_PATH.'includes/sessions.php'); 
include(
ROOT_PATH.'includes/page_header.php'); 

 
//----------------------------------------------------- 
//--- Clickstream ------------------------------------- 
//----------------------------------------------------- 
$clickstream "<span class=\"clickstream\"><a href=\"".$site_sess->url(ROOT_PATH."index.php")."\" class=\"clickstream\">".$lang['home']."</a>".$config['category_separator'].$txt_clickstream."</span>"

//----------------------------------------------------- 
//--- Print Out --------------------------------------- 
//----------------------------------------------------- 
$site_template->register_vars(array( 
  
"content" => $content
  
"msg" => $msg
  
"clickstream" => $clickstream
  
"lang_control_panel" => $lang['control_panel'
)); 
$site_template->print_template($site_template->parse_template($main_template)); 
include(
ROOT_PATH.'includes/page_footer.php'); 
?>


[EDIT]
and btw. like V@no wrote in his previous post this will solve your issue.
« Last Edit: September 04, 2008, 10:39:13 AM by Nicky »
cheers
Nicky
Your first three "must do" before you ask a question ! (© by V@no)
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

nicky.net 4 4images
Signature stolen from mawenzi

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
Re: query problems with MySQL 5.0.x
« Reply #97 on: September 04, 2008, 03:02:43 PM »
Actually, i do that already. But, still not working?
Do i have to re install it? What do you think?

In the attached files you don't have it...
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 fotopolis

  • Newbie
  • *
  • Posts: 27
    • View Profile
Re: query problems with MySQL 5.0.x
« Reply #98 on: September 05, 2008, 01:29:02 AM »
Hello.
I've migrated mysql 4 to mysql 5.
I've done the changes in the second page and now it doesn't have the sql error in the top of the page.
But the problem is than I cannot login and I cannot navigate to categories, to images and no pages can be loaded.
This is the url: http://www.vuestrasfotos.com/

Please can anyone help me?


Thanks a lot!

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
Re: query problems with MySQL 5.0.x
« Reply #99 on: September 05, 2008, 01:44:24 AM »
Did you migrate from one server to another? it looks like your images physically missing on the server.

As of "can't login", does it show you any messages when you try login?
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 fotopolis

  • Newbie
  • *
  • Posts: 27
    • View Profile
Re: query problems with MySQL 5.0.x
« Reply #100 on: September 05, 2008, 02:09:49 AM »
Yes, I've migrated to another new server, in other hosting.
The images are not uploaded yet.  because they are about 1,7GB. But pics or thumbnails is not the problem.
When I login, it loads the main page again.
When I clic on a category, it loads the main page again.
Nothing happens when you clic. Allways load the main page again.
And it's impossible to login.

Thanks!

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
Re: query problems with MySQL 5.0.x
« Reply #101 on: September 05, 2008, 04:37:01 AM »
Can you check database with phpmyadmin. is everything ok there?
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 fotopolis

  • Newbie
  • *
  • Posts: 27
    • View Profile
Re: query problems with MySQL 5.0.x
« Reply #102 on: September 05, 2008, 07:45:42 AM »
Evrtything in the galery is ok.
It has the categories, the number of photos, the number of users, etc.
But It seems like in login and visiting the web it doesn't connect.

Offline fotopolis

  • Newbie
  • *
  • Posts: 27
    • View Profile
Re: query problems with MySQL 5.0.x
« Reply #103 on: September 05, 2008, 10:39:47 AM »
Is it possible some of this sentences must be changed too?

FROM ".COMMENTS_TABLE." c
FROM ".IMAGES_TABLE."
FROM ".IMAGES_TABLE."
$sql = "DELETE FROM ".SUBSCRIPTIONS_TABLE."


Thanks!

Offline fotopolis

  • Newbie
  • *
  • Posts: 27
    • View Profile
Re: query problems with MySQL 5.0.x
« Reply #104 on: September 05, 2008, 11:55:37 AM »
I think everything is fixed with php5 compatible too.
Problems login and problems qith categories / details are fixed too.
I had two problems: mysql 5 and php5 compatible.

http://www.4homepages.de/forum/index.php?topic=6632.0


Thanks a lot!