Discussions
Stay up-to-date with the latest news from NetSuite. You’ll be in the know about how to connect with peers and take your business to new heights at our virtual, in-person, on demand events, and much more.
Now is the time to ask your NetSuite-savvy friends and colleagues to join the NetSuite Support Community! Refer now! Click here to watch and learn more!
Stay in the Know
Be sure you're subscribed to NetSuite communication to stay in the know about monthly happenings, updates and announcements. Subscribe
Be sure you're subscribed to NetSuite communication to stay in the know about monthly happenings, updates and announcements. Subscribe
Adding a configurable timeout to PHP Toolkit
Here is a suggested patch to add configurable timeouts to the PHP Toolkit. It would be great to include it in the library.
[CODE]diff PHPToolkit/NSPHPClient.php PHPToolkit new/NSPHPClient.php
182c182
< global $nsaccount, $nsemail, $nsrole, $nspassword;
---
> global $nsaccount, $nsemail, $nsrole, $nspassword, $nstimeout;
215c215,217
< $options['connection_timeout'] = 5;
---
> if (!isset($options['connection_timeout'])) {
> $options['connection_timeout'] = isset($nstimeout) ? $nstimeout : 5;
> }
diff PHPToolkit/NSconfig.php PHPToolkit new/NSconfig.php
8a9
> $nstimeout = 5;[/CODE]
[CODE]diff PHPToolkit/NSPHPClient.php PHPToolkit new/NSPHPClient.php
182c182
< global $nsaccount, $nsemail, $nsrole, $nspassword;
---
> global $nsaccount, $nsemail, $nsrole, $nspassword, $nstimeout;
215c215,217
< $options['connection_timeout'] = 5;
---
> if (!isset($options['connection_timeout'])) {
> $options['connection_timeout'] = isset($nstimeout) ? $nstimeout : 5;
> }
diff PHPToolkit/NSconfig.php PHPToolkit new/NSconfig.php
8a9
> $nstimeout = 5;[/CODE]
0