Re: Problems updating global preferences

Scott Brown <[email protected]> Fri, 26 Sep 2003 16:35:42 -0700
Newsgroups gmane.comp.bug-tracking.anthill.user
Message-ID <[email protected]>
Hi, Vincent,

Replies inline!


At 03:42 PM 9/26/2003, you wrote:
>On Fri Sep 26, 2003 at 01:11:33PM -0700, Scott Brown wrote:
>
> > The plot thickens...
> >
> > I haven't been able to try 0.2.4pre yet... will likely do so shortly,
> > although a diff between the two admin.php files (1.28 and 1.30) doesn't
> > show me anything that would affect the issue first reported yesterday!
> >
> > I have found some other quirks, though, not quite sure what they mean. I'd
> > much rather run this on a *nix box, but here I am...
> >
> > 1) d_DoDiff
> >
> > This is probably a quirk on my end, but my mail server didn't like mixed
> > case on Cc:, so I had to change it to CC:.
>
>This shouldn't be an issue for any MTA, I would suspect (changing it to CC).
>I can make this change.
>
> > 1.5) newuser.php
> >
> > Similar to the above, probably a quirk unique to my setup, but I had to
> > change line 117 so that it did not include $rname. My mail server (I
> > *think*; at least I didn't see where the code was doing it, except around
> > $email. PHP might be, but chasing that would be a pain!) would add the
> > carats "<>" around the entire thing, like <User Name 
> <username-9IKiO1iGCm/[email protected]>>
> > and throw a syntax error. So my newuser.php just sends $email to @mail (no
> > carats). I still need to change it where $go == "newpass" (line 16).
>
>Ok, your MTA is really really wierd.  That's a standard way of writing a To
>line.  I mean, I can ditch the real name part (that was more of a cosmetic
>thing than it being functional).
>
> > Those two might be good for a "getting Anthill running on Windows" FAQ or
> > something. Or ArgoSoft Mail Server Pro. It looks like it was designed with
> > Sendmail in mind?
>
>It was designed for a normal MTA.  =)  Really, it works with postfix,
>sendmail, qmail, exim...  I'm not sure about some of these windows MTAs...
>seem kinda non-standard to me.

This is very likely, I wouldn't modify Anthill because of either of these. 
It's good info to stick somewhere, though. ArgoSoft Mail Server Pro is 
pretty non-standard in a lot of ways. Most likely, at the very least, the 
Cc: thing being case-sensitive is a bug on their end. The others (From:, 
Reply-To:, etc...) are all just fine.


> > 2) The thing with admin.php (previous thread)
> >
> > Strangely, if I repeatedly refresh the page after a POST, I can
> > *occasionally* get the setting change to take (very unpredictable), and 
> get
> > the success message at the top of the page. I have been over and over the
> > code, and can't for the life of me see what is going on. Even when I
> > successfully get a change to "take", I have to refresh the page again to
> > see the font change. None of the elements, or any combination of elements,
> > alleviate the issue. I don't *think* it is a client issue. If someone
> > wanted to check it out, I can email them off-list with the URL and a
> > username and password. It's strictly in a (more or less) sandboxed area 
> for
> > evaluation at the moment, so I'm not sweating it. It would certainly help
> > me to determine whether or not this is a client issue, or a server issue.
>
>Please, I'd like to be able to see what's going on.
>
> > The screwy thing is, every other form works fine. I even reviewed my
> > settings in my php.ini to make sure safe mode was off (it is, and was). As
> > a note, variables_order is set to "EGPCS". Does this matter? gpc_order is
> > also commented out (deprecated) does this matter?
>
>Should work with safe_mode on as well.  I don't think variables_order should
>make a difference... I've never muddled with that and don't think it should
>matter.
>
> > The only thing I can think of is that for some reason, this statement:
> >
> > if ($go == "change")
> >
> > Doesn't resolve properly, yet on every other page, it seems to do just
> > fine! Maybe IE6 thinks "change" is a reserved word or something, and isn't
> > posting it properly. I might try changing it (pardon the pun) to something
> > else. The reason I say that it must be this statement is because I would
> > expect that if it were resolving, but a database error occurred, I would
> > still get the success message at the top of the page, but it would fail to
> > do the update. No errors are thrown, and whenever I see the message, the
> > update was successful.
>
>I don't think it can be a reserved word.  The variable name is go, the value
>is change.  Unless go is a reserved word, but that would mean the other
>forms would be broken as well.
>
> > Needless to say, I am stumped!
>
>You and me both.  That's pretty odd.
>
>I have to admit, when it comes to running under windows, I'm pretty
>clueless.  I do my development work on OS X and run it on various Linux
>boxes, so when windows problems crop up, I more or less rely on others to
>debug.
>
> > Another thing I should probably add is that I copied my 0.2.1 db over to
> > the new install of 0.2.3; I don't see any changes to its structure, or to
> > admin.php between 0.2.1 and 0.2.3, though. Also, I am able to reproduce 
> the
> > same problem in the 0.2.1 install... and since I can sometimes get it to
> > take the changes by refreshing the page, I don't think that's it.
>
>There were some minor changes.  In the etc/ directory is a 0.2.2-0.2.3.sql
>file; you need to apply that to your database.  That's not going to solve
>this problem, I don't think, but you should do it.

I will. I'm glad I turned mod_gzip off for a lot of reasons. Some users of 
my site had complained of garbled images, and some flash files being 
"weird". I was able to repeatedly duplicate the issue on a machine here, 
but could never resolve it. This fixed it. Probably the Windows 
implementation of it. I am going to notify the folks that produce this 
distribution I am using, and tell them it should probably be off by 
default. (OpenSA, www.opensa.org).


> > 3) Style sheet and BODY statement conflicting?
> >
> > I did notice that the style sheet over-rides the settings, anyway (mostly
> > playing with the font sizes above), if I am set up correctly (initially, I
> > don't think I was, and it was not finding the style sheet). My initial
> > setting had 'webroot' set to the actual www web root, which is a directory
> > above the location of the Anthill install. I changed webroot to the 
> webroot
> > including path info, and thought I had blown something out (hehe), because
> > suddenly, everything was darkcyan. It's a VirtualHost now ;-), lol. I
> > caught it when I fixed the emails, and the link was wrong.
> >
> > I believe this is expected behavior in IE, that style sheets supercede 
> BODY
> > tags, but I could be wrong. They don't supercede FONT tag containers,
> > methinks. Gotta install Mozilla to see... Although, since they are
> > conflicting concepts, maybe a way to turn styles on and off, which, when
> > on, disables the font options on the admin screen (and removes them from
> > the body tag) in a future version?
>
>All of this is going to change in 0.3.  I'm going to move to more
>customizable template format and css will be used to control almost all
>design aspects (ie. instead of changing stuff in the admin page, you'll have
>to change the css).  I may make a "css designer" type control so you can
>generate css changes from within Anthill and not have to modify the css by
>hand.  But that likely won't be happening for quite a while.

That sounds super. CSS is the wave of the future anyway (lol, like it 
hasn't been around for awhile; I don't use styles much, but I am trying to 
get into the present), as much of these commands are being deprecated in 
HTML. Some are already, but not yet obsolete.


> > Maybe this is already on the change list for 0.2.4pre. If so, forgive 
> me! I
> > seem to remember it (the changelog) mentioning something somewhere on the
> > styles. I'm not beta testing, but evaluating the production version, for
> > use. So, I am skeptical of using a pre-release for testing.
>
>0.2.4pre is pretty much 0.2.4 final without some fixes I've committed
>recently.  Anthill is pretty stable no matter how you cut it, and the added
>features to 0.2.4 have been pretty small or subtle.  Using 0.2.4pre should
>be fine.  I would have releaed it by now except that I've been waiting for
>language translations (the spanish, italian, and french translations aren't
>up to date and I'm hoping someone steps forward to update them).

OK, I'll have to give it a whirl next week for sure, now that I know what 
I'm up to in the code. Besides, I like the custome email footer concept, 
definitely want to try it.


> > 4) Just a question...
> >
> > In the email(s) when changes are made to a bug report, I am getting some
> > weird text that includes path info in it:
> >
> > --- 2 2003-09-25 17:17:34.000000000 -0700
> > +++ C:/OpenSA/Apache/htdocs/cc/ICS/shadow\2.t562.tmp  1969-12-31
> > 16:00:00.000000000 -0800
> > @@ -1,43 +0,0 @@
> >
> > I looked at the .tmp file directly, and it isn't in there, and the
> > date/time above is just wacky. Is this expected behavior with the 
> windiff I
> > downloaded from the main site? Can I get rid of it? I don't see where the
> > code is adding it right off...
>
>Hmmmm...  not sure.  I don't use windiff here.  The date is definitely
>wrong, I don't know what that is from.  It also shouldn't be putting the
>full path to the temporary file like that, but I suspect that's due to my
>regular expression.  It should look like:
>
>--- 2
>+++ 2.tmp
>
>Can you tell me what the value of $_CONF['shadowdir'] is?  Do you use
>forward slashes or backslashes?  Can you try applying this patch to
>functions.inc.php and see if the full path for the temporary file
>disappears?  It really shouldn't be there.

The value of $_CONF['shadowdir'] is just what you see, up to the last slash 
and the filename. Here is the copy from my conf.inc.php:

   $_CONF['root']       = "C:/opensa/apache/htdocs/cc/ics";
   $_CONF['incdir']     = "/include";
   $_CONF['imgdir']     = "/images";
   $_CONF['tmpldir']    = "/backend/template";
   $_CONF['langdir']    = "/backend/language";
   $_CONF['shadowdir']  = $_CONF['root'] . "/shadow";
   $_CONF['tmpdir']     = $_CONF['root'] . "/tmp";
   $_CONF['gpgdir']     = "/gpg";
   $_CONF['attachdir']  = "/attachments";
   $_CONF['cssfile']    = $_CONF['webroot'] . $_CONF['incdir'] . 
"/anthill.css";
   $_CONF['difftool']   = "C:/wdiff/diff";

Webroot removed, since this is a mailing list. I tried using backslashes 
for reasons I don't remember, but Anthill didn't like that at all. It 
prefers *nix style paths. It wouldn't run with backslashes. The last 
backslash before the filename is a windows path. Will definitely try the patch.




>--- functions.inc.php.org       2003-09-26 16:38:59.000000000 -0600
>+++ functions.inc.php   2003-09-26 16:39:57.000000000 -0600
>@@ -662,9 +662,8 @@
>      }
>
>      // create the diff
>-    $stmpfile = ereg_replace($_CONF['shadowdir'] . "/","",$tmpfile);
>      $antdiff  = tempnam($_CONF['tmpdir'],"ant-diff.");
>-    $cmd      = sprintf("%s -ruN %s/$bugnum 
>%s/$stmpfile",$_CONF['difftool'],$_CONF['shadowdir'],$_CONF['shadowdir']);
>+    $cmd      = sprintf("%s -ruN %s/$bugnum 
>%s",$_CONF['difftool'],$tmpfile,$_CONF['shadowdir']);
>      $output   = exec($cmd,$diffarray,$return);
>      if ($return == 1) { // there are differences
>        $x = implode($diffarray,"\n");
>
> > I hope I am not overstepping myself here, just wanted to throw out some
> > things I unearthed. The real big issue here is the admin.php not 
> working. I
> > can manually go into the db through an administrative tool for MySQL I am
> > using and make changes, but I'd really like to nail this down.
>
>You and me both.  While I'm not developing for windows and never initially
>meant for it to run on windows, I know a fair amount of people are using it.
>Which is what kinda wierds me out here... this is the first I've heard about
>this kind of problem.

Whew! Pure luck, too. I was thinking as you were, that this had something 
to do with Apache, since stopping and restarting seemed to placate the 
problem, sort of. So, I just did a search for php in my conf file, and just 
experimented with turning off mod_gzip, and voila! it worked!

What I am going to do is update to 0.2.4pre2 on Monday (not sure where you 
are; I am in the U.S., so today is Friday, just before the weekend), update 
the db, and start over. I will apply the fixes for my specific installation 
to the new files I get, and try the patch above for the functions file.

I will let you know then!

Thanks again, and sorry to make you scratch your head when it wasn't even 
your code! Like I said, I went over and over admin.php and it looked 
perfect. Guess what? It was!! Anthill really is a great product. I spend a 
lot of time porting over stuff designed to run on various *nix flavors to 
Windoze, and to specific setups (trying to keep them functional on *nix at 
the same time; trying to standardize across platforms). This is a cakewalk 
compared to some Perl stuff I've had to port. Very nice tracker, too, I 
like the interface, the whole thing. I started poking at 0.2.1 some time 
ago (January, maybe?), and mothballed it until yesterday, as the need for a 
good tracker has become overwhelming.

--Scott



> > On an aside, the fix for the query screen in IE is super! Much better (I
> > started out yesterday with 0.2.1).
>
>=)
>
>--
>MandrakeSoft Security; http://www.mandrakesecure.net/
>Online Security Resource Book; http://linsec.ca/
>"lynx -source http://linsec.ca/vdanen.asc | gpg --import"
>{FE6F2AFD : 88D8 0D23 8D4B 3407 5BD7  66F9 2043 D0E5 FE6F 2AFD}
>
>
>_______________________________________________
>Anthill-users mailing list
>Anthill-users-+mQDA36h6dWw5LPnMra/[email protected]
>http://vmlinuz.ca/mailman/listinfo/anthill-users



_______________________________________________
Anthill-users mailing list
Anthill-users-+mQDA36h6dWw5LPnMra/[email protected]
http://vmlinuz.ca/mailman/listinfo/anthill-users