FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » Bug Reports » Bugs in 1.1.9-dev (from CVS @ 8:30am Feb 12)
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Bugs in 1.1.9-dev (from CVS @ 8:30am Feb 12) [message #427] Tue, 12 February 2002 15:34 Go to next message
ironstorm is currently offline  ironstorm   Canada
Messages: 89
Registered: February 2002
Location: Toronto, Ontario, Canada
Karma: 0
Member

this error when I omitted my birthday data...
my SQL tool told me that bday cannot be NULL, when I tried to manually do the insert.

When I replaced my NULL bday with 1, it committed.

Quote:

Query Failed: INSERT INTO fud_users ( login, passwd, name, email, display_email, notify, notify_method, ignore_admin, private_messages, gender, icq, aim, yahoo, msnm, append_sig, posts_ppg, time_zone, bday, invisible_mode, last_visit, conf_key, user_image, join_date, location, avatar, style, coppa, occupation, interests, referer_id, show_sigs, last_read, avatar_loc, avatar_approved, sig, show_tool_tips, default_view ) VALUES ( 'Garth', 'ce81c61e53db9cbaf7cc3ceee60dcfea', 'Garth', 'Garth(at)email(dot)com', 'Y', 'N', 'EMAIL', 'N', 'Y', '', NULL, NULL, NULL, NULL, 'Y', '0', 'America/Montreal', NULL, 'N', 1013526931, 'b5b4970762fcfc632b0f6c726db5d8b9', NULL, 1013526931, '', 0, 1, 'N', NULL, NULL, 1, 'Y', 1013526931, NULL, 'NO', NULL, 'N', 'msg' )
Reason:
From: f:/php4/!forums/htdocs/register.php


Update: No matter if I put my birthday stuff in or not the SQL gets a NULL for bday and crashes out...

[Updated on: Tue, 12 February 2002 16:10]

Report message to a moderator

Bugs in 1.1.9-dev (from CVS @ 8:30am Feb 12) #2 [message #428 is a reply to message #427] Tue, 12 February 2002 16:07 Go to previous messageGo to next message
ironstorm is currently offline  ironstorm   Canada
Messages: 89
Registered: February 2002
Location: Toronto, Ontario, Canada
Karma: 0
Member

On forums with anonymous posting turned off I get this error when I try to create a thread.

Quote:

Query Failed: UPDATE fud_ses SET sys_id='0', time_sec=1013529183, data='00000004 err_id0000003243233a856b9423e1963d6c40de684d12 er_msg00000284Annonymous users aren't allowed to reply<br><br>If you would like to register go to the <a href="register.php?S=7b77c4dfeeac9501690d6745 97bb6aa5">registration form</a><br>If you would like to login please go to the <a href="login.php?S=7b77c4dfeeac9501690d674597b b6aa5">login form</a> err_t00000031ERROR: Insufficient Priviledges ret_to00000072dGhyZWFkLnBocD9mcm1faWQ9MiZTPTdiNzdj NGRmZWVhYzk1MDE2OTBkNjc0NTk3YmI2YWE1' WHERE id=11
Reason: You have an error in your SQL syntax near 't allowed to reply

If you would like to register go to the <a href="regis' at line 1
From: f:/php4/!forums/htdocs/post.php


Is this page supposed to render a different then it does? It looks like there is some HTML in there.

[Updated on: Tue, 12 February 2002 16:11]

Report message to a moderator

Bugs in 1.1.9-dev (from CVS @ 8:30am Feb 12) #3 [message #429 is a reply to message #428] Tue, 12 February 2002 16:28 Go to previous messageGo to next message
ironstorm is currently offline  ironstorm   Canada
Messages: 89
Registered: February 2002
Location: Toronto, Ontario, Canada
Karma: 0
Member


Anonymous Uploading fails:

Quote:

Query Failed: INSERT INTO fud_attach ( proto, location, original_name, message_id, owner, private ) VALUES( 'LOCAL', 'none://unset', 'th_9.dat', 13, , 'N' )
Reason: You have an error in your SQL syntax near ' 'N' )' at line 14
From: f:/php4/!forums/htdocs/post.php


The value for the owner field is not set causing the SQL to bomb out.
Bugs in 1.1.9-dev (from CVS @ 8:30am Feb 12) #4 [message #430 is a reply to message #429] Tue, 12 February 2002 16:31 Go to previous messageGo to next message
ironstorm is currently offline  ironstorm   Canada
Messages: 89
Registered: February 2002
Location: Toronto, Ontario, Canada
Karma: 0
Member


Files with no extension can't be uploaded even when '*' is the type of files being accepted.

Quote:

The file you are trying to upload doesn't match the allowed file types.
Allowed File Types: *
Maximum File Size 1024Kb
Maximum Files per Message: 10


This is the message I got from trying to upload th_9 data up to the message board.
Re: Bugs in 1.1.9-dev (from CVS @ 8:30am Feb 12) [message #431 is a reply to message #427] Tue, 12 February 2002 16:33 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
ironstorm wrote on Tue, 12 February 2002 10:34 AM

this error when I omitted my birthday data...
my SQL tool told me that bday cannot be NULL, when I tried to manually do the insert.

When I replaced my NULL bday with 1, it committed.

Quote:

Query Failed: INSERT INTO fud_users ( login, passwd, name, email, display_email, notify, notify_method, ignore_admin, private_messages, gender, icq, aim, yahoo, msnm, append_sig, posts_ppg, time_zone, bday, invisible_mode, last_visit, conf_key, user_image, join_date, location, avatar, style, coppa, occupation, interests, referer_id, show_sigs, last_read, avatar_loc, avatar_approved, sig, show_tool_tips, default_view ) VALUES ( 'Garth', 'ce81c61e53db9cbaf7cc3ceee60dcfea', 'Garth', 'Garth(at)email(dot)com', 'Y', 'N', 'EMAIL', 'N', 'Y', '', NULL, NULL, NULL, NULL, 'Y', '0', 'America/Montreal', NULL, 'N', 1013526931, 'b5b4970762fcfc632b0f6c726db5d8b9', NULL, 1013526931, '', 0, 1, 'N', NULL, NULL, 1, 'Y', 1013526931, NULL, 'NO', NULL, 'N', 'msg' )
Reason:
From: f:/php4/!forums/htdocs/register.php


Update: No matter if I put my birthday stuff in or not the SQL gets a NULL for bday and crashes out...


Bug fixed it latest cvs, (grab forum_install/install_data/sys/include/users_reg.inc)

it should fix the problem.


FUDforum Core Developer
Re: Bugs in 1.1.9-dev (from CVS @ 8:30am Feb 12) [message #432 is a reply to message #429] Tue, 12 February 2002 16:47 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
ironstorm wrote on Tue, 12 February 2002 11:28 AM


Anonymous Uploading fails:

Quote:

Query Failed: INSERT INTO fud_attach ( proto, location, original_name, message_id, owner, private ) VALUES( 'LOCAL', 'none://unset', 'th_9.dat', 13, , 'N' )
Reason: You have an error in your SQL syntax near ' 'N' )' at line 14
From: f:/php4/!forums/htdocs/post.php


The value for the owner field is not set causing the SQL to bomb out.


Fixed in latest CVS (grab forum_install/install_data/sys/include/attach.inc)


FUDforum Core Developer
Bugs in 1.1.9-dev (from CVS @ 8:30am Feb 12) #5 [message #434 is a reply to message #427] Tue, 12 February 2002 16:58 Go to previous messageGo to next message
ironstorm is currently offline  ironstorm   Canada
Messages: 89
Registered: February 2002
Location: Toronto, Ontario, Canada
Karma: 0
Member

Every Message or Edit has the entire of the thread prepended.

When you create thread, each reply in thread prepends all of the body of text from all the previous messages.

The same is true of edits.

Also nested replys aren't displayed at all, unless they are at the end of a thread (in which case they appear as normal replies).

I suspect this is a windows only type problem, problaby something to do with where you store the end of one message
and the start of another (like if it's just counting lines and storing that in a DB and \n needs to be \r\n or something for windows)

Anyway, I'm going to see if I can figure out where I need to look for this this afternoon if I get the chance.
(I'm guessing I need to start with POST.PHP or MSG.PHP)

Attached is a thread of edits and replys... please let me know if there is anything out of the ordinary about it's contents.

  • Attachment: th_9.zip
    (Size: 0.16KB, Downloaded 1028 times)

[Updated on: Tue, 12 February 2002 17:04]

Report message to a moderator

Re: Bugs in 1.1.9-dev (from CVS @ 8:30am Feb 12) [message #435 is a reply to message #428] Tue, 12 February 2002 17:17 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
ironstorm wrote on Tue, 12 February 2002 11:07 AM

On forums with anonymous posting turned off I get this error when I try to create a thread.

Quote:

Query Failed: UPDATE fud_ses SET sys_id='0', time_sec=1013529183, data='00000004 err_id0000003243233a856b9423e1963d6c40de684d12 er_msg00000284Annonymous users aren't allowed to reply<br><br>If you would like to register go to the <a href="register.php?S=7b77c4dfeeac9501690d6745 97bb6aa5">registration form</a><br>If you would like to login please go to the <a href="login.php?S=7b77c4dfeeac9501690d674597b b6aa5">login form</a> err_t00000031ERROR: Insufficient Priviledges ret_to00000072dGhyZWFkLnBocD9mcm1faWQ9MiZTPTdiNzdj NGRmZWVhYzk1MDE2OTBkNjc0NTk3YmI2YWE1' WHERE id=11
Reason: You have an error in your SQL syntax near 't allowed to reply

If you would like to register go to the <a href="regis' at line 1
From: f:/php4/!forums/htdocs/post.php


Is this page supposed to render a different then it does? It looks like there is some HTML in there.



Fixed in latest CVS.

grab( forum_install/install_data/sys/include/error.inc & forum_install/install_data/sys/include/cookies.inc )


FUDforum Core Developer
Re: Bugs in 1.1.9-dev (from CVS @ 8:30am Feb 12) [message #436 is a reply to message #430] Tue, 12 February 2002 17:46 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
ironstorm wrote on Tue, 12 February 2002 11:31 AM


Files with no extension can't be uploaded even when '*' is the type of files being accepted.

Quote:

The file you are trying to upload doesn't match the allowed file types.
Allowed File Types: *
Maximum File Size 1024Kb
Maximum Files per Message: 10


This is the message I got from trying to upload th_9 data up to the message board.


Fixed in latest CVS. This change actually affects a number of files, so you might as well get the entire CVS tree.

P.S. After you do that, if you allow for * files, go into your settings directory and delete everything from the file_filter_regexp file.


FUDforum Core Developer
Re: Bugs in 1.1.9-dev (from CVS @ 8:30am Feb 12) [message #437 is a reply to message #434] Tue, 12 February 2002 17:53 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
ironstorm wrote on Tue, 12 February 2002 11:58 AM

Every Message or Edit has the entire of the thread prepended.

When you create thread, each reply in thread prepends all of the body of text from all the previous messages.

The same is true of edits.

Also nested replys aren't displayed at all, unless they are at the end of a thread (in which case they appear as normal replies).

I suspect this is a windows only type problem, problaby something to do with where you store the end of one message
and the start of another (like if it's just counting lines and storing that in a DB and \n needs to be \r\n or something for windows)

Anyway, I'm going to see if I can figure out where I need to look for this this afternoon if I get the chance.
(I'm guessing I need to start with POST.PHP or MSG.PHP)

Attached is a thread of edits and replys... please let me know if there is anything out of the ordinary about it's contents.




I cannot replicate this bug on Linux, so I am guessing your assumption about this being a windows only bug is correct.
We do not count lines, but rather go by offsets in the file, so \r & \n should have not impact on the reading code.
The 2 files you may want to look at are fileio.inc & msg_edt.inc
they contain all of the code which actually writes/reads messages to/from disk.

Could you pleaserun the following query in MySQL and attach its output to your reply.

SELECT * FROM fud_msg WHERE thread_id=9;


FUDforum Core Developer
Re: Bugs in 1.1.9-dev (from CVS @ 8:30am Feb 12) [message #438 is a reply to message #437] Tue, 12 February 2002 18:49 Go to previous messageGo to next message
ironstorm is currently offline  ironstorm   Canada
Messages: 89
Registered: February 2002
Location: Toronto, Ontario, Canada
Karma: 0
Member

select * from fud_msg where thread_id=9 


This is an HTML table displaying the results, looks like all of the offset values are 0. I also attached the thread data file again, since it has changed with the addition of a couple of nested replies.

<h3>select * from fud_msg where thread_id=9 (5 Records)</h3>

<table border=1>
<tr class="header">
<th>id</th>
<th>thread_id</th>
<th>poster_id</th>
<th>reply_to</th>
<th>ip_addr</th>
<th>host_name</th>
<th>post_stamp</th>
<th>update_stamp</th>
<th>updated_by</th>
<th>icon</th>
<th>style</th>
<th>subject</th>
<th>attach_cnt</th>
<th>poll_id</th>
<th>approved</th>
<th>show_sig</th>
<th>smiley_disabled</th>
<th>offset</th>
<th>length</th>
</tr>
<tr>
<td>11&nbsp;</td>
<td>9&nbsp;</td>
<td>2&nbsp;</td>
<td>0&nbsp;</td>
<td>10.92.14.83&nbsp;</td>
<td>NULL&nbsp;</td>
<td>1013530668&nbsp;</td>
<td>1013530694&nbsp;</td>
<td>2&nbsp;</td>
<td>NULL&nbsp;</td>
<td>TAGS&nbsp;</td>
<td>The body of the previous message or edit is always appended.&nbsp;</td>
<td>0&nbsp;</td>
<td>0&nbsp;</td>
<td>Y&nbsp;</td>
<td>Y&nbsp;</td>
<td>N&nbsp;</td>
<td>0&nbsp;</td>
<td>65&nbsp;</td>
</tr>
<tr>
<td>12&nbsp;</td>
<td>9&nbsp;</td>
<td>2&nbsp;</td>
<td>11&nbsp;</td>
<td>10.92.14.83&nbsp;</td>
<td>NULL&nbsp;</td>
<td>1013530730&nbsp;</td>
<td>0&nbsp;</td>
<td>0&nbsp;</td>
<td>NULL&nbsp;</td>
<td>TAGS&nbsp;</td>
<td>Re: The body of the previous message or edit is always appended.&nbsp;</td>
<td>0&nbsp;</td>
<td>0&nbsp;</td>
<td>Y&nbsp;</td>
<td>Y&nbsp;</td>
<td>N&nbsp;</td>
<td>0&nbsp;</td>
<td>85&nbsp;</td>
</tr>
<tr>
<td>16&nbsp;</td>
<td>9&nbsp;</td>
<td>0&nbsp;</td>
<td>11&nbsp;</td>
<td>10.92.14.83&nbsp;</td>
<td>NULL&nbsp;</td>
<td>1013532466&nbsp;</td>
<td>0&nbsp;</td>
<td>0&nbsp;</td>
<td>NULL&nbsp;</td>
<td>TAGS&nbsp;</td>
<td>change the subject&nbsp;</td>
<td>0&nbsp;</td>
<td>0&nbsp;</td>
<td>Y&nbsp;</td>
<td>N&nbsp;</td>
<td>N&nbsp;</td>
<td>0&nbsp;</td>
<td>113&nbsp;</td>
</tr>
<tr>
<td>17&nbsp;</td>
<td>9&nbsp;</td>
<td>0&nbsp;</td>
<td>16&nbsp;</td>
<td>10.92.14.83&nbsp;</td>
<td>NULL&nbsp;</td>
<td>1013532517&nbsp;</td>
<td>0&nbsp;</td>
<td>0&nbsp;</td>
<td>NULL&nbsp;</td>
<td>TAGS&nbsp;</td>
<td>A nested reply to Message #3 (change the subject)&nbsp;</td>
<td>0&nbsp;</td>
<td>0&nbsp;</td>
<td>Y&nbsp;</td>
<td>N&nbsp;</td>
<td>N&nbsp;</td>
<td>0&nbsp;</td>
<td>155&nbsp;</td>
</tr>
<tr>
<td>18&nbsp;</td>
<td>9&nbsp;</td>
<td>2&nbsp;</td>
<td>12&nbsp;</td>
<td>10.92.14.83&nbsp;</td>
<td>NULL&nbsp;</td>
<td>1013532591&nbsp;</td>
<td>0&nbsp;</td>
<td>0&nbsp;</td>
<td>NULL&nbsp;</td>
<td>TAGS&nbsp;</td>
<td>nested reply&nbsp;</td>
<td>0&nbsp;</td>
<td>0&nbsp;</td>
<td>Y&nbsp;</td>
<td>Y&nbsp;</td>
<td>N&nbsp;</td>
<td>0&nbsp;</td>
<td>189&nbsp;</td>
</tr>
</table>
  • Attachment: th_9.zip
    (Size: 0.21KB, Downloaded 1192 times)
Re: Bugs in 1.1.9-dev (from CVS @ 8:30am Feb 12) [message #439 is a reply to message #438] Tue, 12 February 2002 18:54 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Already see the problem.

It would appear that for whatever reason the offset for each message is 0, which makes it read all of the data prior to this message in the thread.

Could you please give me the URL to your forum, I want to see this problem realtime if possible.

Thanks.


FUDforum Core Developer
Re: Bugs in 1.1.9-dev (from CVS @ 8:30am Feb 12) [message #440 is a reply to message #427] Tue, 12 February 2002 19:43 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Okie, the lastest CVS should have a fix for this.

The problem was entirely Windows' fault. In windows when you open file for append ftell() will always return 0 unless you write some data to the file. Our code being UNIX centric got the start position of the message by doing an ftell().
Windows programmers consider this a "feature" of NTFS' implementation of file permissions. Since NTFS allows a (real append) permission you cannot overwrite data before you aquired the file in append mode.
We've added a filesize() hack to hopeful solve this bug in Windows.

(grab forum_install/install_data/sys/include/post.inc & forum_install/install_data/sys/include/private.inc)

To test the fix you'll need to create new threads, the old ones that were affected by this problem cannot be fixed.


FUDforum Core Developer
Re: Bugs in 1.1.9-dev (from CVS @ 8:30am Feb 12) [message #441 is a reply to message #440] Tue, 12 February 2002 20:16 Go to previous messageGo to next message
hackie is currently offline  hackie   Canada
Messages: 177
Registered: January 2002
Karma: 0
Senior Member
Core Developer

prottoss wrote on Tue, 12 February 2002 2:43 PM

Okie, the lastest CVS should have a fix for this.

The problem was entirely Windows' fault. In windows when you open file for append ftell() will always return 0 unless you write some data to the file. Our code being UNIX centric got the start position of the message by doing an ftell().
Windows programmers consider this a "feature" of NTFS' implementation of file permissions. Since NTFS allows a (real append) permission you cannot overwrite data before you aquired the file in append mode.
We've added a filesize() hack to hopeful solve this bug in Windows.

(grab forum_install/install_data/sys/include/post.inc & forum_install/install_data/sys/include/private.inc)

To test the fix you'll need to create new threads, the old ones that were affected by this problem cannot be fixed.


More specifically, old threads will not be fixed UPTO the point of where you replace the files which don't currently consider windows' implemenation of fopen(...,'a').


cc intelligence.c -o intelligence
$ ./intelligence
Segmentation fault
Re: Bugs in 1.1.9-dev (from CVS @ 8:30am Feb 12) [message #442 is a reply to message #439] Tue, 12 February 2002 20:31 Go to previous messageGo to next message
ironstorm is currently offline  ironstorm   Canada
Messages: 89
Registered: February 2002
Location: Toronto, Ontario, Canada
Karma: 0
Member

prottoss wrote on Tue, 12 February 2002 1:54 PM


Could you please give me the URL to your forum, I want to see this problem realtime if possible.


Regrettably, the board I'm working on is behind a firewall, so it's not accessible from the outside world. Sad

Nor am I able to easily CVS the new files down...

I'd be greatful if you or hackie could post these files from CVS... (If you read this before 5pm, otherwise, I'll test them tomorrow for sure)

prottoss wrote on Tue, 12 February 2002 2:43 PM



(grab forum_install/install_data/sys/include/post.inc & forum_install/install_data/sys/include/private.inc)




Re: Bugs in 1.1.9-dev (from CVS @ 8:30am Feb 12) [message #443 is a reply to message #442] Tue, 12 February 2002 20:40 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Here you go, a complete snapshot of latest CVS.

FUDforum Core Developer
Re: Bugs in 1.1.9-dev (from CVS @ 8:30am Feb 12) [message #447 is a reply to message #443] Tue, 12 February 2002 21:10 Go to previous messageGo to next message
ironstorm is currently offline  ironstorm   Canada
Messages: 89
Registered: February 2002
Location: Toronto, Ontario, Canada
Karma: 0
Member

many thanks
Re: Bugs in 1.1.9-dev (from CVS @ 8:30am Feb 12) [message #448 is a reply to message #447] Tue, 12 February 2002 21:14 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
ironstorm wrote on Tue, 12 February 2002 4:10 PM

many thanks


You're welcome...

The http://fud.prohost.org/download/forum-dev-20020212.tar.gz release should be installable on Windows without needing to modify your include_path and the only thing that would be still relavent from your previous problems would be the SMTP setup on Windows. Smile


P.S.
Perphaps, we need to setup some automatic snapshot script, that would make snapshots every few hours or so...


FUDforum Core Developer
Re: Bugs in 1.1.9-dev (from CVS @ 8:30am Feb 12) [message #449 is a reply to message #448] Tue, 12 February 2002 22:11 Go to previous messageGo to next message
ironstorm is currently offline  ironstorm   Canada
Messages: 89
Registered: February 2002
Location: Toronto, Ontario, Canada
Karma: 0
Member

No Message Body
Re: Bugs in 1.1.9-dev (from CVS @ 8:30am Feb 12) [message #450 is a reply to message #449] Tue, 12 February 2002 22:17 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
eh?

FUDforum Core Developer
Re: Bugs in 1.1.9-dev (from CVS @ 8:30am Feb 12) [message #452 is a reply to message #448] Wed, 13 February 2002 02:04 Go to previous messageGo to next message
ironstorm is currently offline  ironstorm   Canada
Messages: 89
Registered: February 2002
Location: Toronto, Ontario, Canada
Karma: 0
Member

prottoss wrote on Tue, 12 February 2002 4:14 PM

ironstorm wrote on Tue, 12 February 2002 4:10 PM

many thanks


You're welcome...

The http://fud.prohost.org/download/forum-dev-20020212.tar.gz release should be installable on Windows without needing to modify your include_path and the only thing that would be still relavent from your previous problems would be the SMTP setup on Windows. Smile


P.S.
Perphaps, we need to setup some automatic snapshot script, that would make snapshots every few hours or so...




er sorry, I typed up a message... I must have deleted it or something right before I posted....

I was just going to say I'll install that snapshot on the DragonX.northern.ca dev machine. When I get home... (which
I'm home now Smile ).

And I was saying the CVS thing is a both a good and a bad idea, good cause it fixes bugs, bad cause sometimes it can discourage releasing as often (which might be a good or a bad thing in itself depending wheither your after higher quailty or higher visbility marketing Grin )
Re: Bugs in 1.1.9-dev (from CVS @ 8:30am Feb 12) [message #453 is a reply to message #427] Wed, 13 February 2002 02:52 Go to previous messageGo to next message
ironstorm is currently offline  ironstorm   Canada
Messages: 89
Registered: February 2002
Location: Toronto, Ontario, Canada
Karma: 0
Member

Quote:

function add($owner, $message_id, $original_name, $cur_location, $private='')
{
$proto = proto($cur_location);

Q("INSERT INTO fud_attach (proto, location, original_name, message_id, owner, private)
VALUES('$proto', 'none://unset', '$original_name', ".INTZERO($message_id).", INTZERO($owner), '".YN($private)."')");
$id = DB_LASTID();
$this->message_id=$message_id;
if ( $proto == 'LOCAL' ) {
$loc = safe_attachment_copy($cur_location, $id);
}


Got an extra " in your SQL in attach.inc
Re: Bugs in 1.1.9-dev (from CVS @ 8:30am Feb 12) [message #454 is a reply to message #453] Wed, 13 February 2002 02:53 Go to previous messageGo to next message
ironstorm is currently offline  ironstorm   Canada
Messages: 89
Registered: February 2002
Location: Toronto, Ontario, Canada
Karma: 0
Member

ironstorm wrote on Tue, 12 February 2002 9:52 PM

Quote:

function add($owner, $message_id, $original_name, $cur_location, $private='')
{
$proto = proto($cur_location);

Q("INSERT INTO fud_attach (proto, location, original_name, message_id, owner, private)
VALUES('$proto', 'none://unset', '$original_name', ".INTZERO($message_id).", INTZERO($owner), '".YN($private)."')");
$id = DB_LASTID();
$this->message_id=$message_id;
if ( $proto == 'LOCAL' ) {
$loc = safe_attachment_copy($cur_location, $id);
}


Got an extra " in your SQL in attach.inc


Or rather perhaps one too few...

don't know... the quotes look messed up for the whole line.

[Updated on: Wed, 13 February 2002 02:54]

Report message to a moderator

Re: Bugs in 1.1.9-dev (from CVS @ 8:30am Feb 12) [message #455 is a reply to message #454] Wed, 13 February 2002 02:55 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Already see the problem, it should be:

Q("INSERT INTO fud_attach (proto, location, original_name, message_id, owner, private)
VALUES('".$proto."', 'none://unset', '".$original_name."', ".INTZERO($message_id).", ".INTZERO($owner).", '".YN($private)."')");


You can get attach.inc from CVS it'll fix the problem.
Or simply replace the code you got in your attach.inc with the code I showed above.


FUDforum Core Developer

[Updated on: Wed, 13 February 2002 02:57]

Report message to a moderator

Re: Bugs in 1.1.9-dev (from CVS @ 8:30am Feb 12) [message #456 is a reply to message #455] Wed, 13 February 2002 03:00 Go to previous messageGo to next message
ironstorm is currently offline  ironstorm   Canada
Messages: 89
Registered: February 2002
Location: Toronto, Ontario, Canada
Karma: 0
Member


Yup... that's what I did... was about to post it Smile

Quote:

Q("INSERT INTO fud_attach (proto, location, original_name, message_id, owner, private)
VALUES('$proto', 'none://unset', '$original_name', ".INTZERO($message_id).",'". INTZERO($owner)."','".YN($private)."')");
Re: Bugs in 1.1.9-dev (from CVS @ 8:30am Feb 12) [message #457 is a reply to message #448] Wed, 13 February 2002 03:07 Go to previous messageGo to next message
ironstorm is currently offline  ironstorm   Canada
Messages: 89
Registered: February 2002
Location: Toronto, Ontario, Canada
Karma: 0
Member

prottoss wrote on Tue, 12 February 2002 4:14 PM


The http://fud.prohost.org/download/forum-dev-20020212.tar.gz



I have a dev server running this release at:

http://dragonx.northern.ca/forums/

It has an anonymous forum and should also support registration
via email.
Re: Bugs in 1.1.9-dev (from CVS @ 8:30am Feb 12) [message #458 is a reply to message #457] Wed, 13 February 2002 03:10 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
ironstorm wrote on Tue, 12 February 2002 10:07 PM

prottoss wrote on Tue, 12 February 2002 4:14 PM


The http://fud.prohost.org/download/forum-dev-20020212.tar.gz



I have a dev server running this release at:

http://dragonx.northern.ca/forums/

It has an anonymous forum and should also support registration
via email.


Thanks, I'll definately post a few messages Smile



FUDforum Core Developer
Re: Bugs in 1.1.9-dev (from CVS @ 8:30am Feb 12) [message #460 is a reply to message #427] Wed, 13 February 2002 05:04 Go to previous messageGo to next message
ironstorm is currently offline  ironstorm   Canada
Messages: 89
Registered: February 2002
Location: Toronto, Ontario, Canada
Karma: 0
Member

Looks like binary files don't save properly...

Text files are ok.

see: http://dragonx.northern.ca/forums/msg.php?th=9

for examples....

The binaries start out with the correct first few characters
and then cut off....

I'll up before and after some examples of binaries.

The second file is how it is saved in the files directory.
  • Attachment: tweakui.zip
    (Size: 94.68KB, Downloaded 901 times)
  • Attachment: 7.zip
    (Size: 0.57KB, Downloaded 829 times)
Re: Bugs in 1.1.9-dev (from CVS @ 8:30am Feb 12) [message #461 is a reply to message #460] Wed, 13 February 2002 05:10 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
ironstorm wrote on Wed, 13 February 2002 12:04 AM

Looks like binary files don't save properly...

Text files are ok.

see: http://dragonx.northern.ca/forums/msg.php?th=9

for examples....

The binaries start out with the correct first few characters
and then cut off....

I'll up before and after some examples of binaries.

The second file is how it is saved in the files directory.


Here is the "fixed" attach.inc, I've added 'b' flag to fopen call to make it binary safe.
  • Attachment: attach.inc
    (Size: 4.12KB, Downloaded 989 times)


FUDforum Core Developer
Re: Bugs in 1.1.9-dev (from CVS @ 8:30am Feb 12) [message #462 is a reply to message #461] Wed, 13 February 2002 05:14 Go to previous messageGo to next message
ironstorm is currently offline  ironstorm   Canada
Messages: 89
Registered: February 2002
Location: Toronto, Ontario, Canada
Karma: 0
Member

installed...

I'll try it now....
Re: Bugs in 1.1.9-dev (from CVS @ 8:30am Feb 12) [message #463 is a reply to message #427] Wed, 13 February 2002 05:17 Go to previous messageGo to next message
ironstorm is currently offline  ironstorm   Canada
Messages: 89
Registered: February 2002
Location: Toronto, Ontario, Canada
Karma: 0
Member



no go....

200KB file reduced to 6 bytes...

that's some mean lossy compression... Laughing
Re: Bugs in 1.1.9-dev (from CVS @ 8:30am Feb 12) [message #464 is a reply to message #463] Wed, 13 February 2002 05:19 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Back to the drawing table....

I need to go read docs on uploading binary files in Windows using PHP, there is something I am CLEARLY missing here.


FUDforum Core Developer
Re: Bugs in 1.1.9-dev (from CVS @ 8:30am Feb 12) [message #465 is a reply to message #427] Wed, 13 February 2002 05:23 Go to previous messageGo to next message
ironstorm is currently offline  ironstorm   Canada
Messages: 89
Registered: February 2002
Location: Toronto, Ontario, Canada
Karma: 0
Member

This is something I use to send files home and it handles
binaries ok....

Quote:

<?php
$x = move_uploaded_file($userfile, "C:\\Incoming\\".$HTTP_POST_FILES["userfile"]["nam e"]);

if ($x)
{
echo "<h1>Thanks got: ".$HTTP_POST_FILES["userfile"]["name"]."</ h1>";
}
else {
?>
<FORM ENCTYPE="multipart/form-data" METHOD="POST">
<INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="100000000">
Send this file: <INPUT NAME="userfile" TYPE="file">
<INPUT TYPE="submit" VALUE="Send File">
</FORM>
<?php
}
//phpinfo();
?>

Re: Bugs in 1.1.9-dev (from CVS @ 8:30am Feb 12) [message #466 is a reply to message #465] Wed, 13 February 2002 05:25 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Gotcha.

Btw, are the uploaded files that are stored in the files directory have the correct size or are they missing data?


FUDforum Core Developer
Re: Bugs in 1.1.9-dev (from CVS @ 8:30am Feb 12) [message #467 is a reply to message #427] Wed, 13 February 2002 05:28 Go to previous messageGo to next message
ironstorm is currently offline  ironstorm   Canada
Messages: 89
Registered: February 2002
Location: Toronto, Ontario, Canada
Karma: 0
Member


They are way small

Looks like they are being randomly cut off

the first 2 or 3 bytes look ok... i.e. Zip files start w/
PK and .PNGs start with PNG....

but they are like 6 bytes to 500 bytes and they are supposed
to be way bigger.

Re: Bugs in 1.1.9-dev (from CVS @ 8:30am Feb 12) [message #468 is a reply to message #467] Wed, 13 February 2002 05:39 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
One more attempt.

I've removed our manual copy code and replaced it with php's copy. If this does not work I'll rework the file attachment class to use move_uploaded_file().

So, please try.
  • Attachment: attach.inc
    (Size: 3.81KB, Downloaded 950 times)


FUDforum Core Developer
Re: Bugs in 1.1.9-dev (from CVS @ 8:30am Feb 12) [message #469 is a reply to message #427] Wed, 13 February 2002 05:41 Go to previous messageGo to next message
ironstorm is currently offline  ironstorm   Canada
Messages: 89
Registered: February 2002
Location: Toronto, Ontario, Canada
Karma: 0
Member

Ok, I've installed....

I'll go test...
Re: Bugs in 1.1.9-dev (from CVS @ 8:30am Feb 12) [message #470 is a reply to message #427] Wed, 13 February 2002 05:44 Go to previous messageGo to next message
ironstorm is currently offline  ironstorm   Canada
Messages: 89
Registered: February 2002
Location: Toronto, Ontario, Canada
Karma: 0
Member


No good... Crying or Very Sad
Re: Bugs in 1.1.9-dev (from CVS @ 8:30am Feb 12) [message #471 is a reply to message #470] Wed, 13 February 2002 06:01 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
I believe I found the problem, the lack of 'b' flag in the fopen() calls inside our safe_tmp_copy function.

I am attaching the new post.inc & attach.inc to this message.
  • Attachment: post.inc
    (Size: 9.39KB, Downloaded 891 times)
  • Attachment: attach.inc
    (Size: 3.81KB, Downloaded 672 times)


FUDforum Core Developer
Re: Bugs in 1.1.9-dev (from CVS @ 8:30am Feb 12) [message #472 is a reply to message #427] Wed, 13 February 2002 06:02 Go to previous messageGo to previous message
ironstorm is currently offline  ironstorm   Canada
Messages: 89
Registered: February 2002
Location: Toronto, Ontario, Canada
Karma: 0
Member

Installed, and testing....
Grin
Pages (2): [1  2    »]  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Comments on installing FUD 1.1.1 on Win2K
Next Topic: Need Help - pro i did the consistancy check and i have an error
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Dec 12 16:37:37 GMT 2024

Total time taken to generate the page: 0.02684 seconds