Problem after Install Gallery 2.6.2 - Joomla 1.5.14

Phoca Gallery - image gallery extension
LukasHH
Phoca Newbie
Phoca Newbie
Posts: 7
Joined: 23 Jan 2010, 00:28

Problem after Install Gallery 2.6.2 - Joomla 1.5.14

Post by LukasHH »

Hello,

i have a problem after the installation Phoca Gallery v2.6.2 in the category and users.
PHP-Version: 4.4.9
MySQL-Version: 4.0.25

Problem 1
The Error-Message in the "category" is

Code: Select all

Warning: Invalid argument supplied for foreach() in /www/htdocs/w008325e/cms/administrator/components/com_phocagallery/models/phocagallerycs.php on line 126
i have (after the first problem) the DB tables manually install from the install.bak. the columns is completely in the table jos_phocagallery_categories

The Error-Message in the Debug-Mode from Joomla:

Code: Select all

JDatabaseMySQL::query: 1064 - 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 'SELECT c.parent_id, count(*) AS countid FROM jos_phocagallery_c SQL=SELECT a.*, cc.title AS parentname, u.name AS editor, g.name AS groupname, v.average AS ratingavg, ua.username AS usercatname, c.countid AS countid FROM jos_phocagallery_categories AS a LEFT JOIN jos_users AS u ON u.id = a.checked_out LEFT JOIN jos_groups AS g ON g.id = a.access LEFT JOIN jos_phocagallery_categories AS cc ON cc.id = a.parent_id LEFT JOIN jos_phocagallery_votes_statistics AS v ON v.catid = a.id LEFT JOIN jos_users AS ua ON ua.id = a.owner_id JOIN (SELECT c.parent_id, count(*) AS countid FROM jos_phocagallery_categories AS c GROUP BY c.parent_id ) AS c ON a.parent_id = c.parent_id ORDER BY a.ordering
I cant create a new category and not show it under "category".

Problem 2
This is under users Error-Message:

Code: Select all

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /www/htdocs/w008325e/cms/libraries/joomla/database/database/mysql.php on line 344

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /www/htdocs/w008325e/cms/libraries/joomla/database/database/mysql.php on line 344
The Error-Message in the Debug-Mode from Joomla:

Code: Select all

JDatabaseMySQL::query: 1064 - 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 'SELECT c.owner_id, c.id, count(*) AS countcid FROM jos_phocaga SQL=SELECT a.*, us.name AS username, u.name AS editor, c.countcid, i.countiid FROM jos_phocagallery_user AS a LEFT JOIN jos_users AS us ON us.id = a.userid LEFT JOIN jos_users AS u ON u.id = a.checked_out LEFT JOIN (SELECT c.owner_id, c.id, count(*) AS countcid FROM jos_phocagallery_categories AS c GROUP BY c.owner_id) AS c ON a.userid = c.owner_id LEFT JOIN (SELECT i.catid, uc.userid AS uid, count(i.id) AS countiid FROM jos_phocagallery AS i LEFT JOIN jos_phocagallery_categories AS cc ON cc.id = i.catid LEFT JOIN jos_phocagallery_user AS uc ON uc.userid = cc.owner_id GROUP BY uc.userid ) AS i ON i.uid = c.owner_id WHERE us.id > 0 ORDER BY a.ordering LIMIT 0, 20
I find no help on forums and google

P.S. - sorry for my english (google translater help me) *fg*

dear regards from Hamburg

Lukas
LukasHH
Phoca Newbie
Phoca Newbie
Posts: 7
Joined: 23 Jan 2010, 00:28

Re: Problem after Install Gallery 2.6.2 - Joomla 1.5.14

Post by LukasHH »

Als Workaround habe ich die alten Dateien aus der Version 2.0.0 überschrieben und die Tabelle jos_phocagallery_user_category neu angelegt. Mit der Version erscheint der Fehler nicht.

Im Testsystem habe ich MySQL 5.0.51b und hier läuft die Gallery 2.6.2 ebenfalls ohne Probleme.

Kann es denn an der MySQL Version liegen? Eine Lösung habe ich bisher noch nicht gefunden.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48752
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Problem after Install Gallery 2.6.2 - Joomla 1.5.14

Post by Jan »

Hallo, ja manche alte Versions haben Probleme mit (ich glaube) count(*). Ich weiss es nicht genau, welcher bestimmten Teil das Problem hat, aber ich weiss, dies Query hat Probleme an alten Versionen von MySQL.

Jan
If you find Phoca extensions useful, please support the project
LukasHH
Phoca Newbie
Phoca Newbie
Posts: 7
Joined: 23 Jan 2010, 00:28

Re: Problem after Install Gallery 2.6.2 - Joomla 1.5.14

Post by LukasHH »

Hallo Jan,

danke für die Auskunft. Ich habe es mir schon fast gedacht, daß es an dem count(*) liegt. Ich werde mal schauen, welchen Aufwand es gibt, die DB zu aktualisieren. Kennst Du sonst eine alternative zu dem count(*) die man einbauen kann? Spontan fällt mir da jetzt keine ein.
User avatar
eryk
Phoca Newbie
Phoca Newbie
Posts: 5
Joined: 06 May 2009, 01:26

Re: Problem after Install Gallery 2.6.2 - Joomla 1.5.14

Post by eryk »

I have same problem upgraded from 2.4.2 then i approved all photos, cant approve categories they not listed under category. I've approved trough the phpmyadmin by editing approved on each record.

Now i can see pictures on fronted but the category names on frontedn have now coding issue :/

Also i can make a new category which i stil can't see under category.
LukasHH
Phoca Newbie
Phoca Newbie
Posts: 7
Joined: 23 Jan 2010, 00:28

Re: Problem after Install Gallery 2.6.2 - Joomla 1.5.14

Post by LukasHH »

Hello Eryk,

this problem is probably in the MySQL Version.

On my Server is the MySQL-Version 4.0 and have here the Problems. Under MySQL 5.0 is not this problem.

We must updatet the MySQL upper to 5.0
User avatar
eryk
Phoca Newbie
Phoca Newbie
Posts: 5
Joined: 06 May 2009, 01:26

Re: Problem after Install Gallery 2.6.2 - Joomla 1.5.14

Post by eryk »

You've right there's problem with Mysql i've done update on another server with one or two clicks!

Jan do you have solutoion for MySQL 4.x, upgrading mysql is not an option! What i can do?
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48752
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Problem after Install Gallery 2.6.2 - Joomla 1.5.14

Post by Jan »

Hi, no :( I don't have any solution, maybe you can reduce the sql query, but then you need to remove the information which needs the count e.g. etc in the code :(
If you find Phoca extensions useful, please support the project
LukasHH
Phoca Newbie
Phoca Newbie
Posts: 7
Joined: 23 Jan 2010, 00:28

Re: Problem after Install Gallery 2.6.2 - Joomla 1.5.14

Post by LukasHH »

Hello Jan,

i have this tested. the problem is not the "count(*)" in the code, this problem is the subselect.
write the subselect in a temporary table and join the code width the temporary table.

1. step - create a new or temporary table
2. step - write the result from the subselect in this table
3. step - instead of the subselect, join the new/temporary table
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48752
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Problem after Install Gallery 2.6.2 - Joomla 1.5.14

Post by Jan »

Hi, thank you for this information.

Jan
If you find Phoca extensions useful, please support the project
Post Reply