4images Forum & Community
General / Allgemeines => Chit Chat => Topic started by: geohei on December 11, 2006, 11:28:13 PM
-
Hi.
Here my signature code:
http://www.geohei.lu/geoheiBB/viewtopic.php?t=471
This works fine with PHP 4.4.2, however it doesn't show anything for PHP 5.1.2.
Since I do require PHP 5.1.2 for wiki, I'd like to change the Signature 2.21 in order to make it compatible to PHP 5.1.2.
Any ideas what's wrong?
Thanks.
-
... search for php5 compatible ...
http://www.4homepages.de/forum/index.php?topic=6632.msg83700#msg83700
http://www.4homepages.de/forum/index.php?topic=10184.msg50191#msg50191
-
... search for php5 compatible ...
http://www.4homepages.de/forum/index.php?topic=6632.msg83700#msg83700
This backet issue seems to be mandatory. I found 3 instances of "LEFT JOIN". I changed the code as follows:
...
$sql = "CREATE TEMPORARY TABLE ".$temptab." TYPE = HEAP
SELECT i.image_id, i.cat_id
FROM (".IMAGES_TABLE." i)
LEFT JOIN ".CATEGORIES_TABLE." c ON c.cat_id = i.cat_id
WHERE i.image_active = 1 AND c.auth_viewcat = $auth AND i.cat_id NOT IN ($not_in_cat)".(($peruser) ? " AND i.user_id = ".$peruser : "").(($imageid) ? " AND i.image_id <> ".$imageid : "")."
ORDER BY RAND()
LIMIT 1";
...
$sql = "SELECT t.image_id, t.cat_id, i.user_id, i.image_name, i.image_media_file, i.image_thumb_file
FROM (".$temptab." AS t)
LEFT JOIN ".IMAGES_TABLE." AS i ON i.image_id=t.image_id";
...
$sql = "SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_media_file, i.image_thumb_file
FROM (".IMAGES_TABLE." i)
LEFT JOIN ".CATEGORIES_TABLE." c ON c.cat_id = i.cat_id
WHERE i.image_active = 1 AND c.auth_viewcat = $auth AND i.cat_id NOT IN ($not_in_cat)".(($peruser) ? " AND i.user_id = ".$peruser : "").(($imageid) ? " AND i.image_id <> ".$imageid : "")."
ORDER BY RAND()
LIMIT 1";
...
Is this correct?
It doesn't work for me :cry:
http://www.4homepages.de/forum/index.php?topic=10184.msg50191#msg50191
This seems to apply only to the gallery itself, not to signature.php. Correct?
Thanks,
-
No answers yet ... :(
I can hardly imagine that I am the first one who hits this problem.
Is the MySQL version also related to some extent to this problem, or is it only the PHP version which makes the signature.php code not work?
Thanks,
-
Hi.
I installed XAMPP on a test system in order to trace the problem regarding PHP 5. Can't find find anything posted in this thread (or included links), which would solve this issue.