FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Only Allow exec in CLI
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Only Allow exec in CLI [message #179200 is a reply to message #179198] Tue, 25 September 2012 11:52 Go to previous messageGo to previous message
The Natural Philosoph is currently offline  The Natural Philosoph
Messages: 993
Registered: September 2010
Karma:
Senior Member
Tim Streater wrote:
> In article <k3s4f8$6ni$1(at)news(dot)albasani(dot)net>,
> The Natural Philosopher <tnp(at)invalid(dot)invalid> wrote:
>
>> Mo. I still have to write all the exec() calls.
>>
>> Consider the case. I have 4 programs I want to run serially under a
>> cron script
>>
>> I set up the script like this
>>
>> #!/bin/sh
>> program1
>> program2
>> program3
>> program4
>>
>> Now tell me what else I have to add to make that run under php.
>>
>> Or why on earth I would want to.
>
> If it's as simple as that there's prolly no point. Mind you, I'd prolly
> still do it in PHP because I wouldn't be aware that you can run an
> executable in a script just by giving its name; I avoid all knowledge of
> shell scripting.
>
> And, are you saying that programs 1, 2, 3, and 4 always run successfully

No

> and don't have any failure modes?

No

> No checking of result codes required
> or error handling needed?
>

Yes. If they fail. they fail gracefully. and they leave errors in their
logfiles.

And because C has better tools, they can be deigned to fail gracefully.



> In your case you have 4 lines of code and run 4 executables. In my app I
> have some 11,500 lines of PHP and still run just the 4 executables.
>

I rest my case :-)


--
Ineptocracy

(in-ep-toc’-ra-cy) – a system of government where the least capable to
lead are elected by the least capable of producing, and where the
members of society least likely to sustain themselves or succeed, are
rewarded with goods and services paid for by the confiscated wealth of a
diminishing number of producers.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Advice for Literature on PHP-Based Web Development Business Models
Next Topic: Count how many times a value occurs in an array
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Sep 19 16:37:41 GMT 2024

Total time taken to generate the page: 0.05060 seconds