<?xml version="1.0" encoding="UTF-8"?> 
<?xml-stylesheet href="https://dev.horde.org/themes/horde//default/feed-rss.xsl" type="text/xsl"?> 
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> 
 <channel> 
  <title>Query&#039;s from Drivers/SQl.php incompatibility with Mysql 5</title> 
  <pubDate>Fri, 10 Apr 2026 17:02:39 +0000</pubDate> 
  <link>https://bugs.horde.org/ticket/7092</link> 
  <atom:link rel="self" type="application/rss+xml" title="Query&#039;s from Drivers/SQl.php incompatibility with Mysql 5" href="https://bugs.horde.org/ticket/7092/rss" /> 
  <description>Query&#039;s from Drivers/SQl.php incompatibility with Mysql 5</description> 
 
   
   
  <item> 
   <title>We have errors like thi on horde.log;

Jul 22 14:39:54 HORDE</title> 
   <description>We have errors like thi on horde.log;

Jul 22 14:39:54 HORDE [error] [kronolith] DB Error: syntax error: SELECT event_id, event_uid, calendar_id, event_description, event_location, event_private, event_status, event_attendees, event_keywords, event_title, event_category, event_recurcount, event_recurtype, event_recurenddate, event_recurinterval, event_recurdays, event_start, event_end, event_alarm, event_modified, event_exceptions, event_creator_id FROM kronolith_events WHERE event_uid = ? AND calendar_id IN (?) [nativecode=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 &#039;? AND calendar_id IN (?)&#039; at line 1] [pid 29998 on line 435 of &quot;/var/www/horde/kronolith/lib/Driver/sql.php&quot;]



when we sync calendar, the enevnts are inserted in the database, but you have error on server.



We have made simple querys like:



SELECT event_uid FROM kronolith_events WHERE event_uid = ?;

ERROR 1064 (42000): 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 &#039;?&#039; at line 1



and have the same error.



This is our Mysql version



MYSQL VERSION: mysql  Ver 14.12 Distrib 5.0.51a





</description> 
   <pubDate>Tue, 22 Jul 2008 13:04:48 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7092#t47702</link> 
  </item> 
   
  <item> 
   <title>I&#039;m not sure I understand your issue.  That query uses bind </title> 
   <description>I&#039;m not sure I understand your issue.  That query uses bind parameters and goes through the DB abstraction layer before going to mysql.  Also, your report states this is from version 2.2 of Kronolith, but the line number given in the error message does not correspond to any line in 2.2 that would produce such a message. Lastly, this works fine for me on 3 different boxes using various flavors of mysql 5.0.x 

</description> 
   <pubDate>Tue, 22 Jul 2008 13:38:51 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7092#t47704</link> 
  </item> 
   
  <item> 
   <title>&gt; I&#039;m not sure I understand your issue.  That query uses bin</title> 
   <description>&gt; I&#039;m not sure I understand your issue.  That query uses bind 

&gt; parameters and goes through the DB abstraction layer before going to 

&gt; mysql.  Also, your report states this is from version 2.2 of 

&gt; Kronolith, but the line number given in the error message does not 

&gt; correspond to any line in 2.2 that would produce such a message. 

&gt; Lastly, this works fine for me on 3 different boxes using various 

&gt; flavors of mysql 5.0.x

&gt;



Hi Michael,



I will try to clarify you the question.



I find the error reported to you on horde.log.



I test de SELECT command executing it directly with mysql-client. I found the same error.



I think is a problem with the use of  the character &#039;?&#039; on the select. I think you are using it on some places in sql.php i.e.:



line 502: &quot;WHERE event_id = ?&#039;&quot;



The version of sql.php I have installed is  



$Horde: kronolith/lib/Driver/sql.php,v 1.136.2.36 2008/05/14 19:41:02 chuck Exp $



Patched with sql.php.patch and sql.php.2.patch. (I patched it after the error), 



Can be it is a problem of backward compatibility of Mysql 5, and I need to set any parameter on my.cnf, I&#039;m checking it.



If you consider this is not a bug I can to continue this discussion on the mailing list.



Thanks in advance.













</description> 
   <pubDate>Tue, 22 Jul 2008 16:34:30 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7092#t47706</link> 
  </item> 
   
  <item> 
   <title>&gt; I test de SELECT command executing it directly with mysql-</title> 
   <description>&gt; I test de SELECT command executing it directly with mysql-client. I 

&gt; found the same error.



Well, if all you did was paste that query into the client, then of course it won&#039;t work. The &#039;?&#039; is a placeholder that gets replaced with the real values when the actual query is done.



&gt; The version of sql.php I have installed is

&gt;

&gt; $Horde: kronolith/lib/Driver/sql.php,v 1.136.2.36 2008/05/14 19:41:02 

&gt; chuck Exp $



Again, line 435 in this version of the file would not output that error...are you 100% positive that you have not made local changes to this file?



&gt; Patched with sql.php.patch and sql.php.2.patch. (I patched it after 

&gt; the error),



...and what patches are these? I have no idea what these patches are.



&gt; Can be it is a problem of backward compatibility of Mysql 5, and I 

&gt; need to set any parameter on my.cnf, I&#039;m checking it.



Not likely.

</description> 
   <pubDate>Tue, 22 Jul 2008 21:18:52 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7092#t47714</link> 
  </item> 
   
  <item> 
   <title>&gt;&gt; I test de SELECT command executing it directly with mysql</title> 
   <description>&gt;&gt; I test de SELECT command executing it directly with mysql-client. I

&gt;&gt; found the same error.

&gt;

&gt; Well, if all you did was paste that query into the client, then of 

&gt; course it won&#039;t work. The &#039;?&#039; is a placeholder that gets replaced 

&gt; with the real values when the actual query is done.

&gt;

Ok, I undestand it, but if it must be replaced, wich is the value must be registered in the log, the placeholder &#039;?&#039; or the real value?.



I have checked the mydql.log and foungd this:



                   1048 Query       SELECT event_id, event_uid, calendar_id, eve

nt_description, event_location, event_private, event_status, event_attendees, ev

ent_keywords, event_title, event_category, event_recurcount, event_recurtype, ev

ent_recurenddate, event_recurinterval, event_recurdays, event_start, event_end,

event_alarm, event_modified, event_exceptions, event_creator_id FROM kronolith_e

vents WHERE event_uid = ? AND calendar_id IN (?)



I think in any case the placeholder &#039;?&#039; is not replaced and it makes the error.



                  

&gt;&gt; The version of sql.php I have installed is

&gt;&gt;

&gt;&gt; $Horde: kronolith/lib/Driver/sql.php,v 1.136.2.36 2008/05/14 19:41:02

&gt;&gt; chuck Exp $

&gt;

&gt; Again, line 435 in this version of the file would not output that 

&gt; error...are you 100% positive that you have not made local changes to 

&gt; this file?

&gt;



I attach you my sql.php file



&gt;&gt; Patched with sql.php.patch and sql.php.2.patch. (I patched it after

&gt;&gt; the error),

&gt;

&gt; ...and what patches are these? I have no idea what these patches are.



http://bugs.horde.org/ticket/6946

http://bugs.horde.org/ticket/6966



I&#039;ll try to make more intensive test, change the origin calendar, create new calendars, etc.







</description> 
   <pubDate>Wed, 23 Jul 2008 07:04:50 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7092#t47727</link> 
  </item> 
   
  <item> 
   <title>I have configured horde logging in debug mode an get this:

</title> 
   <description>I have configured horde logging in debug mode an get this:



Jul 23 10:02:03 HORDE [debug] [kronolith] Kronolith_Driver_sql::getByUID(): user = &quot;a00ah001&quot;; query = &quot;SELECT event_id, event_uid, calendar_id, event_descri

ption, event_location, event_private, event_status, event_attendees, event_keywords, event_title, event_category, event_recurcount, event_recurtype, event_re

curenddate, event_recurinterval, event_recurdays, event_start, event_end, event_alarm, event_modified, event_exceptions, event_creator_id FROM kronolith_even

ts WHERE event_uid = ? AND calendar_id IN (?)&quot;; values = &quot;&quot; [pid 1636 on line 427 of &quot;/var/www/horde/kronolith/lib/Driver/sql.php&quot;]



Jul 23 10:02:03 HORDE [error] [kronolith] DB Error: syntax error: SELECT event_id, event_uid, calendar_id, event_description, event_location, event_private, event_status, event_attendees, event_keywords, event_title, event_category, event_recurcount, event_recurtype, event_recurenddate, event_recurinterval, event_recurdays, event_start, event_end, event_alarm, event_modified, event_exceptions, event_creator_id FROM kronolith_events WHERE event_uid = ? AND calendar_id IN (?) [nativecode=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 &#039;? AND calendar_id IN (?)&#039; at line 1] [pid 1636 on line 431 of &quot;/var/www/horde/kronolith/lib/Driver/sql.php&quot;]



I thiks this is that the values for the variables are unset.



This occurs on calendar sync process from Funambul 6.5.8/Outlook2007 to Horde.



I can send you horde.log and sync logs if you wish.





</description> 
   <pubDate>Wed, 23 Jul 2008 08:29:39 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7092#t47731</link> 
  </item> 
   
  <item> 
   <title>&gt; I attach you my sql.php file

&gt;

&gt;&gt;&gt; Patched with sql.php.</title> 
   <description>&gt; I attach you my sql.php file

&gt;

&gt;&gt;&gt; Patched with sql.php.patch and sql.php.2.patch. (I patched it after

&gt;&gt;&gt; the error),

&gt;&gt; ...and what patches are these? I have no idea what these patches are.

&gt;

&gt; http://bugs.horde.org/ticket/6946

&gt; http://bugs.horde.org/ticket/6966



Well, if you look at those tickets, you&#039;ll see that those patches were never applied to HEAD code, but other changes *were* made in those tickets.  Further, once again, at least one of the the log entries  you show in your most recent comment do *not* match the line numbers even in the sql.php file you uploaded here. We can&#039;t help you if your not running official Horde code.



My advise would be to get fresh checkout of Kronolith from either HEAD or a snapshot and then retest as those tickets look like they *might* solve your syncing problem.  



Please take further comments to the mailing list, or if after getting a fresh checkout you still encounter sync problems, please open a new ticket with an appropriate title.

</description> 
   <pubDate>Wed, 23 Jul 2008 13:10:10 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7092#t47736</link> 
  </item> 
   
   
 
 </channel> 
</rss> 
