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

0 Members and 1 Guest are viewing this topic.

Offline horo

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: query problems with MySQL 5.0.x
« Reply #45 on: February 11, 2006, 06:40:47 PM »
I'm using MySQL 5.0.18 on Win32 along with PHP 5.1.2. I did all the changes from #15 and it works. There are 1, 2 or 4 lines per file to change. Continue searching after the first occurence until the file end.

Ich benutze MySQL 5.0.18 mit PHP 5.1.2 auf Win32. Ich führte alle Änderungen von #15 durch und es funktioniert. Es gibt 1, 2 oder 4 Zeilen in den verschiedenen Dateien zu korrigieren. Unbedingt nach dem ersten Vorkommen bis zum Dateiende weitersuchen.

There is another problem: Login/Logout. After login (or logout), a blank page or an error msg from the webserver that the requested URL wouldn't be on the server. However, pressing the back-button on the browser and going to the main screen reveils that I am logged in. Same stuff for logout.

Es gibt ein anderes Problem: Login/Logout. Nach dem loogin (oder logout) erscheint eine leere Seite oder ein Hinweis vom Webserver, dass der URL hier nicht gefunden werden konnte. Drückt man den Zurück-Knopf am Browser und geht auf die Hauptseite, sieht man sich eingeloggt (ditto logout).

You may test this behaviour on Dieses Verhalten kann man testen auf http://horo.dyndns.org/4images/ User='tester' pass='tester'.

Suggestions? Vorschläge?

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 #46 on: February 11, 2006, 06:45:53 PM »
And what does it have to do with MySQL v5.x problem?
Please start a new topic regarding this issue.
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 horo

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: query problems with MySQL 5.0.x
« Reply #47 on: February 11, 2006, 06:52:02 PM »
Ok, I will. Thought it might have a connection. Sorry for the inconvenience.

Offline Kruser

  • Newbie
  • *
  • Posts: 20
    • View Profile
Re: query problems with MySQL 5.0.x
« Reply #48 on: February 17, 2006, 11:37:08 AM »
sowas hier auch mit klammern ersetzen ??

 FROM ".POSTCARDS_TABLE." p, ".IMAGES_TABLE." i

oder sowas :

 sql = "DELETE FROM ".POSTCARDS_TABLE."
          WHERE (postcard_date < $expiry)";
  $site_db->query($sql);


  ????

Offline horo

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: query problems with MySQL 5.0.x
« Reply #49 on: February 20, 2006, 03:48:11 PM »
Kruser - Ich habe alles von #15 ersetzt:

FROM ".blabla_TABLE." x, ".blabla_TABLE." y
FROM (".blabla_TABLE." x, ".blabla_TABLE." y)

dann hat's geklappt.

Offline ruudvroon

  • Jr. Member
  • **
  • Posts: 79
    • View Profile
    • AFTERTHEPARTY.NL
Re: query problems with MySQL 5.0.x
« Reply #50 on: February 21, 2006, 08:36:38 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)


In some of the files V@no mentioned before, you can find the lines more than once (e.g. top.php and index.php), replace all these lines.
Also look for (only one space in the middle) in all the files:
Code: [Select]
FROM ".IMAGES_TABLE." i, ".CATEGORIES_TABLE." cReplace with:
Code: [Select]
FROM (".IMAGES_TABLE." i, ".CATEGORIES_TABLE." c)
V@no forgot to mention that you also need to edit these files: lightbox.php and includes/page_header.php

Look for:
Code: [Select]
FROM ".IMAGES_TABLE." i,  ".CATEGORIES_TABLE." cReplace with:
Code: [Select]
FROM (".IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c)

In some plugins for the admin panel (e.g. Batch ZIP Import, Batch Import AND Postcard Viewer

Look for:
Code: [Select]
$PHP_SELFReplace with:
Code: [Select]
$_SERVER['PHP_SELF']

I think everythink has to work now. :D
« Last Edit: February 21, 2006, 08:52:04 PM by ruudvroon »

Offline raagaswaram

  • Pre-Newbie
  • Posts: 4
    • View Profile
Re: query problems with MySQL 5.0.x
« Reply #51 on: March 22, 2006, 11:08:04 PM »
even after editing it im getting this error

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) 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, 1, 117, 9, 17, 18, 52, 116) AND c.cat_id = i.cat_id LIMIT 1490, 1
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 'c LEFT JOIN 4images_users u ON (u.user_id = i.user_

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 #52 on: March 23, 2006, 12:40:42 AM »
You have an extra 'c':[qcode] FROM (4images_images i, 4images_categories c) c LEFT JOIN[/qcode]
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 raagaswaram

  • Pre-Newbie
  • Posts: 4
    • View Profile
Re: query problems with MySQL 5.0.x
« Reply #53 on: March 23, 2006, 09:44:43 PM »
hey in which file?

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 #54 on: March 24, 2006, 12:45:35 AM »
I dont know...you changed 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 claire-l

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: query problems with MySQL 5.0.x
« Reply #55 on: March 29, 2006, 08:35:48 PM »
Hello :)

I was using 4images on two web sites free.fr and it worked well, but Free has just changed mysql from v4 to v5 and everything goes wrong :(

well, i downloaded the punzeroni's files http://www.milchsemmel.de/~punzeroni/4images-SQL2003fix.tar.bz2 (thanks a lot) and replace the old files, and now i've got this error on index.php :

Code: [Select]
Fatal error: Call to undefined function: create_cache_id() in /var/www/sdb/1/3/mysite/index.php on line 56
and i don't know how to fix it.

could someone help ? :|

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 #56 on: March 30, 2006, 02:14:48 AM »
the files you downloaded are for v1.7.1 and you seems to using quiet out dated v1.7
So, the solution is restore your backups (I hope you do backups before you do any changes) and then manualy fix the code by following hints from this topic.
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 claire-l

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: query problems with MySQL 5.0.x
« Reply #57 on: March 30, 2006, 11:34:33 AM »
thanks a lot :)

i think i read bad the first time  :roll:

everything seems to work good now.

Offline alphavto

  • Newbie
  • *
  • Posts: 10
    • View Profile
    • http://www.block-a.de
Re: query problems with MySQL 5.0.x
« Reply #58 on: May 03, 2006, 02:48:44 AM »
Greats. Thanx.
Btw.: when you have install the MOD Mini-Top, you must also changing this in mini-top.php

Offline mczapkie

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: query problems with MySQL 5.0.x
« Reply #59 on: May 11, 2006, 02:24:42 PM »
Ok, please test this (if it all works, I'll post it as a compability fix):
...

The SQL error vanished, by all my images either - there are standard 4images miniatures (jpg eye) instead of previous in images listing,
and 4images "error404" icon instead of image on details page:
http://149.156.194.203/~mczapkie/4images/index.php

I have no idea how to fix it.

Regards,
Mc