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

0 Members and 1 Guest are viewing this topic.

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Administrator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: query problems with MySQL 5.0.x
« Reply #60 on: May 11, 2006, 02:52:33 PM »
Doubtfull it has anything to do with MySLQ 5 issue
http://149.156.194.203/~mczapkie/4images/details.php?image_id=1502 <- file not found.
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 mczapkie

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: query problems with MySQL 5.0.x
« Reply #61 on: May 11, 2006, 03:16:38 PM »
But the files exist physically at his /data/media and /data/thumbnails locations as it was before SQL upgrade.
Seems that php cant find the proper path and make "if else" statement substitution.

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Administrator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: query problems with MySQL 5.0.x
« Reply #62 on: May 11, 2006, 03:38:58 PM »
In the database 4images stores only filenames.
Check permissions and caSe of filenames. Unix systems are case sensetive.
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 mczapkie

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: query problems with MySQL 5.0.x
« Reply #63 on: May 11, 2006, 04:47:25 PM »
Check permissions...
Bingo - most of directories were owned by noobody instead of user, i dont know why, but chown fixed it - jetz alles gut :)
THX for suggestion.

Offline Ston4Img

  • Newbie
  • *
  • Posts: 28
    • View Profile
Re: query problems with MySQL 5.0.x
« Reply #64 on: May 20, 2006, 06:11:02 PM »
Ok, please test this (if it all works, I'll post it as a compability fix):
Please note, in each file is possible more then one instance of searched line, that means all of the found lines must be changed as instructed!


And for persons they have the Slideshow install zu mast chance this:

In slideshow.php
find:
Code: [Select]
FROM ".IMAGES_TABLE." i,  ".CATEGORIES_TABLE." cReplace with:
Code: [Select]
FROM (".IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c)
Line: 72


Offline masterzmind2004

  • Pre-Newbie
  • Posts: 9
    • View Profile
Re: query problems with MySQL 5.0.x
« Reply #65 on: November 14, 2006, 06:23:21 PM »
Check permissions...
Bingo - most of directories were owned by noobody instead of user, i dont know why, but chown fixed it - jetz alles gut :)
THX for suggestion.


I m also facing the problem after upgrading to mysql v5.0

I have replaced all files and now getting error file not found on images.

Let me know where you set the permission and which were the permissions ,

http://www.desktopwallpapers.ws

Thanks in advance

Tulip

Offline Toso

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
    • Lachs & Leder
Re: query problems with MySQL 5.0.x
« Reply #66 on: December 07, 2006, 01:30:45 PM »
It works. :mrgreen:

This is my last error message:

Quote
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 album_images i, album_categories c LEFT JOIN album_users u ON (u.user_id = i.user_id) WHERE i.image_active = 1 AND i.cat_id NOT IN (0) AND c.cat_id = i.cat_id LIMIT 4325, 1
Unknown column 'i.user_id' in 'on clause'

I think it relates to the random image !?!

Offline Ferus

  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: query problems with MySQL 5.0.x
« Reply #67 on: February 15, 2007, 04:44:17 PM »
I do this repair on my 4images 1.7.4 and only on index.php have error and the new images is not vieved.
Error Code:
Code: [Select]
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, 164, 96, 12, 93, 95, 46, 147, 74, 129, 143, 118, 11, 110, 139, 160, 1, 29, 48, 92, 13, 119, 161, 144, 142, 75, 128, 43, 146, 148, 165, 2, 151, 30, 28, 14, 91, 145, 10, 162, 76, 120, 79, 3, 49, 123, 41, 171, 149, 31, 4, 106, 15, 90, 125, 32, 50, 86, 77, 170, 80, 114, 44, 152, 89, 5, 17, 70, 112, 172, 177, 26, 78, 94, 55, 84, 88, 18, 108, 82, 25, 6, 155, 56, 85, 19, 87, 166, 158, 16, 7, 104, 57, 37, 20, 103, 83, 54, 8, 127, 58, 168, 38, 21, 141, 81, 9, 154, 150, 53, 22, 51, 167, 27, 45, 130, 109, 23, 173, 102, 122, 153, 126, 169, 59, 24, 111, 40, 174, 115, 105, 107, 178, 113, 39, 156, 176, 159, 60, 140, 157, 61, 101, 62, 63, 64, 65, 66, 67, 124, 68, 69, 71, 72, 73) ORDER BY i.image_date DESC LIMIT 20
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') LEFT JOIN 4images_users u ON (u.user_id = i.user_id) WHERE i.i' at line 2
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /includes/db_mysql.php on line 116

