• php exec('jsexec')

    From Mortifis@VERT/EPHRAM to All on Fri Jun 12 11:04:57 2020
    I have a php script that calls exec('/sbbs/exec/jsexec blah blah blah',ã$result); but it does not return any result ... even exec('/sbbs/exec/jsexecã-v', $result); does return a result ... but exec('ls -ln /sbbs/exec/jsexec');ãdoes, as do other system commands ... possible jsexec is doing something toãstdout?ããThanksãã~Mortifisãã---ã þ Synchronet þ Realm of Dispair BBS - http://ephram.synchro.net:82ã
  • From Digital Man@VERT to Mortifis on Fri Jun 12 10:45:20 2020
    Re: php exec('jsexec')ã By: Mortifis to All on Fri Jun 12 2020 11:04 amãã > I have a php script that calls exec('/sbbs/exec/jsexec blah blah blah',ã > $result); but it does not return any result ... even exec('/sbbs/exec/jsexecã > -v', $result); does return a result ... but exec('ls -lnã > /sbbs/exec/jsexec'); does, as do other system commands ... possible jsexecã > is doing something to stdout?ããYou would to execute a script that writes to stdout (e.g. with "write", "writeln" methods). The status output of jsexec won't be captured by your php script since jsexec knows it's not being run from a console, it redirects status messages to /dev/null.ãã digital manããSynchronet/BBS Terminology Definition #87:ãUTF-8 = 8-bit Unicode Transformation FormatãNorco, CA WX: 75.2øF, 63.0% humidity, 2 mph E wind, 0.00 inches rain/24hrsã---ã þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.netã
  • From Mortifis@VERT/EPHRAM to Digital Man on Fri Jun 12 18:47:20 2020
    Re: php exec('jsexec')ã > By: Mortifis to All on Fri Jun 12 2020 11:04 amãã > > I have a php script that calls exec('/sbbs/exec/jsexec blah blah blah',ã > > $result); but it does not return any result ... evenã > > exec('/sbbs/exec/jsexec -v', $result); does return a result ... butã > > exec('ls -ln /sbbs/exec/jsexec'); does, as do other system commands ...ã > > possible jsexec is doing something to stdout?ãã > You would to execute a script that writes to stdout (e.g. with "write",ã > "writeln" methods). The status output of jsexec won't be captured by yourã > php script since jsexec knows it's not being run from a console, itã > redirects status messages to /dev/null.ãã > digital manããmy test php script gets no $response :ãã<?phpãexec('/sbbs/exec/jsexec mytest.js "Hello World"', $response);ããforeach($response as $key => $value) {ã echo "key $key - value $value<br>";ã}ããããmytest.js:ããload("sbbsdefs.js");ããfunction dump_objs(obj) {ã Object.keys(obj).forEach(function (e) {ã writeln( e + ': ' + JSON.stringify(obj[e]));ã });ã}ããif(!argv[0]) ã writeln('No argumants ... aborting ');ãelse ã dump_objs(argv);ããany ideas?ãã---ã þ Synchronet þ Realm of Dispair BBS -
    http://ephram.synchro.net:82ã
  • From Digital Man@VERT to Mortifis on Sun Jun 14 14:59:21 2020
    Re: Re: php exec('jsexec')ã By: Mortifis to Digital Man on Fri Jun 12 2020 06:47 pmãã > > Re: php exec('jsexec')ã > > By: Mortifis to All on Fri Jun 12 2020 11:04 amã >ã > > > I have a php script that calls exec('/sbbs/exec/jsexec blah blahã > > > blah', $result); but it does not return any result ... evenã > > > exec('/sbbs/exec/jsexec -v', $result); does return a result ... butã > > > exec('ls -ln /sbbs/exec/jsexec'); does, as do other system commandsã > > > ... possible jsexec is doing something to stdout?ã >ã > > You would to execute a script that writes to stdout (e.g. with "write",ã > > "writeln" methods). The status output of jsexec won't be captured by yourã > > php script since jsexec knows it's not being run from a console, itã > > redirects status messages to /dev/null.ã >ã > > digital manã >ã > my test php script gets no $response :ã >ã > <?phpã > exec('/sbbs/exec/jsexec mytest.js "Hello World"', $response);ã >ã > foreach($response as $key => $value) {ã > echo "key $key - value $value<br>";ã > }ã >ã >ã >ã > mytest.js:ã >ã > load("sbbsdefs.js");ã >ã > function dump_objs(obj) {ã > Object.keys(obj).forEach(function (e) {ã > writeln( e + ': ' + JSON.stringify(obj[e]));ã > });ã > }ã >ã > if(!argv[0])ã > writeln('No argumants ... aborting ');ã > elseã > dump_objs(argv);ã >ã > any ideas?ããNope, no ideas. I never tried executing jsexec from PHP.ãã digital manããThis Is Spinal Tap quote #35:ãJeanine Pettibone: You don't do heavy metal in Dubly, you know.ãNorco, CA WX: 82.1øF, 39.0% humidity, 14 mph ENE wind, 0.00 inches rain/24hrsã---ã þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.netã
  • From Mortifis@VERT/EPHRAM to Digital Man on Sun Jun 14 20:13:03 2020
    Re: Re: php exec('jsexec')ã > By: Mortifis to Digital Man on Fri Jun 12 2020 06:47 pmãã > > > Re: php exec('jsexec')ã > > > By: Mortifis to All on Fri Jun 12 2020 11:04 amãã > > > > I have a php script that calls exec('/sbbs/exec/jsexec blah blahã > > > > blah', $result); but it does not return any result ... evenã > > > > exec('/sbbs/exec/jsexec -v', $result); does return a result ... butã > > > > exec('ls -ln /sbbs/exec/jsexec'); does, as do other system commandsã > > > > ... possible jsexec is doing something to stdout?ãã > > > You would to execute a script that writes to stdout (e.g. withã > > > "write", "writeln" methods). The status output of jsexec won't beã > > > captured by your php script since jsexec knows it's not being run fromã > > > a console, it redirects status messages to /dev/null.ãã > > > digital manã > > }ãããã > > mytest.js:ãã > > load("sbbsdefs.js");ãã > > function dump_objs(obj) {ã > > Object.keys(obj).forEach(function (e) {ã > > writeln( e + ': ' + JSON.stringify(obj[e]));ã > > });ã > > }ãã > > if(!argv[0])ã > > writeln('No argumants ... aborting ');ã > > elseã > > dump_objs(argv);ãã > > any ideas?ãã > Nope, no ideas. I never tried executing jsexec from PHP.ãã > digital manããguess writing to a file and reading it back will have to do, I'll play with itãand see. Thanks Digital Man, I appreciate the reply.ãã~Mortifisãã---ã þ Synchronet þ Realm of Dispair BBS - http://ephram.synchro.net:82ã