LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-09-2006, 04:03 AM   #1
paul_mat
Member
 
Registered: Nov 2004
Location: Townsville, Australia
Distribution: Fedora Core 5, CentOS 4, RHEL 4
Posts: 855

Rep: Reputation: 30
not as easy php question


hi there,

i'm not sure if this is possible, but here goes.

Can anyone ask me, I want to execute a command found on the local machine from apache using server side variables, so I guess the first question would be.

Can i execute a command on the local machine?
 
Old 05-09-2006, 04:56 AM   #2
ethics
Senior Member
 
Registered: Apr 2005
Location: London
Distribution: Arch - Latest
Posts: 1,522

Rep: Reputation: 45
via PHP? you can use
Code:
exec
never written in PHP but i see that answer on here a fair bit.

If i read it right you want to use variables stored on the machine where apache and your program/script is you want to run with PHP? dont think that's a problem
 
Old 05-09-2006, 06:39 AM   #3
Spudley
Member
 
Registered: Mar 2003
Location: Berkshire, England.
Distribution: SuSE 10.0
Posts: 299

Rep: Reputation: 32
Quote:
Originally Posted by paul_mat
Can i execute a command on the local machine?
The question is ambiguous -- when you say 'local machine', do you mean local to the PHP process (ie the server) or local to the end user (ie the client).

Ethics has already answered for the first case, but the way I read the question, I thought you meant the latter.

So as I read it, you want to be able to start up a program on the user's PC, but under the control of your PHP program.

If that's what you're asking, then the short answer is no, you can't; that sort of thing is blocked by the browser for very good security reasons.

The closest you can get would be to get the user to download a Java applet or ActiveX control that does what you need, and get them to run it.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Easy PHP question zuessh Programming 10 06-14-2005 03:53 PM
Easy Question aeuzent Linux - Newbie 2 05-21-2005 08:06 AM
PHP - Easy one pk_fox Linux - General 8 02-11-2005 08:22 AM
X Question.. Probably easy :) duckdown Linux - Software 2 03-26-2004 06:36 PM
Slack [PHP/GD + Freetype] easy way? ThA-B Slackware 1 09-25-2003 11:06 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:14 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration