MacOS? Especially on Mac the PHP interpreter sometimes "hang".
Then this happens best is to wait half a second, then try it again.

Usually this happens when you do a lot of calls in a row, which I could assume 
when you want to convert decimal to hex.

For such mass operations, either use one larger PHP code where you pass an 
array and return an array (which will reduce the number of calls drastically) 
or consider to use 4D directly, which is faster anyway.

To convert dec to hex you might want to use 4D's string command, like:

String(-1;"&x")
->      0xFFFFFFFF

Or
Substring(String(-1;"&x");3)
->      FFFFFFFF





4D Deutschland GmbH
Geschäftsführer Laurent Ribardière             Telefon: +49-89-856 33 43-0
Amtsgericht München HRB 92258                  Fax:     +49-89-856 33 43-99
Obere Hauptstrasse 2                           E-Mail:  thomas.m...@4d.com
85386 Eching - Deutschland                     Web:     www.4D.com

-----Original Message-----
From: 4D_Tech [mailto:4d_tech-boun...@lists.4d.com] On Behalf Of Pat Bensky
Sent: Tuesday, October 18, 2016 1:29 PM
To: 4D iNug Technical <4d_tech@lists.4d.com>
Subject: PHP random errors

For some time I've been using this code to convert decimal to hexadecimal:

$phpOK:=PHP Execute("";"dechex";$hex;$code)

​Lately it has started throwing up errors randomly. I'll get:

*Error when executing the method "ConvertDecimalToHexadecimal" at line number 
43*

*FastCGI client error in context "{context}".* *Environment info: 
UseExternalServer = {use_ext}, ip = {ip}, port = {port}, ExecutablePath = 
{path}.*

*Error code: 500*
*FastCGI client error in context "{context}".* *Environment info: 
UseExternalServer = {use_ext}, ip = {ip}, port = {port}, ExecutablePath = 
{path}.*
*component: 'FCGI'*
*task 57, name: '1-Publishing Project '*


And then I run the same code again and the error occurs with a different 
character.

Any ideas?

Thanks

Pat
--
*************************************************
CatBase - The Database Publishing Solution
tel: +44 (0) 207 118 7889
w: http://www.catbase.com
skype: pat.bensky
*************************************************
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**********************************************************************
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**********************************************************************

Reply via email to