[freetds] php, freetds and cron

Hans Lang hal at mmg.de
Mon Jan 6 23:58:32 EST 2003


Hi,

you wrote: "You could put something in your script to make it wait."
is it possible, that theres a strange timeout condition? TDSDUMPCONFIG 
didnt do it, but it writes just a handfull of bytes, TDSDUMP wrote a 
log-file of about a megabyte. that may have slowed down the 
conversation. but why does this problem occur only in cronjobs? And i 
cant think of any other way toi slow down a "mssql_connect()"-call.

does setting TDSDUMPCONFIG close or clean up anything? or does it a cwd?

if you cant believe it, we shurely would find a way to let you have a 
look on the real server.

for now i use your hint "export TDSDUMP=/dev/null".

thank you,
hans

P.S. In my first posting i wrote that wgetting the script doesnt work 
either. that was wrong! i tried it again and it worked. the problem 
remains only in cron-jobs, but export= sounds better, because i mustnt 
make the script accessible for the web-server.



Lowden, James K wrote:
>>From: Hans Lang [mailto:hal at mmg.de]
>>Sent: January 6, 2003 4:40 PM
>>
>>it is the TDSDUMP= that makes the whole thing run. 
>>TDSDUMPCONFIG= dumps 
>>the config, as it should, but TDSDUMP does miracles.
> 
> 
> Hans, 
> 
> It defies belief.  If I didn't like you, I'd say you were playing with my
> head.  I rechecked the code and didn't find anything that hints at the
> behavior you describe.  
> 
> Does your freetds.conf include anything about logging?  Is it possible that
> FreeTDS tries to open an invalid dump file or something?  
> 
> The only thing I can suggest is hard.  You could put something in your
> script to make it wait.  Launch it with cron(8), attach to the process with
> gdb, and trace the connection logic.  Something's going wrong somewhere.  
> 
> Actually, I have an easy solution, too.  "export TDSDUMP=/dev/null" in your
> crontab and let your successor scratch his head.  
> 
> Regards, 
> 
> --jkl
> 
> 
> 
>>Frediano Ziglio wrote:
>>
>>>Il lun, 2003-01-06 alle 19:00, Hans Lang ha scritto:
>>>
>>>
>>>>hi,
>>>>
>>>>and thank you all for your help.
>>>>and now for something astonishing: James' tipp to set the variables 
>>>>TDSDUMP and TDSDUMPCONFIG does not only help me resolving 
>>
>>the problem, 
>>
>>>>it solves the problem itself.
>>>>
>>>>the script
>>>>
>>>>#!/bin/bash
>>>>#
>>>>export TDSDUMPCONFIG=/tmp/t_foo
>>>>export TDSDUMP=/tmp/t_bar
>>>>/usr/local/bin/php -q  /path/tagestipps.php >>/tmp/t_log 
>>
>>2>>/tmp/t_err
>>
>>>>works, but
>>>>
>>>>#!/bin/bash
>>>>#
>>>>/usr/local/bin/php -q  /path/tagestipps.php >>/tmp/t_log 
>>
>>2>>/tmp/t_err
>>
>>>>does not work.
>>>>
>>>>what does setting these variables force the library to do?
>>>>
>>>>
>>>>
>>>>mfg
>>>>hans
>>>>
>>>
>>>
>>>Look weird...
>>>
>>>Try setting only one of the two options...
>>>These options enable only dump...
>>>
>>>bye
>>>  freddy77
>>>
>>>
>>>_______________________________________________
>>>FreeTDS mailing list
>>>FreeTDS at lists.ibiblio.org
>>>http://lists.ibiblio.org/mailman/listinfo/freetds
>>>
>>>
>>
>>_______________________________________________
>>FreeTDS mailing list
>>FreeTDS at lists.ibiblio.org
>>http://lists.ibiblio.org/mailman/listinfo/freetds
>>
> 
> 
> 
> The information contained in this transmission may contain privileged and
> confidential information and is intended only for the use of the person(s)
> named above.  If you are not the intended recipient, or an employee or agent
> responsible for delivering this message to the intended recipient, any
> review, dissemination, distribution or duplication of this communication is
> strictly prohibited. If you are not the intended recipient, please contact
> the sender immediately by reply e-mail and destroy all copies of the
> original message. Please note that we do not accept account orders and/or
> instructions by e-mail, and therefore will not be responsible for carrying
> out such orders and/or instructions.
> 
> 
> _______________________________________________
> FreeTDS mailing list
> FreeTDS at lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds
> 
> 




More information about the FreeTDS mailing list