|
|
Re: very terrible bug [message #5952 is a reply to message #5950] |
Sat, 28 September 2002 14:20 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
Which version of the forum are you using? As far as I can tell length of strings should not matter in this case, could you show me the version of header.tmpl that caused your forum to encounter problems. Thanks.
FUDforum Core Developer
|
|
|
|
Re: very terrible bug [message #5971 is a reply to message #5968] |
Sun, 29 September 2002 00:41 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
Uhm nope, I wanted to see the entire file not just the header.
That does nothing for me.
FUDforum Core Developer
|
|
|
|
Re: very terrible bug [message #5976 is a reply to message #5973] |
Sun, 29 September 2002 14:49 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
Many compiled files get affected, this is because header is inlined into virtually every single compiled file.
FUDforum Core Developer
|
|
|
|
Re: very terrible bug [message #5993 is a reply to message #5979] |
Mon, 30 September 2002 15:56 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
Cannot replicate this bug, I've created the header identical to the one you've made using the template editor and had not encountered any problems on register page, while registering a user.
Did you perphaps make modification to some other files, especially source files? From the looks of it seems like you may have edited the tz.inc.t file incorrectly and when it was compiled you got the error.
FUDforum Core Developer
|
|
|
Re: very terrible bug [message #5995 is a reply to message #5993] |
Mon, 30 September 2002 18:35 |
artur4
Messages: 20 Registered: September 2002
Karma: 0
|
Junior Member |
|
|
The problem also happens when I'm changing footer.tmpl file.
Both changes I did using the web interface.
I think there're some Solaris restrictions with long strings. For example, I found out, that solaris "fgets" function is restricted with 256 bytes. I tested it with the following code:
#include <stdio.h>
int main(int argc,char **argv) {
char line[8192];
while((fgets(line,8192,stdin)) != EOF) {
printf("The line is '%s'\n",line);
}
}
Another symtom, I wasn't able to edit the above files with vi editor on Solaris, but was able on linux... There're restrictions for solaris "sed" and "awk" utilities. I'm quite sure there're some PHP functions, that also are restricted.
This actually is the reason I asked you for avoiding the long strings.
Alternatively, is it possible to use apache "include" function. You should add something like :
<!--#include file="header.tmpl"-->
in html document and activate "Includes" options for the directory in apache configuration file. In this case there's no need to edit all the files.
Thanks.
|
|
|
Re: very terrible bug [message #6001 is a reply to message #5995] |
Mon, 30 September 2002 19:26 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
As you probably know fgets() does not guarantee to read 8192 bytes, it'll stop if it encounters a \n or any other line end character as defined by Solaris' libc library.
To be honest this is the first time I hear of this limitation on Solaris.
Then again I am not big Solaris expert so I dunno.
FUDforum does not however use fgets of fputs() it uses fread() and fwrite(), which write the entire chunk to disk so this should not be a problem. Since php would buffer the writes as need be until the entire file is written to disk.
Doing <!--#include file="header.tmpl"--> is not correct for multitude of reasons, if you are already using PHP you should use PHP's own include() or require() or even readfile() to include files. This also adds dependency on apache includes being allowed an enabled.
FUDforum Core Developer
|
|
|
|
Re: very terrible bug [message #6014 is a reply to message #6012] |
Mon, 30 September 2002 20:14 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
Well, that's a plus
Hopefuly it'll continue working properly.
FUDforum Core Developer
|
|
|