4D Server - "unregister task" in system.log - v17 macOS

2018-09-02 Thread James Brown via 4D_Tech
The system.log on our 4D Server v17.0 is getting heaps of lines like this:

Sep  3 11:11:42 Sapphire-Server-2 SapphireOne17.0[720]: [SapphireOne17.0.APPL] 
4D server user (0x7fe235ddd450), unregister task, 4d task (0x7fe23d6c5a10), 
db4d task (0x0), 2 task(s) left, task #147719
Sep  3 11:11:57 Sapphire-Server-2 SapphireOne17.0[720]: [SapphireOne17.0.APPL] 
4D server user (0x7fe2204f42c0), unregister task, 4d task (0x7fe66b58b410), 
db4d task (0x0), 3 task(s) left, task #216463
Sep  3 11:12:08 Sapphire-Server-2 SapphireOne17.0[720]: [SapphireOne17.0.APPL] 
4D server user (0x7fe66aca1aa0), unregister task, 4d task (0x7fe66b583be0), 
db4d task (0x0), 4 task(s) left, task #89735
Sep  3 11:12:11 Sapphire-Server-2 SapphireOne17.0[720]: [SapphireOne17.0.APPL] 
4D server user (0x7fe235bf0320), unregister task, 4d task (0x7fe235bf04e0), 
db4d task (0x0), 2 task(s) left, task #140343

Running macOS 10.13.6, 4D is Version 17 build 17.225365. 64-bit server and 
clients.

There’s an unsolved topic about this on the German forum: 
http://forums.4d.com/Post/EN/21655378/1/21655589#21655589

Is it a bug in v17?

Thanks,

James.
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Sending multipart emails to Yahoo

2018-09-02 Thread Keisuke Miyako via 4D_Tech
what you could do
is compose an email with a similar structure manually,
send to self and compare the headers with the one created by code.

the gobbledygook headers are probably not involved,
focus on the boundary and the content-type that defines each part.

> 2018/09/03 8:14、Pat Bensky via 4D_Tech <4d_tech@lists.4d.com>のメール:
> To be honest, that stuff is all gobbledygook to me :) I have no idea what
> to look out for, that would indicate a problem.
> Can you see anything obvious in this header info:




**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Sending multipart emails to Yahoo

2018-09-02 Thread Pat Bensky via 4D_Tech
Hi Miyako,
To be honest, that stuff is all gobbledygook to me :) I have no idea what
to look out for, that would indicate a problem.
Can you see anything obvious in this header info:

Mime-Version: ⁨1.0⁩

X-Spam-Cmauthority: ⁨v=2.2 cv=bZkbaKHB c=1 sm=1 tr=0
a=dalC6LMGHhPl1sqVw4/W9Q==:17 a=a4z1OhtcXpMA:10 a=dapMudl6Dx4A:10
a=TjO1lxBTeyY6fmmDdRsA:9⁩

X-Klms-Rule-Id: ⁨1⁩

⁨<2413273260-165191...@mailhost.firstimage.net>⁩

Delivery-Date: ⁨Fri, 31 Aug 2018 12:57:57 +0100⁩

X-Klms-Message-Action: ⁨clean⁩

X-Footer: ⁨Zmlyc3RpbWFnZS5uZXQ=⁩

X-Spam-Status: ⁨No, score=2.0 required=5.0 tests=BASE64_LENGTH_79_INF,
HTML_MESSAGE,MSGID_FROM_MTA_HEADER,RCVD_IN_DNSWL_BLOCKED,T_TVD_MIME_EPI,
URIBL_BLOCKED shortcircuit=no autolearn=disabled version=3.4.1⁩

Content-Type: ⁨multipart/related;
boundary=8D2E46D195CD4DB0B225F7DB49EEC018⁩

X-Klms-Antivirus: ⁨Kaspersky Security 8.0 for Linux Mail Server, version
8.0.1.705, bases: 2018/08/31 05:02:00 #8782382; khse: 2014-01-23 rollback⁩

Received: ⁨from mail by mail99.extendcp.co.uk with spamvirus-scanned (Exim
4.90_1) id 1fvi3o-000G7P-Tc for pat.ben...@catbase.com; Fri, 31 Aug 2018
12:57:57 +0100⁩

