This topic is locked

Webreports table structure

11/18/2008 2:09:00 PM
PHPRunner General questions
S
saflowers author

I have installed the webreports folder as directed. I now see and am able to check the option for "Web Reports" under the Miscellaneous tab. Upon navigating from this page I immediately get an error message: "Error creating table - failed to create webreports table. You have an error in your SQL syntax near 'ENGINE = MyISAM' at line 1"
I am developing this application on an older test server that has MySQL version 3.23.58. I believe the problem is that this version does not recognize this statement. I would like to get the SQL that creates the table, and any other tables required by this product, so that I may generate it/them on my own.
Thanks.

Sergey Kornilov admin 11/18/2008
CREATE TABLE `webreports` ( `rpt_id` INT NOT NULL AUTO_INCREMENT , `rpt_name` VARCHAR(45) NOT NULL , `rpt_title` TEXT NULL , `rpt_cdate` DATETIME NOT NULL, `rpt_mdate` DATETIME NULL, `rpt_content` LONGTEXT NOT NULL , `rpt_owner` VARCHAR(100) NOT NULL , `rpt_status` ENUM""public","private") NOT NULL DEFAULT "public", `rpt_type` ENUM("report","chart") NOT NULL, PRIMARY KEY (`rpt_id`)) ENGINE = MyISAM;


I guess you can safely remove ENGINE = MyISAM at the end of the statement.

S
saflowers author 11/19/2008

Thanks Sergey, that allowed me to continue without error and access the web reporting tool. Note: the supplied field definition: `rpt_status` ENUM""public","private") NOT NULL DEFAULT "public" - should read: `rpt_status` ENUM ("public","private") NOT NULL DEFAULT "public"
I don't know if this related, however as I create reports and charts the rpt_name, rpt_title and rpt_status fields are not populated. I must manually go into the database and enter values into these fields in order for them to appear and run within the reporting tool.

Sergey Kornilov admin 11/19/2008

I'm afraid this also has something to do with MySQL version.

I'd upgrade to MySQL 5 or, at least, test it on server with newer MySQL.

T
taumic 11/19/2008

Thanks Sergey, that allowed me to continue without error and access the web reporting tool. Note: the supplied field definition: `rpt_status` ENUM""public","private") NOT NULL DEFAULT "public" - should read: `rpt_status` ENUM ("public","private") NOT NULL DEFAULT "public"

I don't know if this related, however as I create reports and charts the rpt_name, rpt_title and rpt_status fields are not populated. I must manually go into the database and enter values into these fields in order for them to appear and run within the reporting tool.


Hallo Steve,
I hope, that I can help you, try this:

have a look in your php.ini. The tag "magic_quotes_gpc" must be OFF
==> magic_quotes_gpc = Off
Don`t forget to restart PHP.
Mike

S
saflowers author 11/21/2008

Thanks Mike.
I do have magic_quotes "on"; on both my production and testing servers. I will change it to "off" and will have to review my other scripts to see the impact.