Re: PHP random errors

2017-03-14 Thread Paul Dennis via 4D_Tech
I have not managed to solve this problem of running 2 copies of 4D on same
machine both calling php. I have them running on reports 8002 and 8010 with
5 processes and also I tried this

auto_prepend_file = "E:/V15 R5 Compare
Client/Resources/php/Windows/_4D_Execute_PHP.php"
session.save_path = "E:/V15 R5 Compare Client/clientlocal/WebFolder"

I'm not sure which php.ini I'm supposed to be editing the one local to the
database of one local to the 4D application. It works fine  with a single
copy running.

Has anyone managed to solve this. Windows V15 r5.
Thanks
Paul



--
View this message in context: 
http://4d.1045681.n5.nabble.com/PHP-random-errors-tp5747969p5750765.html
Sent from the 4D Tech mailing list archive at Nabble.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
**

Re: PHP random errors

2016-10-26 Thread Justin Carr
On 26 Oct 2016, at 6:51 pm, Paul Dennis  wrote:
> 
> I have one app on port 8002 and the other on 8010 but I get error if I try to
> run php simultaneously on both.
> 
> Error code: 500
> FastCGI client error in context "{context}".
> Environment info: UseExternalServer = {use_ext}, ip = {ip}, port = {port},
> ExecutablePath = {path}.
> component: 'FCGI'
> task -6, name: 'P_2'

Hi Paul

I think you also have to adjust the php.ini file (in the Resources folder) for 
each application to set the session.save_path directive to separate values to 
avoid conflicts with each other.

regards
Justin
**
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
**

RE: PHP random errors

2016-10-26 Thread Thomas Maul
> Where is the documentation for this syntax? I can't find it in the Language 
> reference.
http://doc.4d.com/4Dv15R5/4D/15-R5/String.301-2936575.en.html

From Example table:
String(-1;"") "0x"
String(-1;"&$") "$"
String(0 ?+ 7;"") "0x0080"
String(0 ?+ 7;"&$") "$80"
String(0 ?+ 14;"")"0x4000"
String(0 ?+ 14;"&$")"$4000"

Talking about "unknown" but useful formats.
String(50.3;"") "50.3"  Always "." as decimal separator

Super useful if you are running on some European systems (such as German) with 
decimal comma but need to create files (xml, json, etc) with decimal point as 
separator.

Also often missed:
$mydate:=String(Current date;ISO Date;Current time) // returns 
2010-09-13T18:11:53

Nothing of that is really new...


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

**
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
**

Re: PHP random errors

2016-10-26 Thread Pat Bensky
Thomas,

The string(-1;"xxx") format does the trick. Where is the documentation for
this syntax? I can't find it in the Language reference.

On 26 October 2016 at 10:10, Thomas Maul  wrote:

> Mac/Win/version/modified setup?
>
> It might be more efficient to contact tech support to dig in details.
>
> Maybe this helps:
> http://doc.4d.com/4Dv15R5/4D/15-R5/SET-DATABASE-PARAMETER.
> 301-2936925.en.html
>
> Number of child processes to be created and maintained locally by the PHP
> interpreter of 4D
> Note: Under Mac OS, all the child processes share the same port. Under
> Windows, each child process uses a specific port number. The first number
> is the one set for the PHP interpreter; the other child processes increment
> the first one. For example, if the default port is 8002 and you launch 5
> child processes, they will use ports 8002 to 8006.
>
> If you are on Mac or you had not more than 5 child processes - contact
> tech support.
>
>
> 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
>
> **
> 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
> **
>



-- 
*
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
**

RE: PHP random errors

2016-10-26 Thread Thomas Maul
Mac/Win/version/modified setup?

It might be more efficient to contact tech support to dig in details.

Maybe this helps:
http://doc.4d.com/4Dv15R5/4D/15-R5/SET-DATABASE-PARAMETER.301-2936925.en.html

Number of child processes to be created and maintained locally by the PHP 
interpreter of 4D
Note: Under Mac OS, all the child processes share the same port. Under Windows, 
each child process uses a specific port number. The first number is the one set 
for the PHP interpreter; the other child processes increment the first one. For 
example, if the default port is 8002 and you launch 5 child processes, they 
will use ports 8002 to 8006.

If you are on Mac or you had not more than 5 child processes - contact tech 
support.


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

**
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
**

RE: PHP random errors

2016-10-26 Thread Paul Dennis
I have one app on port 8002 and the other on 8010 but I get error if I try to
run php simultaneously on both.

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



--
View this message in context: 
http://4d.1045681.n5.nabble.com/PHP-random-errors-tp5747969p5748166.html
Sent from the 4D Tech mailing list archive at Nabble.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
**

Re: PHP random errors

2016-10-25 Thread Pat Bensky
Thanks Thomas - that looks simpler. I'll try it.

Pat

On 18 October 2016 at 14:00, Thomas Maul  wrote:

> 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;"")
> ->  0x
>
> Or
> Substring(String(-1;"");3)
> ->  
>
>
>
>
>
> 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
> **




-- 
*
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
**