[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [K12OSN] launch an application via php script?



Hi - Thanks for the replies. What you all say about php being server-side so can't activate local apps makes sense, so I tried a different search, and found:

http://www.whirlywiryweb.com/q/%2Flaunchinie.asp
"...LaunchinIE ActiveX Control that will enable HTML pages to start whatever application on the client's machine, without security warnings.
To ensure security, LaunchinIE needs to be carefully configured client-side; due to this restriction it's only fit for intranet use."


But it seems like it's only for (ew!) internet explorer...

I'll keep looking though and reply with the solution when I find it.

Debbie

Huck wrote:
can you actually open an executable via  <a href> tag?
I tried...it asked me where I wanted to save the executable...
(was on a windows machine) dunno how linux will handle it...

Javascript might be able to launch something for you ?

--Huck, not even a mid-level web programmer =)

Petre Scheie wrote:

I don't think this can be done, at least not with PHP (or CGI, etc.). PHP is a server-side scripting language, meaning whatever is called is owned by the server ID; I think you want, say, the gimp session to be owned by the user who clicks on an icon. I can't think of any way that you could pass the $DISPLAY variable to the server, that the server would be able to make sense of, such that the gimp would appear on the correct terminal. The problem, as I see it, is one of context: clicking the icon happens in the user's context, but it triggers a (PHP) script that runs in the web server's context.

Even if you could have apache call the gimp and pass it the correct display, you still have the issue of who owns and therefore controls the gimp pid.

It's an interesting concept, though, and I'd love to be proven wrong...but I just can't see how one would make it work. I don't think you can get there from here.

Petre

Debbie Schiel wrote:

Hi, This is for the PHP gurus...

Is there a way to launch an application (eg: 'gimp') via a php script?

I'm thinking of an intranet page for Preppies (kindergarten) with icons linked to flash games on external sites but also icons linked to internal applications. So I would need something like:

<a href="go.php?launch=myapp">TUX PAINT ICON</a>

and then

<? if ($launch==myapp) {
            some php script here...
        }
?>

I've tried exec() and shell_exec() without success.
Any ideas?

Thanks,

Debbie

ps - is this considered 'off topic'?


_______________________________________________ K12OSN mailing list K12OSN redhat com https://www.redhat.com/mailman/listinfo/k12osn For more info see <http://www.k12os.org>



_______________________________________________ K12OSN mailing list K12OSN redhat com https://www.redhat.com/mailman/listinfo/k12osn For more info see <http://www.k12os.org>


-- http://www.redeemer.qld.edu.au/


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]