You don't mention any version information in your post.


The Toolkit Instance will contain the last error.

$ret = $conn->PgmCall('ISSSRV003', ISS_SW_LIBRARY, $param, NULL, array('func'=>'UPDATEDRVDEBINFO'));
print"Ret = " . $ret;
if ($ret) {
... success ...
} else {
$result = "Execution failed." . $conn->getLastError();
}



---- We added a call to another service program into ISSSRV003
This makes it sound like it can't find the other service program.

Are the service programs in the same library?

Run this command and see what library is listed for the other service program.

DSPSRVPGM SRVPGM(ISSSRV003) DETAIL(*SRVPGM)

If it is *LIBL, then you will need to make sure that the second library is in the connection's library list.


Here is where the Toolkit log is by default on Zend Server 8.5
/usr/local/zendsvr6/var/log/toolkit.log

On Zend Server 9.1 is in the same subfolder:
/usr/local/zendphp7/var/log/toolkit.log

The setting that controls where the log file resides is in the "toolkit.ini" file.

The ini file can also activate a Toolkit debug logging mode:

debug = false
debugLogFile = "/usr/local/zendphp7/var/log/tkit_debug.log"

On our system the toolkit files were generally found under the zend server folder:
/usr/local/zendsvr6/share/ToolkitAPI

On 9.1 it should have a symbolic link under the share. Otherwise it's probably in var/libraries.
/usr/local/zendphp7/share/ToolkitAPI
/usr/local/zendphp7/var/libraries/PHP_Toolkit_for_IBMI_i/default/library
/usr/local/zendphp7/var/libraries/PHP_Toolkit_for_IBMI_i/1.6.1/library

Locate the Toolkit folder and open the ini file to determine where the log is going.


Chris Hiebert
Senior Programmer/Analyst
Disclaimer: Any views or opinions presented are solely those of the author and do not necessarily represent those of the company.


-----Original Message-----
From: WEB400 [mailto:web400-bounces@xxxxxxxxxxxx] On Behalf Of Don Brown
Sent: Wednesday, June 28, 2017 6:54 PM
To: Web400@Midrange. Web400 <web400@xxxxxxxxxxxx>
Cc: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
Subject: [WEB400] PHP Call to Service program fails

Hello

I have posted this on web400 and midrange as I am not sure if it is php
(web) issue or rpg issue and I have spent so many hours trying to find an answer ...

We have this piece of code ...

$ret = $conn->PgmCall('ISSSRV003', ISS_SW_LIBRARY, $param, NULL, array('func'=>'UPDATEDRVDEBINFO'));
print"Ret = " . $ret;
if (isset($ret['io_param']['returnCode'])) {
$returnCode = $ret['io_param']['returnCode'];
if ($returnCode === '1') {
$result = 'Update failed. If update fails again please report the issue. (1)';
} elseif ($returnCode === '0') {
$result = '**OK';
} else {
$result = "Unable to update the contact details. Unknown Return code ({$returnCode})"; // Unknown failure
}
} else {
$result = "Execution failed.";
}

The service program ISSSRV003 and procedure UPDATEDRVDEBINFO do exist and have been tested in interactive environment.

We added a call to another service program into ISSSRV003 procedure UPDATEDRVDEBINFO like this;

rSaveDrv = SaveDrvContact(pToken:mdrmtu:pPhone:pMobile:pEmail);

If we comment this line out the above call to UPDATEDRVDEBINFO works perfectly.
If it is included in the program we get $result = "Execution failed."; which indicates the call to the service program procedure failed.

To further confuse the issue, if the line is commented out I can put
ISSSRV003 in debug from Rdi for user PHPUSER and when we execute the PHP code the program stops in debug and I can step through the program, but if we put the line above back in and do the test again the program does not appear in the debug session. And to make sure all was correct we removed the line again and did the debug test again and the program stopped in the debug session.

The XMLSERVICE job has the correct library list and if we copy that library list to the green screen interactive environment and do a test call it works perfectly. We even tried this logged on as PHPUSER to see if it may be an authority thing - Nope!

I just can not find any error message anywhere - not in the ZEND Http jobs, Not in the Zend subsystem jobs, Not in the /LOGS files - Nothing.

Any suggestions where I can find what is causing this would really be appreciated.

Thank you



Don Brown
--
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 ...

Follow-Ups:

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.