Page 1 of 1

Errors, can't create categories

Posted: 25 Feb 2010, 23:40
by Moca
Hi,
first thank you for developing this fantastic joomla! components.

Unfortunately I get problems I can't resolve. I checked the forum, saw other people have the same problem, some were able to resolve them, but none worked for me.

After installation, I have this errors:

Categories:
Warning: Invalid argument supplied for foreach() in xxx/administrator/components/com_phocagallery/models/phocagallerycs.php on line 126

Users:
Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in xxx/libraries/joomla/database/database/mysql.php on line 344 (two times)

If I put joomla! in debug mode and go to phoca gallery I get a 500 Error:
500 - An error has occurred.
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 checked the database tables. They are created normally without problem. If I try to create the tables manually I get an error which can be corrected in omitting "DEFAULT CHARSET=utf8 " after TYPE=MyISAM. But the errors I get still remain.

My Joomla! runs with:
Database Version: 4.0.23-Max-log
Database Collation: N/A (mySQL < 4.1.2)
PHP Version: 5.3.1

Thanks in advance for you time and help.

Re: Errors, can't create categories

Posted: 26 Feb 2010, 14:35
by Jan
Hi, the fastest way to solve it is upgrading your mysql to version 5.
Seems like your obsolete version doesn't support combined SQL queries.

Jan

Re: Errors, can't create categories

Posted: 26 Feb 2010, 23:15
by Moca
Thanks Jan,

seems to be the best choice, I have to check this with the server provider.

I have another phoca gallery running with SQL5, and it works fine.
Thank you again for your fantastic job.

Re: Errors, can't create categories

Posted: 27 Feb 2010, 15:14
by Jan
Ok