Received: ⁨from mailhost.firstimage.net ([81.128.180.121]) by
mail99.extendcp.co.uk with esmtps (TLSv1.1:ECDHE-RSA-AES256-SHA:256) (Exim
4.90_1) id 1fvi3o-000G4H-Pt for pat.ben...@catbase.com; Fri, 31 Aug 2018
12:57:56 +0100⁩

Received: ⁨from [192.168.0.11] ([62.30.219.230]) (authenticated user
4d.ser...@firstimage.net) by mailhost.firstimage.net (Kerio Connect 9.2.5
patch 3) with ESMTPSA (using TLSv1.2 with cipher
ECDHE-RSA-AES256-GCM-SHA384 (256 bits)) for pat.ben...@catbase.com; Fri, 31
Aug 2018 12:56:37 +0100⁩





On Sun, 2 Sep 2018 at 23:12, Keisuke Miyako via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> I agree in that of all the possible violations,
>
>  bad header information
>
> seems most likely.
>
> you might want to send the same message to a non-yahoo account,
> receive with an email client (not web) and examine the raw SMTP source.
>
>
> **
> 4D Internet Users Group (4D iNUG)
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **



-- 
*
CatBase - Top Dog in Data Publishing
tel: +44 (0) 207 118 7889
w: http://www.catbase.com
skype: pat.bensky
*
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: UUID query ignores characters 33 to n.... didn't know that!

2018-09-02 Thread Keisuke Miyako via 4D_Tech
it's not that "query ignores characters",
it has more to do with how string-to-uuid conversion works.

to understand how it works, create a UUID field, create a record, assign a 
value.

e.g.

CREATE RECORD([Table_1])
[Table_1]Field_2:="www"

you will notice that Field_2 which is a UUID,
evaluates as 7720202020202020202020202020 in the debugger.

another example

[Table_1]Field_2:="abcd"
61626364202020202020202020202020

but

[Table_1]Field_2:="abcdabcdabcdabcdabcdabcdabcdabcd"
ABCDABCDABCDABCDABCDABCDABCDABCD

so if the string isn't a 32-digit hex,
it is first transformed to look like one (UTF-8 character code, padding by 
spaces).

then it is evaluates as integer (UUID).

then it is converted back to string for display (hence the uppercase).





**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

UUID query ignores characters 33 to n.... didn't know that!

2018-09-02 Thread Jim Labos - infobase via 4D_Tech
Mac OS Yosemite, 4D v15.6

If I am querying a UUID field, I use a UUID var of course. However there is
no UUID variable type so like everyone I use a text var. What I never
noticed before as I didn't need to check, is that *if* the var itself
contains the UUID in the first 32 characters but has extra characters after
it then 4D still finds a match!

So let's say the value in the UUID field's value is
607BFEA7CE2244EB9B00C2330E4E32F5

if my var $txt_UUID:="607BFEA7CE2244EB9B00C2330E4E32F5"+"xxx"

Query([table1];[table1]UUID_FIELD=$txt_UUID)

will still find the record.

So in this case
607BFEA7CE2244EB9B00C2330E4E32F5"=607BFEA7CE2244EB9B00C2330E4E32F5xxx"

I don't think this is a bug as 4D is using a special format for the UUID.
However I falsely assumed that you needed an exact match for that type of
query but it seems not.

What do you all think? Is this a bug? An annoying gotcha? Did you already
all know this and I am the only one who didn't?

Cheers

Jim Labos - infobase



-
Jim Labos - infobase
--
Sent from: http://4d.1045681.n5.nabble.com/4D-Tech-f1376241.html
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Connection to 4D via ODBC makes connection but cannot see tables

2018-09-02 Thread Keisuke Miyako via 4D_Tech
to narrow down the possible cause,
why not try with a 4D to 4D direct connection ("pass thru", no ODBC), then a 4D 
to 4D ODBC connection?

2018/09/03 1:50、mferguson--- via 4D_Tech 
<4d_tech@lists.4d.com>のメール:
 tried to do an ODBC query to list tables but it said there was no connection. 
What am I missing?



**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Sending multipart emails to Yahoo

2018-09-02 Thread Keisuke Miyako via 4D_Tech
I agree in that of all the possible violations,

 bad header information

seems most likely.

you might want to send the same message to a non-yahoo account,
receive with an email client (not web) and examine the raw SMTP source.


**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Storage + New shared object

2018-09-02 Thread Keisuke Miyako via 4D_Tech
typo:

$a.prop:="whatever"

you can simply
$a:="whatever"


