Can you call a PHP script using rexec?

Status
Not open for further replies.

Nytrinzix

Ars Tribunus Militum
1,989
I have to work within an existing (and partially antiquated) system that my client uses. They have an old Universe server that stores sensitive client data.

I am writing a script in PHP that will not be run through a web browser, but needs to be called in a similar way that it would via CRON. I need to call it on demand, though, and the Universe system will be doing the call. I need a way to have Universe call the script and pass it some data. I know that the Universe server uses rexec to call an old VB6 executable currently, and so I'm trying to figure out if/how to call a PHP script in a similar way.

Any insight to this would be great!
 

Daemonic

Ars Tribunus Militum
1,590
Nytrinzix":1l8xmnkm said:
I have to work within an existing (and partially antiquated) system that my client uses. They have an old Universe server that stores sensitive client data.

I am writing a script in PHP that will not be run through a web browser, but needs to be called in a similar way that it would via CRON. I need to call it on demand, though, and the Universe system will be doing the call. I need a way to have Universe call the script and pass it some data. I know that the Universe server uses rexec to call an old VB6 executable currently, and so I'm trying to figure out if/how to call a PHP script in a similar way.

Any insight to this would be great!

What version of UniVerse, and on what OS? I do a lot of work with UniVerse (sigh), and can maybe help you out here.

You can shell out (sh -c in UNIX, dos -c in a Windows world) and run any command the OS supports. You can use DATA commands to stack stuff on standard input and you can read from standard output (though it's often easier to just write it to a file on the system from within UniVerse).

For example, in a UniVerse Basic program, EXECUTE 'sh -c "/location/to/php/php /whereiam/scriptname"' CAPTURING OUTPUT will run said command, and the standard output will be in the OUTPUT var.
 
Status
Not open for further replies.