There is a command you can use in a CL program to open a program on the PC. However, I believe you have to have a session of Access for Windows (Client Access) open. I doubt it will work when using a browser to access the IBM i.

Thanks,
Kelly

-----Original Message-----
From: WEB400 [mailto:web400-bounces@xxxxxxxxxxxx] On Behalf Of Kevin Bucknum
Sent: Thursday, December 04, 2014 2:29 PM
To: Web Enabling the IBM i (AS/400 and iSeries)
Subject: Re: [WEB400] trying to use EXEC with Zend

Unless the PC is also running the PHP server, you can't do this.

-----Original Message-----
From: WEB400 [mailto:web400-bounces@xxxxxxxxxxxx] On Behalf Of Larry Kleinman
Sent: Thursday, December 04, 2014 2:11 PM
To: web400@xxxxxxxxxxxx
Subject: [WEB400] trying to use EXEC with Zend

I want my PHP script to run a DOS command on the PC whose browser opened

the script, It looks like EXEC should do this, but no matter what
command I use - including easy stuff like DIR or IPCONFIG - I get a "file
not found" message. For example, if the script contains

$test= exec('dir 2>&1', $output);
echo $test;
echo '<BR>';
var_dump($output);

I get

sh: dir: not found.
array(1) { [0]=> string(20) "sh: dir: not found." }


Any ideas?

Larry Kleinman
Kleinman Associates, Inc.
212-949-6469
--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing list To post a message email: WEB400@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at http://archive.midrange.com/web400.




Kevin Bucknum
Senior Programmer Analyst
MEDDATA/MEDTRON
Tel: 985-893-2550

--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing list To post a message email: WEB400@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at http://archive.midrange.com/web400.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.