**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Storage + New shared object

2018-09-02 Thread Keisuke Miyako via 4D_Tech
as others have correctly pointed out,
each sub-object or sub-collection you add to a shared object must themselves be 
shared objects or shared collection.

regarding object notation:

if you do something like

$a:=New shared object
$b:=New shared object("a";$a)

then there is no need to

$b.a.prop:="whatever"

you can simply

$a:="whatever"

and the result will be the same (you save 4D from searching the object notation 
path)

another subtle catch is related to grouping and singleness.

for example, the following would not work:

Use (Storage)

$a:=New shared object("a";New shared object("b";"whatever"))

Storage.a:=New shared object("a";$a)

End use

because by creating a cascaded shared object in the first line, you create a 
new group,
which can not transfer to a different group (Storage, in this case)

you have to procedurally group objects so that they don't transfer ownership.

Use (Storage)

Storage.a:=New shared object("a";New shared object("b";"whatever"))

$a:=Storage.a
$b:=$a.a

End use





**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Storage + New shared object

2018-09-02 Thread Kirk Brooks via 4D_Tech
David,
You need to define the objects as shared objects. You will also want to use
collections instead of arrays because I don't think you can have a shared
array.

This works without error :

*C_COLLECTION*($DeleteRecord_ob)

$DeleteRecord_ob:=*New shared collection*


*C_OBJECT*($DeleteRecord_PN_ob)

$DeleteRecord_PN_ob:=*New shared object*


*C_OBJECT*($Delete_ob;$Delete_PN_ob)

$Delete_ob:=*New shared object*

$Delete_PN_ob:=*New shared object*


*Use* (*Storage*)

*Storage*.t:=*New shared object*("DeleteRecord";$Delete_ob
;"DeleteRecord_PN";$Delete_PN_ob)

*End use*



*Use* (*Storage*.t)

*Storage*.t.DeleteRecord:=$DeleteRecord_ob  // this line generated the
error message

*Storage*.t.DeleteRecord_PN:=$DeleteRecord _PN_ob  // so does this line
error with same message

*End use*




On Sat, Sep 1, 2018 at 8:35 PM David Ringsmuth via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> I’m trying to add an object array to Storage.
>
> The documentation says that Objects can be a share storage value.
>
> I keep getting the message “Not supported value type in a shared object or
> shared collection.”
>
> In the below code I broke apart the assignments for easiest debugging.
>
> ARRAY TEXT($DeleteRecord;Get last table number)
> ARRAY LONGINT($DeleteRecord_PN;Get last table number)
>
> C_OBJECT($DeleteRecord_ob)
> OB SET ARRAY($DeleteRecord_ob;"DeleteRecord";$DeleteRecord)
>
> C_OBJECT($DeleteRecord_PN_ob)
> OB SET ARRAY($DeleteRecord_PN_ob;"DeleteRecord_PN";$DeleteRecord_PN)
>
> C_OBJECT($Delete_ob;$Delete_PN_ob)
>
> Use (Storage)
> Storage.t:=New shared
> object("DeleteRecord";$Delete_ob;"DeleteRecord_PN";$Delete_PN_ob)
> End use
> Use (Storage.t)
> Storage.t.DeleteRecord:=$DeleteRecord_ob // this line generated
> the error message
> Storage.t.DeleteRecord_PN:=$DeleteRecord _PN_ob// so does this
> line error with same message
> End use
>
> Please help!
>
> David Ringsmuth
>
> **
> 4D Internet Users Group (4D iNUG)
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **



-- 
Kirk Brooks
San Francisco, CA
===

*We go vote - they go home*
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Storage + New shared object

2018-09-02 Thread Christian Sakowski via 4D_Tech
David,

use the dot-Notation and use Collections as Arrays.
--

Grüße/Regards,
[heubach-media] | Christian Sakowski
christian.sakow...@heubach-media.de
iChat/AIM: SakowskiF
Tel: +49/(0)40/52 10 59-23



