Page 1 of 1

problem wiht sql and quiz packs

Posted: Sun Jul 16, 2006 10:34 am
by nuzzosono
I have installed quiz mod 1.3.1 in my phpbb forum vers. 2.0.21.

I have an error in the sql process (when i run quiz_install.php)

it can't create a table, the line is this:

CREATE TABLE phpbb_quiz_statistics ( `stats_id` int(5) NOT NULL default '', `quiz_id` int(10) NOT NULL default '', `user_id` int(10) NOT NULL default '', `stats_correct` INT(5) NOT NULL default '0', `stats_incorrect` INT(5) NOT NULL default '0', `stats_percentage` INT(3) NOT NULL default '0');

another problem is that i can't see the quiz pack section in my quiz control pannel the only sections that I see are Quiz permission, quiz configuration and quiz categories.

p.s. I used easymod to install the mod.

thanks in advance for any sugsestion.

Posted: Sun Jul 16, 2006 11:19 am
by nuzzosono
Easymod didn't uploaded some files so now the Quiz Packs menu exist.

I still have SQL problem with the statistic table:

DEBUG MODE

SQL Error : 1146 Table 'Sql101055_1.phpbb_quiz_statistics' doesn't exist

SELECT stats_id FROM phpbb_quiz_statistics ORDER BY stats_id DESC LIMIT 1

and now I have a new error when I try to load a quiz pack:

Warning: file_get_contents(http://www.nuzzosono.com/forum/admin/qu ... stralia.qp): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in D:\Inetpub\webs\nuzzosonocom\forum\admin\admin_quiz_packs.php on line 157

Posted: Sun Jul 16, 2006 11:30 am
by battye
Are you using MySQL?

Posted: Sun Jul 16, 2006 11:37 am
by nuzzosono
yes, but I haven't tryed yet execute the command via mysql admin pannel (I have to retrieve my user/pass)

I only tryed to run quiz_install.php, install button the result is, everything done but the line:

CREATE TABLE phpbb_quiz_statistics ( `stats_id` int(5) NOT NULL default '', `quiz_id` int(10) NOT NULL default '', `user_id` int(10) NOT NULL default '', `stats_correct` INT(5) NOT NULL default '0', `stats_incorrect` INT(5) NOT NULL default '0', `stats_percentage` INT(3) NOT NULL default '0');

regarding my problem with quiz packs, do you think I need to change the permission of some folders to make it work (it seems that from the php code the pack file is not found)

Warning: file_get_contents(http://www.nuzzosono.com/forum/admin/qu ... stralia.qp): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in D:\Inetpub\webs\nuzzosonocom\forum\admin\admin_quiz_packs.php on line 97

Warning: file_get_contents(http://www.nuzzosono.com/forum/admin/qu ... stralia.qp): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in D:\Inetpub\webs\nuzzosonocom\forum\admin\admin_quiz_packs.php on line 157

thanks in advance

Posted: Sun Jul 16, 2006 11:45 am
by battye
It looks like QP_Cities_of_Australia.qp hasn't been uploaded.

Going to http://www.nuzzosono.com/forum/admin/qu ... stralia.qp shows page cannot be found.

Posted: Sun Jul 16, 2006 12:48 pm
by nuzzosono
the file is uploaded (I can see it in my ftp client).

watch this screenshot:

Image

the file is in the pack list, but it seems that it can't be opened.

Posted: Sun Jul 16, 2006 1:11 pm
by nuzzosono
I think there is something wrong with my hosting (windows).

It seems that some file extension are not propely managed.

If I change the extension from .qp to .txt, I can rech the file by it's address.

Have you heard something like that before?

Posted: Sun Jul 16, 2006 2:07 pm
by battye
It could well be a Windows problem, because qp is just an extension I made up (Quiz Packs = qp) and only tested on Windows.

Does it work okay in the ACP as well if you use txt?

Posted: Sun Jul 16, 2006 5:06 pm
by nuzzosono
ok, I modified admin_quiz_packs.php so it look for .txt files, it works.

now I have to create the sql table missed with quiz_install.php

the error i get is this:

DEBUG MODE

SQL Error : 1146 Table 'Sql101055_1.phpbb_quiz_statistics' doesn't exist

SELECT stats_id FROM phpbb_quiz_statistics ORDER BY stats_id DESC LIMIT 1

Line : 31
File : functions_quiz.php

there is another way to generate the table?

Posted: Sun Jul 16, 2006 5:51 pm
by nuzzosono
I submited the query sql via sql control panel this is the error:

query SQL:

CREATE TABLE phpbb_quiz_statistics(
`stats_id` int( 5 ) NOT NULL default '',
`quiz_id` int( 10 ) NOT NULL default '',
`user_id` int( 10 ) NOT NULL default '',
`stats_correct` INT( 5 ) NOT NULL default '0',
`stats_incorrect` INT( 5 ) NOT NULL default '0',
`stats_percentage` INT( 3 ) NOT NULL default '0'
)

Message of MySQL:

#1067 - Invalid default value for 'stats_id'

Posted: Mon Jul 17, 2006 1:05 pm
by nuzzosono
the correct value for my database is 'o' now it works fine.