Okay, i do some rest of repair and i got :

Code: [Select]
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, 164, 96, 12, 93, 95, 46, 147, 74, 129, 143, 118, 11, 110, 139, 160, 1, 29, 48, 92, 13, 119, 161, 144, 142, 75, 128, 43, 146, 148, 165, 2, 151, 30, 28, 14, 91, 145, 10, 162, 76, 120, 79, 3, 49, 123, 41, 171, 149, 31, 4, 106, 15, 90, 125, 32, 50, 86, 77, 170, 80, 114, 44, 152, 89, 5, 17, 70, 112, 172, 177, 26, 78, 94, 55, 84, 88, 18, 108, 82, 25, 6, 155, 56, 85, 19, 87, 166, 158, 16, 7, 104, 57, 37, 20, 103, 83, 54, 8, 127, 58, 168, 38, 21, 141, 81, 9, 154, 150, 53, 22, 51, 167, 27, 45, 130, 109, 23, 173, 102, 122, 153, 126, 169, 59, 24, 111, 40, 174, 115, 105, 107, 178, 113, 39, 156, 176, 159, 60, 140, 157, 61, 101, 62, 63, 64, 65, 66, 67, 124, 68, 69, 71, 72, 73) ORDER BY i.image_date DESC LIMIT 20 Unknown column 'i.user_id' in 'on clause'
« Last Edit: February 15, 2007, 06:08:50 PM by Ferus »

ScreamLP

  • Guest
Re: query problems with MySQL 5.0.x
« Reply #68 on: April 16, 2007, 01:26:01 AM »
Hallo
ich weis es ist ein altes Thema :?

Aber mir werde folgende Meldungen angezeigt

Code: [Select]
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 i.cat_id NOT IN (0) AND c.cat_id = i.cat_id LIMIT 279, 1
Unknown column 'i.user_id' in 'on clause'

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 NOT IN (0) ORDER BY i.image_date DESC LIMIT 4
Unknown column 'i.user_id' in 'on clause'

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/www/doc/7136/net-24.info/www/includes/db_mysql.php on line 116


Mein Prob ist ich kann absolut kein english.
Sollte hier also irgendwo die Lösung stehen verstehe ich sie nicht.

Gallery Version: 1.7.1
PHP Version 4.4.6
MySQL-Client-Version: 5.0.18
http://www.net-24.info/


Wie gesagt ich weis das das hier ein altes Thema ist und ihr seit es bestimmt auch Leid aber bitte helft mir

Offline Jan-Lukas

  • Addicted member
  • ******
  • Posts: 1.284
    • View Profile
    • Discover the New World of Kindersurprise
Re: query problems with MySQL 5.0.x
« Reply #69 on: June 27, 2007, 05:40:43 PM »
Hosteurope hat auch die Nacht updates gefahren, dieser Threat hilft natürlich auch da gegen

Danke, für die Lösung

Harald
Danke Harald




Offline HorrorCrafT

  • Full Member
  • ***
  • Posts: 106
    • View Profile
    • HYPOfun online
Re: query problems with MySQL 5.0.x
« Reply #70 on: June 28, 2007, 12:34:03 AM »
Hosteurope hat auch die Nacht updates gefahren, dieser Threat hilft natürlich auch da gegen

Danke, für die Lösung

Harald
ging mir genauso :mrgreen: heute morgen hat keine meiner bildergalerien mehr funktioniert :?

noch ein tipp:
vermutlich hat fast jeder add-ons eingebaut. in diesen php dateien (z.b. comments_all.php - ist das "alle kommentare addon" oder potm.php - "picture of the month addon") müsst ihr die klammern bei einem FROM befehl auch setzen! am besten ihr sucht nur nach "FROM" und schaut ob die gefundene zeile aus mehr als nur einer variable besteht. wenn ja, dann klammer drumrum. hat bei mir wunderbar geklappt und nun funktioniert wieder alles.

Offline baghdad4ever

  • Newbie
  • *
  • Posts: 28
    • View Profile
Re: query problems with MySQL 5.0.x
« Reply #71 on: October 25, 2007, 12:08:01 PM »
Ok, please test this (if it all works, I'll post it as a compability fix):

Please note, in each file is possible more then one instance of searched line, that means all of the found lines must be changed as instructed!

In index.phpcategories.phpdetails.phppostcards.phpsearch.phptop.phpincludes/functions.php (two times) find:
Code: [Select]
FROM ".IMAGES_TABLE." i,  ".CATEGORIES_TABLE." cReplace with:
Code: [Select]
FROM (".IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c)

In member.phpadmin/comments.php find:
Code: [Select]
FROM ".COMMENTS_TABLE." c, ".IMAGES_TABLE." iReplace with:
Code: [Select]
FROM (".COMMENTS_TABLE." c, ".IMAGES_TABLE." i)

Stop here. Test every page and only if you have problem continue next:

In postcards.php find:
Code: [Select]
FROM ".POSTCARDS_TABLE." p, ".IMAGES_TABLE." iReplace with:
Code: [Select]
FROM (".POSTCARDS_TABLE." p, ".IMAGES_TABLE." i)

In search.php find:
Code: [Select]
FROM ".WORDLIST_TABLE." w, ".WORDMATCH_TABLE." mReplace with:
Code: [Select]
FROM (".WORDLIST_TABLE." w, ".WORDMATCH_TABLE." m)

In includes/auth.php find:
Code: [Select]
FROM ".GROUP_ACCESS_TABLE." a, ".GROUP_MATCH_TABLE." mReplace with:
Code: [Select]
FROM (".GROUP_ACCESS_TABLE." a, ".GROUP_MATCH_TABLE." m)

In admin/home.php find:
Code: [Select]
FROM ".USERS_TABLE." u, ".SESSIONS_TABLE." sReplace with:
Code: [Select]
FROM (".USERS_TABLE." u, ".SESSIONS_TABLE." s)

In admin/usergroups.php find:
Code: [Select]
FROM ".GROUPS_TABLE." g, ".GROUP_MATCH_TABLE." gmReplace with:
Code: [Select]
FROM (".GROUPS_TABLE." g, ".GROUP_MATCH_TABLE." gm)



i have the same problem

but after make the above changes

it is work fine


but i have now

new problem

i cant upload any picture :roll:

how fix that


php version 5.2.4

mysql          5.0.27

4images        1.7

Offline jbrusi

  • Newbie
  • *
  • Posts: 20
    • View Profile
Re: query problems with MySQL 5.0.x
« Reply #72 on: October 30, 2007, 11:45:32 AM »
Well i did all of V@no's changes and the user interface seemed to work OK.

I then encountered other problems when trying to delete a photo. I am assumming this is related to MySQL 5 as well. I am running 1.7.1

¿Will the current version of 4 images be able to deal with MySQL 5?

Thanks

Offline kai

  • Administrator
  • Addicted member
  • *****
  • Posts: 1.407
    • View Profile
    • 4images - Image Gallery Management System
Re: query problems with MySQL 5.0.x
« Reply #73 on: October 30, 2007, 12:32:07 PM »

¿Will the current version of 4 images be able to deal with MySQL 5?

Yes, download here:
http://www.4homepages.de/4images/download.php
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline Gibsy

  • Newbie
  • *
  • Posts: 23
    • View Profile
    • Gibsys Spielparadies
Re: query problems with MySQL 5.0.x
« Reply #74 on: October 30, 2007, 06:12:36 PM »
Hallo,

ich habe alle änderungen getätigt und die fehler sind auch behoben, bei Seiten aufruf erscheinen keine fehler mehr, nun kann ich aber keine neuen Kategorien erstellen und bilder hinzufügen geht auch nicht, die Thumpnails gehen nicht auf :oops:
Wenn ich neue Kategorie erstelle kommen alle Kategorien die existieren dutzend mal und hört nicht auf, ich muß dann das Fenster schließen und wenn ich meine 4images Seite aufrufe kommt diese Meldung:
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 65979 bytes) in /var/www/web80/html/dim/4images/includes/functions.php on line 1165
Ich muß dann bei phpMyAdmin 4images_categoies die erstellte Kategorie löschen damit es wieder funktioniert.
Wenn ich bilder hinzufüge und klicke auf den Thumpnail dann passiert nichts, die gleiche seite erscheint wieder :oops:

Kann mir jemand helfen und hat ne Idee wo der fehler liegen könnte :cry: ich Danke im voraus.