[PHP] Re: scope and return array( ); problems

2007-04-18 Thread Yvan Strahm
On 4/18/07, Yvan Strahm <[EMAIL PROTECTED]> wrote: Hi all, I have this code ( but you already know it ;-) : function preg_array($pattern, $array, $r_array) { global $match; global $r_array; foreach ($array as $key => $value) { if (preg_match($pattern, $val

[PHP] scope and return array( ); problems

2007-04-18 Thread Yvan Strahm
What's wrong with the first version of the preg_array function? do I really need to have the same array name in order to retrieve the third argument of the function? Thanks for your help, yvan

[PHP] scope and return array( ); problems

2007-04-18 Thread Yvan Strahm
hi all, I have this function: function preg_array($pattern, $array, $r_array) { global $match; global $r_array; foreach ($array as $key => $value) { if (preg_match($pattern, $value,$match)) { $GA=array_slice($match,1); break; } } return array ($GA,

Re: [PHP] crontab, PHP and MACOSX

2007-04-04 Thread Yvan Strahm
. '/other_file_name.php'); -- Postgresql & php tutorials http://www.designmagick.com/ Thanks for the hint. I found s solution to execute the php script from the cron scheduler: add a "&" at the end of the crontab command Thank for your help. yvan

Re: [PHP] crontab, PHP and MACOSX

2007-03-28 Thread Yvan
On March 28, 2007, Chris wrote: > Yvan wrote: > > Hello all, > > > > I don't know if it's the correct list, but as a php script is involved > > Nope, not the right list. Cron isn't running - which has absolutely > nothing to do with php. >

Re: [PHP] crontab, PHP and MACOSX

2007-03-28 Thread Yvan
> [the above are for standard unix systems, i've never actually touched > macOSX.] > > > - Rick > > Shell command as cron jobs work and errors are also send to the local mail, but php scripts are not executed, is their any permission issues ? the same con job work fi

[PHP] crontab, PHP and MACOSX

2007-03-28 Thread Yvan
Hello all, I don't know if it's the correct list, but as a php script is involved I try to start a set up a crontab job with crontab -e, which should start a php script: */10* * * * cd /Users/yvan/Sites/est-pac/ ; /usr/bin/php /Users/yvan/Sit

Re: [PHP] usage of flock

2007-03-26 Thread Yvan Strahm
On 3/23/07, Myron Turner <[EMAIL PROTECTED]> wrote: Richard Lynch wrote: > On Fri, March 23, 2007 7:52 pm, Yvan Strahm wrote: > >> I am confused with the flock function and its usage. I have jobs which >> are >> stored in a database, these jobs are run by a se

Re: [PHP] usage of flock

2007-03-26 Thread Yvan Strahm
On 3/23/07, Richard Lynch <[EMAIL PROTECTED]> wrote: On Fri, March 23, 2007 7:52 pm, Yvan Strahm wrote: > I am confused with the flock function and its usage. I have jobs which > are > stored in a database, these jobs are run by a series of job_runners > scripts > but some

[PHP] usage of flock

2007-03-23 Thread Yvan Strahm
main concern is , if the server crash down the "surviving" lock file will prevent any job_controller to start. So how could prevent multiple instance of the same script? Is flock the best way? Thanks in advance for your time and help cheers yvan