Is to cumbersome? Maybe. The fact is that CL is the native, default shell
on IBM i.

I did learn QSHELL and I have used the QSH command, but it hasn't been all
smooth sailing. Here is how it can get cumbersome...

I eventually learned that QSH wasn't ideal when running in batch because it
causes 2 extra jobs to start. We started getting errors when the system
was busy and a job using PHP started when the subsystem was nearly full.
The necessary child processes could not be spawned. Had to find a solution
in a hurry. After some digging around, I found about about QP2SHELL and
now I write CL wrappers around every PHP script that might need to run in
batch. That way programmers can call my PHP script via a CL command and
the script can be ran in a batch process without causing problems. A CL
command would have prevented that whole experience and could save me a from
having to write CL wrappers.

Zend saw value in consolidating Apache servers to make life easier and make
things a little cleaner. I'm just suggesting a CL command for running PHP
would just make things a little cleaner and would feel more "native".

It's just a suggestion that might save someone some grief down the road.


web400-bounces@xxxxxxxxxxxx wrote on 11/11/2009 10:47:31 AM:

[image removed]

Re: [WEB400] Suggestion: CL Command for PHP Scripts

Mike Pavlak

to:

Web Enabling the AS400/iSeries

11/11/2009 10:48 AM

Sent by:

web400-bounces@xxxxxxxxxxxx

Please respond to Web Enabling the AS400 / iSeries

Matt,

Is the following command to cumbersome?

qsh cmd('/usr/local/zend/core/bin/php -f +
/www/zendcore/htdocs/printorderPDF.php')

This is an example of invoking the CLI module of PHP from a CL program.
The CLI is /usr/local/zend/core/bin/php and the PHP script is
/www/zendcore/htdocs/mpavlak/php102/PHP102W3Ex3.php.

Let us know if this works for you. This format should work for ANY
qshell function and is a great way to offload work into an asynchronous
process in your PHP scripts. There is also a new feature that is coming
in Zend Server called the Job Queue function that allows your PHP
scripts to schedule jobs via the Zend Server system and you can track
them to successful completion.

Regards,

Mike

mike.p@xxxxxxxx Cell: (408)679-1011 Office: (815)722-3454



-----Original Message-----
From: web400-bounces@xxxxxxxxxxxx [mailto:web400-bounces@xxxxxxxxxxxx]
On Behalf Of MattLavinder@xxxxxxxxxxxxxxxxxxx
Sent: Wednesday, November 11, 2009 8:46 AM
To: web400@xxxxxxxxxxxx
Subject: [WEB400] Suggestion: CL Command for PHP Scripts



Mike said:
And, as Jon alluded to, Zend Server for IBM i should have only one
Apache server making this stuff a who lot easier!

Mike-,

Glad to hear about this. I have another suggestion for Zend. It'd be
great if you guys could include a CL command for running PHP CLI
scripts.
This would be consistent with how IBM and many third-parties treat PASE.
Usually they create CL commands so there's no need to bring up QSHELL.
Moving to a single instance of Apache is a big step in making PHP appear
much more native. A CL command for running PHP scripts would accomplish
the
same sort of thing.

Just my two cents.

Matt

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
______________________________________________________________________
--
This is the Web Enabling the AS400 / 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.

--
This is the Web Enabling the AS400 / 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.


______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
______________________________________________________________________



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.