data not writing to native LUA

A shopping addon for Roster

Moderator: Hannah

data not writing to native LUA

Postby Jorich » Tue Sep 19, 2006 10:50 pm

When checking out, everything goes fine, but upon inspection of the new data that should be in shopping_list.lua there is nothing there except
Code: Select all
shoppinglist = {
}

If I change to $useUU = 0 in conf.php, then the data is in the shopping_list.lua inside the zip file.

Any help would be accepted.
Thanks
Jorich
WR.net Apprentice
WR.net Apprentice
 
Posts: 15
Joined: Wed Aug 30, 2006 8:37 pm

data not writing to native LUA

Postby Hannah » Sat Sep 23, 2006 12:43 pm

This behaviour is right...

shopping_list.lua file is only used if you set $useUU to 0.

If it´s set to 1 you have to set the parameters in Uniuploader to
to see orders ingame.

Shopping makes direct database connection and collects all the orders
and send it to wow... (if useUU is set to 1)

See the instruction/installation note for details

CU

Hannah
User avatar
Hannah
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 142
Joined: Tue Jul 04, 2006 1:41 pm
Location: Germany, Cologne

Re: data not writing to native LUA

Postby Jorich » Sat Sep 23, 2006 1:08 pm

I don't think you got my point. Let me try again :)

When $useUU = 1, I make an order from the Roster and check out, there is nothing in the Shopping_list.lua in the /saved/ folder or anything stored in the database.
If I set $useUU = 0, and make an order from the Roster and check out, I save the .zip file and look at the data. It does have the order info in it, but still nothing in the database.
I don't want to use manual download. I have UU setup correctly and have read everything here AND the manual/instructions MANY times.

Edit: I found that at the end of phpCart_manage.php if I comment out
Code: Select all
    else{
   insertOrder();
   $_SESSION["order_state"] = "outbox";
   unset($_SESSION["cart"]);
   unset($_SESSION["itemcount"]);
   header ("location:".$_SERVER['HTTP_REFERER']);
   
    }

to be like
Code: Select all
    else{
   insertOrder();
   $_SESSION["order_state"] = "outbox";
   //unset($_SESSION["cart"]);
   unset($_SESSION["itemcount"]);
   header ("location:".$_SERVER['HTTP_REFERER']);
   
    }

then the data is written to the Shopping_list.lua, but my problem still remains. UU is not seeing the ordered data. Could this be because the data is not being stored in the database?
Last edited by Jorich on Sat Sep 23, 2006 1:19 pm, edited 3 times in total.
Jorich
WR.net Apprentice
WR.net Apprentice
 
Posts: 15
Joined: Wed Aug 30, 2006 8:37 pm

data not writing to native LUA

Postby Hannah » Sat Sep 23, 2006 5:13 pm

Yes, there seams to be something wrong with you settings in
functions_cart.php

At top of this file there is the DB-Variables set(pass,db,user...)

Maybe there is an error ?

CU

Hannah
User avatar
Hannah
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 142
Joined: Tue Jul 04, 2006 1:41 pm
Location: Germany, Cologne

data not writing to native LUA

Postby Jorich » Sat Sep 23, 2006 11:30 pm

Nope. Everything is correct that I entered at the top of functions_cart.php.
Any other ideas?

