Reply to Re: exec php

Your name:

Reply:


Posted by warth33 on 01/20/08 12:29

> Given your seemingly random, but consisent failure,
> here is a possible approach (but I'd look at popen below, first):
>
> In yourphpprogram, create a scheduled task whose only function
> will be to execute your exec right away (this can either be
> done by scheduling the task to run at the top of the next minute
> or schtasks can explicitly cause the task to run (but it
> requires a one line exec call) - you must ensure a unique
> id).  This way your original program is not
> tied to the completion of your scheduled script.
> The scheduled script (or rather, whatever is execed) could write
> a file or leave some tracks for the original script to detect
> that it has gotten sufficiently far if that's a requirement.
>
> You have a few ways of going about this.  On Windows, you can
> use either AT or SchTasks.  The latter may be worked with as a
> COM object (otherwise you'll be looking at some version of exec).
>

I must confess I dont really understand how to implement this, and
neither know if this is something for me. I mean the kind of webapp I
have will probably not gain benefits by using this approach.

> Also, as regards your exec, something I would investigate
> before total frustration (if that point hasn't already been
> reached) is ahttp://php.net/popenvariant.  By the way,
> the exec family of functions (or something related to them)
> was revised over the last year especially in regards to
> being executed fromphp-win.exe so it's probably a good
> idea to have a recent copy ofphp.

Yes I will try this too. When the exec hangs up I will try to call a
test php-script that, in turn, only calls a dummy c# app, one that
only prints hello world. If it will not help, I think I will try to
replace all my calls to exec with popen. And see if that will help...
Anyway the first thing I will do is to replace the php-copy with a
newer one(it is 5.2.1 now). Cause I reallt dont know how to face this
problem anymore. Thanks all for the help, will be back in case of
better news.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация