Jump to content

calling executabel file problem

- - - - -

  • Please log in to reply
4 replies to this topic

#1
batowiise

batowiise

    Newbie

  • Members
  • PipPip
  • 17 posts
Hi All,

I have the following script that calls an executable file. It works fine on the testing server but does not function properly on a remote machine.


<?php

$tmp = exec("C:\\Program Files\\Vehicle Fleet Manager\\VehicleFleetManager.exe"); 

?> 

The path to the executable file is the same on the remote machine.However, when the remote user runs the script, the program rather executes on the testing server.

What am is doing wrong?

Help needed.

Regards.

#2
Alexander

Alexander

    It's Science!

  • Moderators
  • 4,124 posts
  • Location:Vancouver, Eh! Cleverness: 200
Remember, PHP is an executable running on the server and may only access executables on the server. It makes nearly no sense to be able to access a client's computer and execute a program, could you imagine the security implications?

To better explain, the client does not run the actual PHP script, the server does and then serves the result to the client.

We may be able to suggest a better method if you tell us what you want to achieve, I'd be glad to help give you an idea.
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.

#3
batowiise

batowiise

    Newbie

  • Members
  • PipPip
  • 17 posts
The remote machine has a program installed on it. The user wants this program integrated with the intranet application. It is clear now?

#4
Alexander

Alexander

    It's Science!

  • Moderators
  • 4,124 posts
  • Location:Vancouver, Eh! Cleverness: 200
The intranet server will still be hosting the script not the client, you must find out some other way with accessing your client's executable, such as a java applet or active X plugin.
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.

#5
xsonline

xsonline

    Learning Programmer

  • Members
  • PipPipPip
  • 48 posts
Why not look at JSon or SOAP? the client should always contact the server, not the other way around :).




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users