Edit: These are the errors that are in the Apache error log that happen when I start from the beginning and make a complete order of Dragonbreath Chili
Code: Select all
[Sat Sep 23 14:20:37 2006] [error] [client xxx.xxx.xxx.xxx] PHP Warning:  Unknown: 5 result set(s) not freed. Use mysql_free_result to free result sets which were requested using mysql_query() in Unknown on line 0, referer: http://xxx.xxx.xxx/roster/addon.php?roster_addon_name=shopping
[Sat Sep 23 14:20:41 2006] [error] [client xxx.xxx.xxx.xxx] PHP Warning:  Unknown: 1 result set(s) not freed. Use mysql_free_result to free result sets which were requested using mysql_query() in Unknown on line 0, referer: http://xxx.xxx.xxx/roster/addon.php?roster_addon_name=shopping&proffilter=Cooking&filterbox=dragon
[Sat Sep 23 14:21:18 2006] [error] [client xxx.xxx.xxx.xxx] PHP Notice:  Use of undefined constant s_id - assumed 's_id' in x:\\xxx\\roster\\addons\\shopping\\phpCart_manage.php on line 7, referer: http://xxx.xxx.xxx/roster/addon.php?roster_addon_name=shopping&proffilter=Cooking&filterbox=dragon
[Sat Sep 23 14:21:18 2006] [error] [client xxx.xxx.xxx.xxx] PHP Notice:  A session had already been started - ignoring session_start() in x:\\xxx\\roster\\addons\\shopping\\functions_cart.php on line 9, referer: http://xxx.xxx.xxx/roster/addon.php?roster_addon_name=shopping&proffilter=Cooking&filterbox=dragon
[Sat Sep 23 14:21:18 2006] [error] [client xxx.xxx.xxx.xxx] PHP Notice:  Use of undefined constant s_id - assumed 's_id' in x:\\xxx\\roster\\addons\\shopping\\functions_cart.php on line 10, referer: http://xxx.xxx.xxx/roster/addon.php?roster_addon_name=shopping&proffilter=Cooking&filterbox=dragon
[Sat Sep 23 14:21:22 2006] [error] [client xxx.xxx.xxx.xxx] PHP Warning:  Unknown: 5 result set(s) not freed. Use mysql_free_result to free result sets which were requested using mysql_query() in Unknown on line 0, referer: http://xxx.xxx.xxx/roster/addon.php?roster_addon_name=shopping&proffilter=Cooking&filterbox=dragon
[Sat Sep 23 14:21:23 2006] [error] [client xxx.xxx.xxx.xxx] PHP Warning:  Unknown: 1 result set(s) not freed. Use mysql_free_result to free result sets which were requested using mysql_query() in Unknown on line 0, referer: http://xxx.xxx.xxx/roster/addon.php?roster_addon_name=shopping&proffilter=Cooking&filterbox=dragon
[Sat Sep 23 14:24:32 2006] [error] [client xxx.xxx.xxx.xxx] PHP Notice:  Use of undefined constant s_id - assumed 's_id' in x:\\xxx\\roster\\addons\\shopping\\phpCart_basket.php on line 9, referer: http://xxx.xxx.xxx/roster/addon.php?roster_addon_name=shopping&proffilter=Cooking&filterbox=dragon
[Sat Sep 23 14:24:36 2006] [error] [client xxx.xxx.xxx.xxx] PHP Warning:  Unknown: 1 result set(s) not freed. Use mysql_free_result to free result sets which were requested using mysql_query() in Unknown on line 0, referer: http://xxx.xxx.xxx/roster/addon.php?roster_addon_name=shopping&proffilter=Cooking&filterbox=dragon
[Sat Sep 23 14:24:36 2006] [error] [client xxx.xxx.xxx.xxx] File does not exist: x:/xxx/roster/addons/shopping/css, referer: http://xxx.xxx.xxx/roster/addons/shopping/phpCart_basket.php
[Sat Sep 23 14:24:45 2006] [error] [client xxx.xxx.xxx.xxx] PHP Notice:  Use of undefined constant s_id - assumed 's_id' in x:\\xxx\\roster\\addons\\shopping\\phpCart_manage.php on line 7, referer: http://xxx.xxx.xxx/roster/addons/shopping/phpCart_basket.php
[Sat Sep 23 14:24:45 2006] [error] [client xxx.xxx.xxx.xxx] PHP Notice:  A session had already been started - ignoring session_start() in x:\\xxx\\roster\\addons\\shopping\\functions_cart.php on line 9, referer: http://xxx.xxx.xxx/roster/addons/shopping/phpCart_basket.php
[Sat Sep 23 14:24:45 2006] [error] [client xxx.xxx.xxx.xxx] PHP Notice:  Use of undefined constant s_id - assumed 's_id' in x:\\xxx\\roster\\addons\\shopping\\functions_cart.php on line 10, referer: http://xxx.xxx.xxx/roster/addons/shopping/phpCart_basket.php
[Sat Sep 23 14:24:45 2006] [error] [client xxx.xxx.xxx.xxx] PHP Notice:  Use of undefined constant s_id - assumed 's_id' in x:\\xxx\\roster\\addons\\shopping\\phpCart_basket.php on line 9, referer: http://xxx.xxx.xxx/roster/addons/shopping/phpCart_basket.php
[Sat Sep 23 14:24:45 2006] [error] [client xxx.xxx.xxx.xxx] PHP Warning:  Unknown: 1 result set(s) not freed. Use mysql_free_result to free result sets which were requested using mysql_query() in Unknown on line 0, referer: http://xxx.xxx.xxx/roster/addons/shopping/phpCart_basket.php
[Sat Sep 23 14:24:45 2006] [error] [client xxx.xxx.xxx.xxx] File does not exist: x:/xxx/roster/addons/shopping/css, referer: http://xxx.xxx.xxx/roster/addons/shopping/phpCart_basket.php
[Sat Sep 23 14:24:49 2006] [error] [client xxx.xxx.xxx.xxx] PHP Notice:  Use of undefined constant s_id - assumed 's_id' in x:\\xxx\\roster\\addons\\shopping\\phpCart_manage.php on line 7, referer: http://xxx.xxx.xxx/roster/addons/shopping/phpCart_basket.php
[Sat Sep 23 14:24:49 2006] [error] [client xxx.xxx.xxx.xxx] PHP Notice:  A session had already been started - ignoring session_start() in x:\\xxx\\roster\\addons\\shopping\\functions_cart.php on line 9, referer: http://xxx.xxx.xxx/roster/addons/shopping/phpCart_basket.php
[Sat Sep 23 14:24:49 2006] [error] [client xxx.xxx.xxx.xxx] PHP Notice:  Use of undefined constant s_id - assumed 's_id' in x:\\xxx\\roster\\addons\\shopping\\functions_cart.php on line 10, referer: http://xxx.xxx.xxx/roster/addons/shopping/phpCart_basket.php
[Sat Sep 23 14:24:50 2006] [error] [client xxx.xxx.xxx.xxx] PHP Notice:  Use of undefined constant s_id - assumed 's_id' in x:\\xxx\\roster\\addons\\shopping\\phpCart_basket.php on line 9, referer: http://xxx.xxx.xxx/roster/addons/shopping/phpCart_basket.php
[Sat Sep 23 14:24:51 2006] [error] [client xxx.xxx.xxx.xxx] PHP Warning:  Unknown: 1 result set(s) not freed. Use mysql_free_result to free result sets which were requested using mysql_query() in Unknown on line 0, referer: http://xxx.xxx.xxx/roster/addons/shopping/phpCart_basket.php
[Sat Sep 23 14:24:51 2006] [error] [client xxx.xxx.xxx.xxx] File does not exist: x:/xxx/roster/addons/shopping/css, referer: http://xxx.xxx.xxx/roster/addons/shopping/phpCart_basket.php
[Sat Sep 23 14:24:53 2006] [error] [client xxx.xxx.xxx.xxx] PHP Notice:  Use of undefined constant s_id - assumed 's_id' in x:\\xxx\\roster\\addons\\shopping\\phpCart_manage.php on line 7, referer: http://xxx.xxx.xxx/roster/addons/shopping/phpCart_basket.php
[Sat Sep 23 14:24:53 2006] [error] [client xxx.xxx.xxx.xxx] PHP Notice:  A session had already been started - ignoring session_start() in x:\\xxx\\roster\\addons\\shopping\\functions_cart.php on line 9, referer: http://xxx.xxx.xxx/roster/addons/shopping/phpCart_basket.php
[Sat Sep 23 14:24:53 2006] [error] [client xxx.xxx.xxx.xxx] PHP Notice:  Use of undefined constant s_id - assumed 's_id' in x:\\xxx\\roster\\addons\\shopping\\functions_cart.php on line 10, referer: http://xxx.xxx.xxx/roster/addons/shopping/phpCart_basket.php
[Sat Sep 23 14:24:54 2006] [error] [client xxx.xxx.xxx.xxx] PHP Warning:  mysql_query() [<a href='http://www.mysql.com/doc'>http://www.mysql.com/doc</a>]: Out of range value adjusted for column 'order_number' at row 1 in x:\\xxx\\roster\\addons\\shopping\\functions_cart.php on line 262, referer: http://xxx.xxx.xxx/roster/addons/shopping/phpCart_basket.php
[Sat Sep 23 14:24:54 2006] [error] [client xxx.xxx.xxx.xxx] PHP Notice:  Use of undefined constant s_id - assumed 's_id' in x:\\xxx\\roster\\addons\\shopping\\phpCart_basket.php on line 9, referer: http://xxx.xxx.xxx/roster/addons/shopping/phpCart_basket.php
[Sat Sep 23 14:24:55 2006] [error] [client xxx.xxx.xxx.xxx] File does not exist: x:/xxx/roster/addons/shopping/css, referer: http://xxx.xxx.xxx/roster/addons/shopping/phpCart_basket.php
Last edited by Jorich on Sat Sep 23, 2006 11:45 pm, edited 1 time in total.
Jorich
WR.net Apprentice
WR.net Apprentice
 
Posts: 15
Joined: Wed Aug 30, 2006 8:37 pm

data not writing to native LUA

Postby Hannah » Sun Sep 24, 2006 10:59 pm

Hi Jorich!

Sry for the late answer...

Need to do some debuging:
Open functions_cart.php and find line 267:
Code: Select all

mysql_query
("INSERT INTO `".$table_prefix."addon_shopping` (`order_number`, `order_item`, `order_quantity`......................


Add the following line before it:
Code: Select all

$_SESSION
["test"] = "<br>INSERT INTO `".$table_prefix."addon_shopping` (`order_number`, `order_item`, `order_quantity`,
            `order_maker`, `order_requester`, `order_maxprice`, `order_note`,
            `order_price_demand`, `order_date`, `order_state`, `order_info`)
            VALUES ('','"
.$_SESSION["cart"][$i][0]."','".$_SESSION["cart"][$i][1]."','".$_SESSION["cart"][$i][3]."','".$_SESSION["sendto"]."',
            '0', '', '', NOW(), 'outbox', '');<br>"
;
 


In phpCart_basket.php find last line:

Code: Select all

ob_end_flush
();
 


Befor this line add this:
Code: Select all
if (isset($_SESSION["order_state"]) && $_SESSION["order_state"] == "outbox" && isset($_SESSION["test"])){
    echo 
"<br>".$_SESSION["test"]."</br>";
    }
 


Now place an order (just one item) and push the order button.

You´ll see the sql-string at the bottom of the order form...

Plz post this string here....
User avatar
Hannah
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 142
Joined: Tue Jul 04, 2006 1:41 pm
Location: Germany, Cologne

data not writing to native LUA

Postby Jorich » Mon Sep 25, 2006 4:21 am

Ok. Here's the string:

Code: Select all
INSERT INTO `roster_addon_shopping` (`order_number`, `order_item`, `order_quantity`, `order_maker`, `order_requester`, `order_maxprice`, `order_note`, `order_price_demand`, `order_date`, `order_state`, `order_info`) VALUES ('','Dragonbreath Chili','1','Whisperz','Jorich', '0', '', '', NOW(), 'outbox', '');


Thanks so much for the help so far.
Jorich
WR.net Apprentice
WR.net Apprentice
 
Posts: 15
Joined: Wed Aug 30, 2006 8:37 pm

data not writing to native LUA

Postby Hannah » Mon Sep 25, 2006 10:22 am

Hm, the sql-string is ok.
And there is no data in db table roster_addon_shopping ?
User avatar
Hannah
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 142
Joined: Tue Jul 04, 2006 1:41 pm
Location: Germany, Cologne

Re: data not writing to native LUA

Postby Jorich » Mon Sep 25, 2006 10:54 pm

Nope. There is no data in the database table at any point during the ordering process.
Attachments
dbshopping1.jpg
dbshopping1.jpg (81.78 KiB) Viewed 2074 times
Last edited by Jorich on Tue Sep 26, 2006 10:17 pm, edited 1 time in total.
Jorich
WR.net Apprentice
WR.net Apprentice
 
Posts: 15
Joined: Wed Aug 30, 2006 8:37 pm

data not writing to native LUA

Postby Hannah » Tue Sep 26, 2006 12:43 am

That´s interesting :)

I´ll check some other stuff tomorow. I integrate some error
handling for the mysql part to see if there is something
wrong in there (for me this could be the only reason for the missing
db-data)
User avatar
Hannah
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 142
Joined: Tue Jul 04, 2006 1:41 pm
Location: Germany, Cologne

data not writing to native LUA

Postby Hannah » Tue Sep 26, 2006 12:44 am

Wait, one thing ;)

Are you running this under phpbb ?
User avatar
Hannah
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 142
Joined: Tue Jul 04, 2006 1:41 pm
Location: Germany, Cologne

data not writing to native LUA

Postby Jorich » Tue Sep 26, 2006 10:12 pm

Well, I'm not sure what you mean by "running it under phpBB", but I am running phpBB.
I haven't made any kind of changes or mods for integrating the roster and phpBB, however.
Is this a problem. If so, what would be better system to use?
Jorich
WR.net Apprentice
WR.net Apprentice
 
Posts: 15
Joined: Wed Aug 30, 2006 8:37 pm

data not writing to native LUA

Postby Hannah » Wed Sep 27, 2006 1:25 am

This could cause the problem. Sometime ago there was a guy with some
differnt problem running phpbb.

Do your members have to login to access roster ?
User avatar
Hannah
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 142
Joined: Tue Jul 04, 2006 1:41 pm
Location: Germany, Cologne

data not writing to native LUA

Postby Jorich » Wed Sep 27, 2006 1:46 pm

Nope. No kind of member login is setup here.
Also, I haven't made any changes to any of the Roster files, except for:

the different update.php for RaidTracker/EventCalendar (shouldn't be the problem as I was having this same problem before I used this version)
and the files that you had me change for debugging.

If you want to check out our roster, go to:
http://osin.hopto.org/roster
Jorich
WR.net Apprentice
WR.net Apprentice
 
Posts: 15
Joined: Wed Aug 30, 2006 8:37 pm

data not writing to native LUA

Postby Hannah » Sat Sep 30, 2006 11:49 am

I´ll have a look at it but i´m away for three days, so after that i´ll look at it...
User avatar
Hannah
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 142
Joined: Tue Jul 04, 2006 1:41 pm
Location: Germany, Cologne

Next

Return to Shopping

Who is online

Users browsing this forum: No registered users and 1 guest

cron