> Am 02.09.2018 um 05:35 schrieb David Ringsmuth via 4D_Tech 
> <4d_tech@lists.4d.com>:
> 
> I’m trying to add an object array to Storage.
> 
> The documentation says that Objects can be a share storage value.
> 
> I keep getting the message “Not supported value type in a shared object or 
> shared collection.”
> 
> In the below code I broke apart the assignments for easiest debugging.
> 
> ARRAY TEXT($DeleteRecord;Get last table number)
> ARRAY LONGINT($DeleteRecord_PN;Get last table number)
> 
> C_OBJECT($DeleteRecord_ob)
> OB SET ARRAY($DeleteRecord_ob;"DeleteRecord";$DeleteRecord)
> 
> C_OBJECT($DeleteRecord_PN_ob)
> OB SET ARRAY($DeleteRecord_PN_ob;"DeleteRecord_PN";$DeleteRecord_PN)
> 
> C_OBJECT($Delete_ob;$Delete_PN_ob)
> 
> Use (Storage)
>   Storage.t:=New shared 
> object("DeleteRecord";$Delete_ob;"DeleteRecord_PN";$Delete_PN_ob)
> End use 
> Use (Storage.t)
>   Storage.t.DeleteRecord:=$DeleteRecord_ob // this line generated the 
> error message
>   Storage.t.DeleteRecord_PN:=$DeleteRecord _PN_ob// so does this line 
> error with same message
> End use
> 
> Please help!
> 
> David Ringsmuth
> 
> **
> 4D Internet Users Group (4D iNUG)
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **


--
heubach media
Osterfeldstr. 12-14 | Haus 1 | Eingang Nord
22529 Hamburg
tel: 040 / 52 10 59 - 10 | fax: -99
mail: i...@heubach-media.de
home: www.heubach-media.de
Geschäftsführer|CEO: Matthias Heubach

Mieten Sie Ihre Computer, iPads & Drucker für Ihre Events bei:
http://www.milo-rental.com

Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen.
Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten 
haben,
informieren Sie bitte sofort den Absender und vernichten Sie diese Mail.
Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht 
gestattet.
 
This e-mail may contain confidential and/or privileged information.
If you are not the intended recipient (or have received this e-mail in error)
please notify the sender immediately and destroy this e-mail.
Any unauthorized copying, disclosure or distribution of the
material in this e-mail is strictly forbidden.
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

WS SEND BLOB encoding?

2018-09-02 Thread JOHN BAUGHMAN via 4D_Tech
I have a Web App running on the same machine as 4D Sever and all requests to 4D 
are done over localhost. I am currently displaying PDFs by having the Web App 
get the path to the pdf file from 4D then serve the file to it’s viewer in the 
browser.

This all works fine, but after some testing have found that it is significantly 
slower than serving the blob directly from 4D with WS SEND BLOB. I have only 
been able to get this to work if I make the request for the pdf directly from 
the browser, not via the Web App. In other words using the address bar of the 
browser or the HTML viewer of the Web App in the browser. The problem is that 
this exposes the request including the path to the PDF on the server. 

I need to have the Web App on the server make the request to 4D over local host 
then serve the PDF to the web app’s viewer in the browser.  The closest I could 
get to being successful was by having the web app create a simple web page with 
the returned data and send the page to the web app’s viewer in the browser…

//web app request
pdfBlob = socket1.Get("http://127.0.0.1:9000/getDocumentBlob?path="+docPath, 
30) //send request to 4D
pdfBlob = EncodeBase64(pdfBlob,0)

//create the web page










//send the page to the viewer in the browser

//4D response:
$path:=Convert path POSIX to system(WebRequestGetFormField ("path"))
C_BLOB($blob)
DOCUMENT TO BLOB($path;$blob)
WEB SEND BLOB($blob;"application/pdf")

All I get, however, is “TESTING TESTING” followed by a grey block where the pdf 
would be displayed. It has been suggested to me that the problem may be 
encoding and the following was suggested for encoding the response…

pdfBlob = EncodeBase64(DefineEncoding(pdfBlob ,Encodings.UTF8),0). //still a 
grey block

Not completely understanding how encoding really works I am not sure how to ask 
this, but what encoding is 4D using to send the PDF blob. Or can somebody 
explain why this doesn’t work.

Thanks,

John

 
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Connection to 4D via ODBC makes connection but cannot see tables

2018-09-02 Thread mferguson--- via 4D_Tech
Hi,

I am using LibraOffice, the open source equivalent Microsoft Office, to make an 
ODBC connection to a v16 database. LibraOffice sees the 4D ODBC 32 bit driver 
and verifies the connection on test, but says that there are no tables in the 
database. I have not set up the 4D password system so the default schema should 
be open access. I tried to do an ODBC query to list tables but it said there 
was no connection. What am I missing? 

Thanks,

Michael


**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**