Subj : run external php script
To   : Mortifis
From : Digital Man
Date : Sat Feb 09 2019 04:17 pm

 Re: run external php script
 By: Mortifis to All on Sat Feb 09 2019 03:57 pm

> I am trying to get a php script to run externally from an sbbs.ssjs script,
> I have this working on my Linux system but am having problems on my win7_x86
> system.
>
> I tried system.popen("c:\php\php.exe c:\sbbs\myscript.php " + someargs);
> which returns nothing

system.popen() only works on *nix-like OSes (not Windows).

> so I tried system.exec("c:\php\php.exe c:\sbbs\myscript.php " + someargs);
> which returns 1

Is that literally what you tried, or did you double-up those backslashes, as
would be necessary in a JavaScript string?

> So, my question is, how do I trap the result under windows, it is handled
> automagically under Linux

system.exec() will just run the command. If you want the output of the command,
you'll need to redirect the output to a file and read that file (on Windows).

                                           digital man

Synchronet "Real Fact" #88:
SBBSecho v3.00 was first committed to cvs.synchro.net on Apr-11-2016.
Norco, CA WX: 55.3�F, 60.0% humidity, 2 mph NW wind, 0.09 inches rain/24hrs

---
� Synchronet � Vertrauen � Home of Synchronet � [vert/cvs/bbs].synchro.net