->GetSPLF Problem

Post Reply
formaserve
Posts: 66
Joined: Mon Mar 23, 2009 11:11 am

->GetSPLF Problem

Post by formaserve » Fri Dec 11, 2015 5:55 pm

Hi all

Having a problem with the ->GetSPLF method. it does not return any data even though I can debug the parameters being passed & on a green screen input those values to DSPSPLF.

My script is the example of ->GetSPLF from the Zend documentation at http://files.zend.com/help/Zend-Server- ... ethods.htm

Nothing showing in the toolkit debug file, but Z-ray is showing a bad response error.
In the PHP.log the only entry is :
PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 31559680 bytes) in /usr/local/zendsvr6/gui/module/DevBar/views/dev-bar/web-api/1x9/dev-bar-get-custom-data.pjson.phtml on line 56

Any ideas?

Cheers
Andy Youens

mattsura
Posts: 12
Joined: Mon Apr 26, 2010 9:56 am

Re: ->GetSPLF Problem

Post by mattsura » Tue Jan 12, 2016 10:53 am

That function is trying to use more memory than php could use
How big is the spool you're trying to retrieve?

You can change the limit globally on php.ini, directive 'memory_limit'
Or to change it for this script only, add this line in your code:

ini_set('memory_limit', '256M');

formaserve
Posts: 66
Joined: Mon Mar 23, 2009 11:11 am

Re: ->GetSPLF Problem

Post by formaserve » Fri Jan 15, 2016 9:45 am

Its only a one page spool! Increasing the memory didnt have any effect.

Thanks anyway.

mattsura
Posts: 12
Joined: Mon Apr 26, 2010 9:56 am

Re: ->GetSPLF Problem

Post by mattsura » Sat Jan 16, 2016 3:44 pm

Yes, that memory error may be related with something going wrong inside zray itself

I tried the GetSPLF and it doesn't work well to me either
You can try the CW function which should work fine:

Code: Select all

<?php
error_reporting(E_ALL);
ini_set('display_errors','On');

require_once('ToolkitService.php');
require_once('iToolkitService.php');
include("CW/cw.php");
//replace 280 with your CCSID:
$options = array('I5_OPTIONS_RMTCCSID' => 280, 'I5_OPTIONS_JOBNAME' => "SPTEST");
$conn = i5_connect("localhost", "username", "password", $options);

/*
	string i5_spool_get_data (
	spool_name,
	jobname,
	username,
	job_number,
	spool_id)
*/
$txt = i5_spool_get_data("PIPPO3","QPRTJOB","MATTIA","036825","000386");
echo "<pre>".$txt."</pre>";
 
?> 

scottgcampbell
Posts: 187
Joined: Wed Apr 22, 2009 2:29 pm
Location: Edmonton, AB, Canada

Re: ->GetSPLF Problem

Post by scottgcampbell » Mon Jan 18, 2016 2:23 pm

You can also disable z-ray in that script, put a:

Code: Select all

zray_disable();
at the top of the script.

Scott

https://support.zend.com/hc/en-us/artic ... P-Requests

formaserve
Posts: 66
Joined: Mon Mar 23, 2009 11:11 am

Re: ->GetSPLF Problem

Post by formaserve » Tue Jan 19, 2016 1:22 pm

z-ray can also be turned off for the session using the z-ray toolbar, saves changing code.

Switching off zray made no difference to the original problem that ->getsplf does not work.

Anyone else having the same problem?

Cheers
Andy Youens

Post Reply