Hi all,
I’m pretty new to modx, but had a great time over the past few weeks building a small site in it. I’m now trying to set that site up on a live server and am hitting some issues.
I can log in to the manager but when I do the document tree is not visible, and most functions do not work, e.g. adding new users.
If I clear the error log and reload the page, I get the error shown below.
First I was trying to copy my existing site up with all its content so I thought that was giving the error. I then deleted everything I uploaded, and reinstalled modx (Revo 2.0.7) from the download into a fresh database, still getting the same error.
I’ve tried clearing the cache both through the Manager and by deleting the files manually to no avail. I’ve checked all the permissions to the point of setting the entire directory structure to 777.
Versions of software on my local environment, where everything works are:
MacOS 10.6.6
php Version 5.3.2
mysql client and server verion 5.1.44
On the live server where things don’t work I have:
CentOS release 5.5
php Version 5.2.15
mysql Server version: 5.0.91-community
MySQL client version: 4.1.22
Googling the error below gives a few people having a similar issue, but with no resolution. If I get this solved I promise to return to this thread and post the solution!
Here is the error I’m getting:
[2011-02-14 09:29:30] (ERROR @ /cms/manager/index.php) Error preparing statement for query: SELECT modActionDom.*, Set.constraint_class, Set.constraint_field, Set.constraint, Set.template FROM `modx_actiondom` AS `modActionDom` JOIN `modx_fc_sets` `Set` ON `modActionDom`.`set` = `Set`.`id` JOIN `modx_fc_profiles` `Profile` ON Set.profile = Profile.id LEFT JOIN `modx_fc_profiles_usergroups` `ProfileUserGroup` ON Profile.id = ProfileUserGroup.profile LEFT JOIN `modx_fc_profiles` `UGProfile` ON UGProfile.id = ProfileUserGroup.profile WHERE ( ( `modActionDom`.`action` = ? AND `modActionDom`.`for_parent` = ? AND `Set`.`active` = ? AND `Profile`.`active` = ? ) AND ( ( `ProfileUserGroup`.`usergroup` IN (’1’) OR ( `ProfileUserGroup`.`usergroup` IS ? AND `UGProfile`.`active` = ? ) ) OR `ProfileUserGroup`.`usergroup` IS ? ) ) ORDER BY Set.template ASC, modActionDom.rank ASC - Array
(
[0] => 42000
[1] => 1064
[2] => 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 ’? AND `UGProfile`.`active` = ? ) ) OR `ProfileUserGroup`.`usergroup` IS ? ) )’ at line 1
)
thanks!
Revolution should work with MySQL databasie 4.1.20 or newer so your MySQL client version: 4.1.22 shouldn’t be an problem but usually such errors relate to compatibility issues. Especially as you get the error even on a clean install. Does you host not have a newer version that they can move you to?
That was the problem. Upgrading to mysql 5.1.54 fixed it. That’s what I get for trusting the back of the box.
Thanks for your help!