1
pr_shadoko
Re: module update problem with mysql script : sql instructions not applied
  • 2006/4/12 17:41

  • pr_shadoko

  • Just popping in

  • Posts: 3

  • Since: 2006/4/10


first of all, thx for the replies and the link for the update script. I'm very glad to read you Eric (I've seen your name so many times reading the Xhelp sources) ^^;

I dont know if this forum is the place to talk about Xhelp specific features but I must admit that i'm noob in XOOPS (tough it really deserve I spend more time on it) and not so good at programming, so my module will be quite poor (e.g : not graphical reports in the next release).
Is there a forum where we can talk about this stuff ?

I'm going to try cvs as soon as I find how to get it ^^

Thx again !



2
pr_shadoko
Re: module update problem with mysql script : sql instructions not applied
  • 2006/4/10 11:23

  • pr_shadoko

  • Just popping in

  • Posts: 3

  • Since: 2006/4/10


Fixed :

For an unknown reason (I dont know if it's a bug or a kind of function), it seems that sql scripts are executed only during uninstall/install process, not during an update. I've uninstalled my module, it warned me that some tables couldn't be found, then reinstall and this time it created the tables.

thx.



3
pr_shadoko
module update problem with mysql script : sql instructions not applied
  • 2006/4/10 9:53

  • pr_shadoko

  • Just popping in

  • Posts: 3

  • Since: 2006/4/10


Hi,

I'm trying to create my own module. Basicaly, it should work only with Xhelp and provide statistics and reports about ticketing. I'm at an early stage of developpement. I'm now trying to add a MySQL script to be runned during the installation / update of this module.
I followed the docs i've found, added lines in the xoops_version file like this :
// Sql file (must contain sql generated by phpMyAdmin or phpPgAdmin)
// All tables should not have any prefix!
$modversion['sqlfile']['mysql'] = "sql/mysql.sql";
// Tables created by sql file (without prefix!)
$modversion['tables'][0] = "xhs_lur";
$modversion['tables'][1] = "xhs_reports";

I've the mysql.sql script in the right path, with the right perms (apache:apache 755).

When I launched the update process in the "Modules/Administration" page, I clique again in the following confirmation page, everything works fine, except the MySQL instructions seems to be bypassed. and no tables are created.

I've even tried to delete the file mysql.sql, but it chenge nothing, as if the sql part of xoops_version.php were useless.
when I try to run script directly in phpmyadmin, it's ok. The tables are created so i dont think it's a MySQL syntax problem.
I guess I skipped 1 step in the procedure, but I can't get it !
Here's my conf (thanks modinfo):
XOOPS Version:
XOOPS 2.2.3 Final
XOOPS Theme:
default
XOOPS Template Set:
default
PHP Version:
5.0.4
MySQL Version:
4.1.14
Server Software:
Apache/2.0.54 (Fedora)
User's Browser:
Mozilla/5.0 (Windows; U; Windows NT 5.0; fr; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1

When I enable debug console for MySQL and php, I got nothing , no errors. The only thing I got with the debug enable are warnings about others modules ("Warning [PHP]: xoops_load_lang_file").

That's it. If anyone can enlight me, it would make me happy in this rainny day...
thx




TopTop



Login

Who's Online

202 user(s) are online (139 user(s) are browsing Support Forums)


Members: 0


Guests: 202


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits