Loading...
 
Architecture / Installation

Architecture / Installation


mysql error after install

posts: 1

After installing the tikiwiki, that is, after the script has created all the necessary tables, i'm taken to page tiki-index.php, where i get the following error

Warning: mysql error: 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 '-1' at line 1 in query:
select `permName`,`type`,`level`,`permDesc` from `users_permissions` order by `permName` desc
in /home/web/tiki/lib/tikidblib.php on line 125
Values:
Array ( )
$result is false
$result is empty

There's something wrong in the LIMIT clause in the query, i think it goes LIMIT 0,-1

Doeas anbody know why this happens?
I'm running apache 2.0.48, php5 RC1 (i also tried 4.3 with same results), mysql 4.1.1 alpha

thanks,
philtre

posts: 1001 Canada
Hi philtre, MySQL 4.1 is not supported by Tiki.
posts: 1 Russia

> Chealer9:
> Hi philtre, MySQL 4.1 is not supported by Tiki.

And how to work with UTF-8 without MySQL 4.1??
(I have some problem with Tiki)

posts: 2 Australia

> There's something wrong in the LIMIT clause in the query, i think it goes > LIMIT 0,-1

> Doeas anbody know why this happens?
> I'm running apache 2.0.48, php5 RC1 (i also tried 4.3 with same results), > mysql 4.1.1 alpha

A second limit argument to LIMIT of -1 is invalid in MySQL sytax. At least, the MySQL doco make no mention of the validity of using -1, so it's an 'undocumented feature' that seems to have been removed from v4.1.

I made this quick and filthy hack to .../tiki/lib/tikidblib.php that does the trick for now... I replaced the lines

if ($numrows -1 && $offset -1)
$result = $this->db->Execute($query, $values);
else
$result = $this->db->SelectLimit($query, $numrows, $offset, $values);

with

if ($numrows -1 && $offset -1)
$result = $this->db->Execute($query, $values);
else
{
if( $numrows == -1 )
$numrows = 999999999;
$result = $this->db->SelectLimit($query, $numrows, $offset, $values);
}

Note that this occurs twice in the file. 999999999 is just an arbitrarily large number. The hack has worked fine so far, and I've been playing around quite a bit, so I guess I'll be OK until I try to select more than 999999999 rows from a table. I'm also using PHP5, so I had to upgrade ADODB to the newest version to support PHP5's rewritten OO support.

I




posts: 2 Australia

Bad form, replying to my own post and all, but the code fragments in my last post were enclosed in PRE tags, which displayed correctly in the preview, but seem to have been stripped out when I actually posted. I'd call that a bug?

I.


posts: 1 Russia

> Chealer9:
> Hi philtre, MySQL 4.1 is not supported by Tiki.

And how to work with UTF-8 without MySQL 4.1??
(I have some problem with Tiki)

posts: 2 Australia

> There's something wrong in the LIMIT clause in the query, i think it goes > LIMIT 0,-1

> Doeas anbody know why this happens?
> I'm running apache 2.0.48, php5 RC1 (i also tried 4.3 with same results), > mysql 4.1.1 alpha

A second limit argument to LIMIT of -1 is invalid in MySQL sytax. At least, the MySQL doco make no mention of the validity of using -1, so it's an 'undocumented feature' that seems to have been removed from v4.1.

I made this quick and filthy hack to .../tiki/lib/tikidblib.php that does the trick for now... I replaced the lines

if ($numrows -1 && $offset -1)
$result = $this->db->Execute($query, $values);
else
$result = $this->db->SelectLimit($query, $numrows, $offset, $values);

with

if ($numrows -1 && $offset -1)
$result = $this->db->Execute($query, $values);
else
{
if( $numrows == -1 )
$numrows = 999999999;
$result = $this->db->SelectLimit($query, $numrows, $offset, $values);
}

Note that this occurs twice in the file. 999999999 is just an arbitrarily large number. The hack has worked fine so far, and I've been playing around quite a bit, so I guess I'll be OK until I try to select more than 999999999 rows from a table. I'm also using PHP5, so I had to upgrade ADODB to the newest version to support PHP5's rewritten OO support.

I




posts: 2 Australia

Bad form, replying to my own post and all, but the code fragments in my last post were enclosed in PRE tags, which displayed correctly in the preview, but seem to have been stripped out when I actually posted. I'd call that a bug?

I.


posts: 2881 United Kingdom

Well:

MySQL 4.1 is not support nor do we test with PHP5

So sorry, no help here.

Damian

posts: 1 Germany

> Damian:
> Well:
>
> MySQL 4.1 is not support nor do we test with PHP5
>
> So sorry, no help here.
>
> Damian
>

Hello,

same happens with MySQL 5.0.0. For instance, the calendar module dies while executing the query

select * from tiki_calendars order by created desc limit 0,-1

It seems that the "-1" argument for the LIMIT-statement is the problem here. According to the SELECT-syntax in the MySQL Manual, "-1" isn't a valid LIMIT argument.
Could you please have a look into this?

Best regards
Crash


posts: 1 Germany

> Damian:
> Well:
>
> MySQL 4.1 is not support nor do we test with PHP5
>
> So sorry, no help here.
>
> Damian
>

Hello,

same happens with MySQL 5.0.0. For instance, the calendar module dies while executing the query

select * from tiki_calendars order by created desc limit 0,-1

It seems that the "-1" argument for the LIMIT-statement is the problem here. According to the SELECT-syntax in the MySQL Manual, "-1" isn't a valid LIMIT argument.
Could you please have a look into this?

Best regards
Crash


posts: 1001 Canada
From what I heard, this -1 not being allowed is new after 4.0 (I don't know why that changed), so yes, it doesn't work, nothing was done in Tiki to support 4.1+ and nothing is planned yet.

posts: 1001 Canada
Oh, I remember seeing two patches at sourceforge about that, though.

Upcoming Events

1)  18 Apr 2024 14:00 GMT-0000
Tiki Roundtable Meeting
2)  16 May 2024 14:00 GMT-0000
Tiki Roundtable Meeting
3)  20 Jun 2024 14:00 GMT-0000
Tiki Roundtable Meeting
4)  18 Jul 2024 14:00 GMT-0000
Tiki Roundtable Meeting
5)  15 Aug 2024 14:00 GMT-0000
Tiki Roundtable Meeting
6)  19 Sep 2024 14:00 GMT-0000
Tiki Roundtable Meeting
7) 
Tiki birthday
8)  17 Oct 2024 14:00 GMT-0000
Tiki Roundtable Meeting
9)  21 Nov 2024 14:00 GMT-0000
Tiki Roundtable Meeting
10)  19 Dec 2024 14:00 GMT-0000
Tiki Roundtable Meeting