RE: [PHP] Include Problem



-----Original Message-----
From: Wei, Alice J. [mailto:ajwei@xxxxxxxxxxx]
Sent: Tuesday, June 24, 2008 4:07 PM
To: Boyd, Todd M.; php-general@xxxxxxxxxxxxx
Subject: RE: [PHP] Include Problem

---8<--- snip

I think that the variables passed to will be used by that code
to
do perform some operations on another remote machine, (according to
what I got from my client, he calls this behind the scenes to avoid
users screw up the front end, and he is thinking of using C, Perl
or
Python), which is why I am hoping that I can produce one single
script,
and have it execute some script without the user pushing any button.
I
don't think I plan on "scraping" websites. However, if you are
suggesting that it is easier to do in Ajax to do what I am intending
to
do here, I would love to check it out and forget about PHP
(hopefully
not).

Most of the documentation I have been seeing on exec() seems
to
be executing UNIX commands at
http://us2.php.net/manual/en/function.exec.php. One main issue,
which
I
am not sure if it is entirely relevant, is that I am using PHP on
Windows with my current script, (the one to execute things from),
while
the script that would be executed is located on a Linux machine.
Would
this be an issue when I am doing this with what I am trying to do
here?

Alice,

exec() will execute Windows commands, as well. However, I'm not sure I
understand the reason for separating your script into two files--the
remote and the local scripts.

To answer your question, I am separating these because the script
that will be placed on the remoate server is filled with dense
calculation operations, and putting these on the same server as the
one
I am writing and running from the local machine would possibly take up
too much resources of the local server, and thus this only interacts
with the local server I am working with and not with the client
machine.

I will assume you are gathering data in your script (local), shipping
this off to a script on the client's machine (remote), and passing a
program (C/Python/Whatever) values you gathered using your script
(local).

---

That would be correect, although I am not passing this to a
client
as I mentioned previously, and therefore everything would be ideally
executed directly without any person to invoke the script.

Under this assumption, I would gather the data via
form/extraction/upload/whatever, and use cURL (a PHP library) to
"visit"
the remote script, passing values either via GET or POST. The remote
script would then parse these values and send them to the appropriate
exec() command.

That sounds like something I have to do, but the question is,
if
I don't have anyone pushing any button to invoke the script, how would
it execute without using GET or POST before it uses exec()?

Hope this makes a little more sense now.

Alice,

I'm not sure I follow you. Are you speaking of the local script or the
remote script as far as automation? The local script is executed when a
user requests it. The remote script will be executed when your local
script uses cURL to "visit" it. No users pressing buttons involved to my
knowledge.

Unless... is it a form? I'm a bit lost now. I'm not "Midwestern tourist
in Malaysia" lost, but I'm definitely a bit confused.


Todd Boyd
Web Programmer



.



Relevant Pages

  • Re: ASP.NET Causing execution of JavaScript on the client side
    ... I am not sure what is the most elegant way of doing this. ... When you meet the condition where you need to execute the client side ... script, you can redirect to your page with some parameter in the url. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Will Linux become as vulnerable as MS ??
    ... > beeing vulnerable to viruses. ... > that they know are executable, and execute intentionally. ... >> Linux, each distro is a little different, and even within the distro, ... > Since clicking on a script is easier than typing it's name, ...
    (comp.os.linux.security)
  • Re: Small, understandable Forth
    ... intelligence from the word to the script. ... niclos file script files, but only in the directory in which they are ... \ there are required support vocabularies, ... RDROP EXECUTE DEFINITIONS; ...
    (comp.lang.forth)
  • Re: [Full-Disclosure] ColdFusion cross-site scripting security vulnerability of an error page
    ... > execute the arbitrary javascript and HTML code which the attacker ... > It is possible to display the contents transmitted from the client ... > cross-site scripting attack can be executed. ... the script will be executed when the script for an attack ...
    (Full-Disclosure)
  • CGIscript.net - csMailto.cgi - Remote Command Execution
    ... CGIscript.net - csMailto.cgi - Remote Command ... csMailto is a perl cgi formmail script developed by ... execute command on server and mail output to anyone ...
    (Bugtraq)