[Refdb-users] RE: refdbc and php4
Status: Beta
Brought to you by:
mhoenicka
|
From: Markus H. <mar...@mh...> - 2003-02-15 00:31:34
|
Hi Alan, al...@ru... writes: > Markus, > > I got a chance to try your two patches. They appear to work for the case of > addref/getref. However, my "Change DB" page fails because the listdb command > did not work. I'm guessing the test for n_cgi_env didn't get propagated to that > routine yet. Note also, that I have NOT tried updateref or deleteref, but then > I'm guessing you hadn't made a complete pass through the source since you > weren't sure the fix would work. Actually I tried to catch this problem at the very beginning in the program so that it should automatically propagate to everything else. I don't have the slightest idea why this change would affect listdb. > > I did think of another potential problem based on your fix. What if my CGI app > wants to pipe input to refdbc? Does this change preclude us from using > redirection? I took a couple minutes to try it, and I couldn't get it to work, > but it is possible there was something else wrong. Rather than providing a > filename to the addref command, I piped the output from cat into it, and this > failed, although my return value was apparently not indicating an error. E.g., > > my $result = `$refdbc -C "addref $tmpfile"; > > changed to > > my $result = `cat $tmpfile | $refdbc -C "addref"; > > It worked on the commandline, but when I tried it from the CGI script, it did > NOT return an error, but the record was never added. A quick glance at the log > file didn't really indicate anything because the addref entry didn't show a file > name (as expected since it was redirected). > This is indeed a consequence of the patch. I'm afraid I'll have to go back to A1 and start all over. All this autodetection stuff seems to be crappy in some way. Would it be acceptable to allow '-f stdin' as an option for the deleteref, pickref, addref, and getref commands? All of them currently support reading from a file by using '-f filename'. This way I could get rid of these futile attempts to automagically detect whether there's data at stdin. regards, Markus -- Markus Hoenicka mar...@ca... (Spam-protected email: replace the quadrupeds with "mhoenicka") http://www.mhoenicka.de |