Re: Run v15.4 in demo mode

2021-08-26 Thread Perkins, Bradley D via 4D_Tech
Thanks to everyone who commented and reached out privately.

Based on all comments here, my best bet is to plan to visit the site and set up 
the old Server and client which would have full licenses. We opted out of the 
partner program when we retired the systems a few years back so any prior 
partner licenses have expired.  A key point as Miyako pointed out is that no 
demo mode has been available since v2003 and only the latest versions can be 
run with an evaluation license.

Thanks,
Brad Perkins

**
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
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: [EXTERNAL] Run v15.4 in demo mode

2021-08-25 Thread Perkins, Bradley D via 4D_Tech
It sounds like I may need to arrange to visit their site. My main question was 
about running 4D v15.4 in demo mode on an older OS. They/I were a partner for 
over 20 years, but stopped once the 4D systems were retired. I recall some 4D 
versions offered demo mode but at some point that may have changed.

Their production server which is in storage still has the licenses installed. I 
recall that machine having a copy of 4D installed too that could be used a 
client.

Thanks,
Brad

From: Randy Kaempen 
Date: Wednesday, August 25, 2021 at 3:02 PM
To: Bradley Perkins 
Cc: 4D iNug Technical <4d_tech@lists.4d.com>
Subject: Re: [EXTERNAL] Run v15.4 in demo mode

Bradley,


On Aug 25, 2021, at 3:56 PM, Perkins, Bradley D 
mailto:bperk...@lanl.gov>> wrote:

I do have an both compiled and uncompiled structures. If I could find a v16 
installer will that run on Catalina? Also do you know if there is still an ftp 
site that has older version downloads that isn't restricted to Partners?

You’ll still need a license number in order to open it.

The only other alternative would be if you created a compiled merged version of 
the database on v16.  You could bring that to the client and open the database. 
 As long as you don’t need the user mode, you’d be fine.

Randy Kaempen
Intellex Corporation


**
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
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: [EXTERNAL] Re: Run v15.4 in demo mode

2021-08-25 Thread Perkins, Bradley D via 4D_Tech
Hi Randy,

I do have an both compiled and uncompiled structures. If I could find a v16 
installer will that run on Catalina? Also do you know if there is still an ftp 
site that has older version downloads that isn't restricted to Partners?

Thanks,
Brad

From: Randy Kaempen 
Date: Wednesday, August 25, 2021 at 2:49 PM
To: 4D iNug Technical <4d_tech@lists.4d.com>
Cc: Bradley Perkins 
Subject: [EXTERNAL] Re: Run v15.4 in demo mode

Brad,


On Aug 25, 2021, at 3:44 PM, Perkins, Bradley D via 4D_Tech 
<4d_tech@lists.4d.com<mailto:4d_tech@lists.4d.com>> wrote:

I've had a request to retrieve some data from a v15.4 database that was last 
used in early 2019. The customer still has the server with DB installed and a 
compatible client machine, but the machines are in storage and off-network. 
Given the current situation getting them online and remotely accessible isn't 
possible. I am working remotely. I have a copy of the DB on an older Macbook 
Pro, but it had been upgraded to Catalina and 15.4 will no longer open. I get a 
'4D.app' needs to be updated dialog when attempting to launch. I expect that is 
likely due to drop of 32-bit support in Catalina. My installed licenses on the 
MPB were also those granted annually through the partner program and have 
expired.

If I could copy the 4D.app and the structure and data files back to an earlier 
MacOS Yosemite machine will I be able to temporarily run 4D v15.4 in demo mode, 
or will 4D immediately request activation? I need less than 15 minutes to 
retrieve the requested data.

Beyond that I may need to travel to their site and hook the client and server 
together with a crossover cable or maybe run a client from the server if one is 
installed. Their institutional IT policies would not allow them to place the 
machines on the network now (running very outdated OS versions, plus these were 
in a DMZ that they no longer have access to). I'd prefer to try off-site.

My last 4D experience was with v15 and I understand that things have changed a 
lot. Could newer versions open the v15.4 DB in demo mode with minimal effort?

Is the database compiled?  If not, a newer version will open it and convert it. 
 There are commands which are obsolete in the later versions, but you should 
still be able to work.  Picture fields will be an issue unless they are 
converted before going to 64 bit versions of 4D.

If the database is compiled, later versions will not be able to open it.

Randy Kaempen
Intellex Corporation


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

Run v15.4 in demo mode

2021-08-25 Thread Perkins, Bradley D via 4D_Tech
Hi,

I've had a request to retrieve some data from a v15.4 database that was last 
used in early 2019. The customer still has the server with DB installed and a 
compatible client machine, but the machines are in storage and off-network. 
Given the current situation getting them online and remotely accessible isn't 
possible. I am working remotely. I have a copy of the DB on an older Macbook 
Pro, but it had been upgraded to Catalina and 15.4 will no longer open. I get a 
'4D.app' needs to be updated dialog when attempting to launch. I expect that is 
likely due to drop of 32-bit support in Catalina. My installed licenses on the 
MPB were also those granted annually through the partner program and have 
expired.

If I could copy the 4D.app and the structure and data files back to an earlier 
MacOS Yosemite machine will I be able to temporarily run 4D v15.4 in demo mode, 
or will 4D immediately request activation? I need less than 15 minutes to 
retrieve the requested data.

Beyond that I may need to travel to their site and hook the client and server 
together with a crossover cable or maybe run a client from the server if one is 
installed. Their institutional IT policies would not allow them to place the 
machines on the network now (running very outdated OS versions, plus these were 
in a DMZ that they no longer have access to). I'd prefer to try off-site.

My last 4D experience was with v15 and I understand that things have changed a 
lot. Could newer versions open the v15.4 DB in demo mode with minimal effort?

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

Running 4D Client/Server on same machine via localhost?

2019-06-03 Thread Perkins, Bradley D via 4D_Tech
I've been asked to dust off a project that last ran client server on v15.4 and 
capture the web pages (using Active4D) for a couple of 'applications' that ran 
under this server and save them as static pages so that the owner can archive 
them.

I have structure and data files but no longer have network access to the 
machines that the web application server and database server ran on. Both were 
in a DMZ and the network hosts/dns entries were retired when the system was 
taken offline. It would take significant effort to get new hosts approved and 
established, and I'll likely have to work on this while off site, so I need to 
run this system locally.

I have access to an older Mac laptop that is running MacOS Sierra. It also 
happens to have v15.4 desktop and v15.4 Server installed.

Can I run both 15.4 4D.app (client) and 4D Server.app on the same machine and 
use localhost to connect to the database? If so, how do I go about setting this 
up?

Thanks,

Brad Perkins
**
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: Moving a served v15.4 Windows DB to Mac v15.4 standalone

2019-03-13 Thread Perkins, Bradley D via 4D_Tech
Thanks Chuck. I'm not concerned about the Active4D part at this time. It seemed 
like in the past there was an issue where you wouldn't be allowed to open the 
structure after moving between machines or server -> client. I'll be at their 
site tomorrow and will try your suggestion.

Brad

On 3/13/19, 3:27 AM, "4d_tech-requ...@lists.4d.com" 
<4d_tech-requ...@lists.4d.com> wrote:

What I would do is take the take the folder the structure is in and
zip it. I would take the folder the data file is in and zip it. I
would then copy both of the zipped archives and proceed./ I am not
sure if there is anything else you need to copy relative to active4D,
buit someone else who uses that can advise

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

Moving a served v15.4 Windows DB to Mac v15.4 standalone

2019-03-12 Thread Perkins, Bradley D via 4D_Tech
A Windows v15.4 server database is being taken offline. The customer has 
requested that some content be archived and output as static web pages. Much of 
this database drove a number of Active4D-based web applications. To do this I 
will need to move the structure and data to my Macbook Pro. I have a 15.4 
Professional Developer license.

I seem to recall that simply copying the structure and database over doesn't 
work and that there are special files that needed to be included. If that is 
correct, what are those files? Are there other special steps?

Thanks,

Brad Perkins
**
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: Active4D/ObjectTools with 4D 32-bit

2018-12-11 Thread Perkins, Bradley D via 4D_Tech
Aparajita,

I'd estimate another year.

Thanks,

Brad Perkins


From: Aparajita Fishman 
To: 4d_tech@lists.4d.com
Subject: Active4D/ObjectTools with 4D 32-bit
Message-ID: 
Content-Type: text/plain;   charset=us-ascii

Hi,

Just wondering how many Active4D or ObjectTools users out there *must* use 
32-bit 4D on macOS for the foreseeable future.

I need to know how much longer I need to support 32-bit versions of my 
plugins on macOS.

Many thanks,

- Aparajita

**
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: Export text columns containing carriage returns to Excel?

2018-08-06 Thread Perkins, Bradley D via 4D_Tech
Tom,

Actually in this case the problem is that the text field for that row is larger 
than the 32,767 character limit. All of the text after that blows up the import 
until we start on the next valid row.
I think the original replace string was working as intended
There are only 11 cases where we have texts larger than 32,767 characters. I'll 
substring the output to be safe and we can manually update those 11 records to 
include the truncated text.

Chip Scheide wrote:
Try Replace string([table]text_field;Char(34);"\\"+Char(34))

I'll do that if limiting the text field output to 32767 characters doesn't 
solve the problem.

Thanks,

Brad


From: Bradley Perkins 
Date: Monday, August 6, 2018 at 2:07 PM
To: "Benedict, Tom" , "4d_tech@lists.4d.com" 
<4d_tech@lists.4d.com>
Subject: Re: Export text columns containing carriage returns to Excel?

My initial tests using this technique look pretty good. I exported 100 rows and 
all but one imported into Excel OK. Most of the text fields don't contain any 
"s, but one that does caused the import to fail. How are you doubling the "s 
when using Replace String?

I tried Replace string([table]text_field;Char(34);Char(34)+Char(34))

Thanks,
Brad


From: "Benedict, Tom" 
Date: Monday, August 6, 2018 at 1:50 PM
To: Bradley Perkins , "4d_tech@lists.4d.com" 
<4d_tech@lists.4d.com>
Subject: RE: Export text columns containing carriage returns to Excel?

I didn’t have to escape the embedded commas. I think the quotes around all the 
fields took care of them. You will likely need to experiment. I found that 
Excel is fussy about CSV. It definitely doesn’t like importing CSV via the 
import wizard unless there are no embedded delimiters.

Tom

From: Perkins, Bradley D [mailto:bperk...@lanl.gov]
Sent: Monday, August 06, 2018 12:34 PM
To: Benedict, Tom; 4d_tech@lists.4d.com
Subject: Re: Export text columns containing carriage returns to Excel?

Tom,

That sounds extremely useful. In addition to "" any "s in the text do I also 
need to \, any commas?

I doubt the data source will be too large, but if it is can break the export 
into a couple of files. We'll only need to do this once.

Thanks,

Brad Perkins

From: "Benedict, Tom" 
Date: Monday, August 6, 2018 at 1:26 PM
To: Bradley Perkins , "4d_tech@lists.4d.com" 
<4d_tech@lists.4d.com>
Subject: RE: Export text columns containing carriage returns to Excel?

Brad,

Here’s a hint that you may (or may not) find useful.

I used a single column in the QR Editor to hold the full ‘record’ I was 
exporting. I wrapped all the fields with double-quotes and used commas as field 
delimiters. I also had to escape any embedded quotes by replacing them with 
double-double quotes. The result was a CSV file which can be opened in Excel 
(double-clicked on Desktop, not via File>Open. Excel is strange). Use CSV 
avoided the didn’t need to restore any of the embedded characters.

My data source ended up being too large to use this approach, as the output 
file exceeded 4GB, so I end up writing similar code to generate the CSV. But if 
your data is modest sized the QR approach avoid the code-test-release cycle 
(unless your system is running interpreted).

Tom Benedict
Optum



From: Perkins, Bradley D [mailto:bperk...@lanl.gov]
Sent: Sunday, August 05, 2018 1:26 PM
To: Benedict, Tom; 4d_tech@lists.4d.com
Subject: Re: Export text columns containing carriage returns to Excel?


Hi Tom,

I've been working  this with the QR Editor with some success. Another challenge 
I've found is that the 4D text fields have carriage returns, carriage 
return/new line pairs, and even some tabs.  Therefore I'll need to nest the 
calls to Replace string in the proper order to place markers for all three.



Thanks for pointing out the limitations I will need to see if any of the text 
fields are larger than 32,767 characters. This is an older system that started 
life in v3. The output file size will not be an issue.

Best,

Brad


From: Benedict, Tom 
Sent: Friday, August 3, 2018 2:19:44 PM
To: Perkins, Bradley D; 4d_tech@lists.4d.com
Subject: Re: Export text columns containing carriage returns to Excel?

Brad Perkins writes:

>I've been asked to provide an export from a legacy 4D system delivered as an 
>.xlsx file.

>The challenge I'm facing is that this table contains a number of text fields 
>and
>the customer requires the imported column cells to retain the returns or line 
>feeds
>in the original text fields. If I do a straight tab-delimited export with 
>carriage returns
>as the end of line marker, the imported result does not preserve the original 
>row
>because any returns encountered in the text fields are interpreted as end of 
>row.

>My other challenge is that I need to do this with out-of-box end user 
>capabilities
>from a client (v15.4 remote) against a compiled server. I can't install 
>plugins, create new methods, etc.
>It has been many years since I've had to do this type of thing in 4D.

>Can I replace the carriage 

Re: Export text columns containing carriage returns to Excel?

2018-08-06 Thread Perkins, Bradley D via 4D_Tech
My initial tests using this technique look pretty good. I exported 100 rows and 
all but one imported into Excel OK. Most of the text fields don't contain any 
"s, but one that does caused the import to fail. How are you doubling the "s 
when using Replace String?

I tried Replace string([table]text_field;Char(34);Char(34)+Char(34))

Thanks,
Brad


From: "Benedict, Tom" 
Date: Monday, August 6, 2018 at 1:50 PM
To: Bradley Perkins , "4d_tech@lists.4d.com" 
<4d_tech@lists.4d.com>
Subject: RE: Export text columns containing carriage returns to Excel?

I didn’t have to escape the embedded commas. I think the quotes around all the 
fields took care of them. You will likely need to experiment. I found that 
Excel is fussy about CSV. It definitely doesn’t like importing CSV via the 
import wizard unless there are no embedded delimiters.

Tom

From: Perkins, Bradley D [mailto:bperk...@lanl.gov]
Sent: Monday, August 06, 2018 12:34 PM
To: Benedict, Tom; 4d_tech@lists.4d.com
Subject: Re: Export text columns containing carriage returns to Excel?

Tom,

That sounds extremely useful. In addition to "" any "s in the text do I also 
need to \, any commas?

I doubt the data source will be too large, but if it is can break the export 
into a couple of files. We'll only need to do this once.

Thanks,

Brad Perkins

From: "Benedict, Tom" 
Date: Monday, August 6, 2018 at 1:26 PM
To: Bradley Perkins , "4d_tech@lists.4d.com" 
<4d_tech@lists.4d.com>
Subject: RE: Export text columns containing carriage returns to Excel?

Brad,

Here’s a hint that you may (or may not) find useful.

I used a single column in the QR Editor to hold the full ‘record’ I was 
exporting. I wrapped all the fields with double-quotes and used commas as field 
delimiters. I also had to escape any embedded quotes by replacing them with 
double-double quotes. The result was a CSV file which can be opened in Excel 
(double-clicked on Desktop, not via File>Open. Excel is strange). Use CSV 
avoided the didn’t need to restore any of the embedded characters.

My data source ended up being too large to use this approach, as the output 
file exceeded 4GB, so I end up writing similar code to generate the CSV. But if 
your data is modest sized the QR approach avoid the code-test-release cycle 
(unless your system is running interpreted).

Tom Benedict
Optum



From: Perkins, Bradley D [mailto:bperk...@lanl.gov]
Sent: Sunday, August 05, 2018 1:26 PM
To: Benedict, Tom; 4d_tech@lists.4d.com
Subject: Re: Export text columns containing carriage returns to Excel?


Hi Tom,

I've been working  this with the QR Editor with some success. Another challenge 
I've found is that the 4D text fields have carriage returns, carriage 
return/new line pairs, and even some tabs.  Therefore I'll need to nest the 
calls to Replace string in the proper order to place markers for all three.



Thanks for pointing out the limitations I will need to see if any of the text 
fields are larger than 32,767 characters. This is an older system that started 
life in v3. The output file size will not be an issue.

Best,

Brad


From: Benedict, Tom 
Sent: Friday, August 3, 2018 2:19:44 PM
To: Perkins, Bradley D; 4d_tech@lists.4d.com
Subject: Re: Export text columns containing carriage returns to Excel?

Brad Perkins writes:

>I've been asked to provide an export from a legacy 4D system delivered as an 
>.xlsx file.

>The challenge I'm facing is that this table contains a number of text fields 
>and
>the customer requires the imported column cells to retain the returns or line 
>feeds
>in the original text fields. If I do a straight tab-delimited export with 
>carriage returns
>as the end of line marker, the imported result does not preserve the original 
>row
>because any returns encountered in the text fields are interpreted as end of 
>row.

>My other challenge is that I need to do this with out-of-box end user 
>capabilities
>from a client (v15.4 remote) against a compiled server. I can't install 
>plugins, create new methods, etc.
>It has been many years since I've had to do this type of thing in 4D.

>Can I replace the carriage returns in the text fields with a special marker 
>during export?
>I could replace the Excel cells containing the any carriage return markers 
>with actual returns after import.

Use the Quick Report Editor. You can put formulas in the columns which include 
a call to Replace string.

There are some limitation which I’ve encountered:


-  The Quick Report Editor is 32bit (evidently) which limits the size 
of the output file to 4GB. Hopefully you don’t run in to that limit. (I did 
recently).

-  Any given cell in Excel can only hold 32,767 characters. If you have 
more than that you’ll have to do some fancy segmenting into another column in 
the output.

HTH, let me know if you have further questions. I have very recent experience 
doing just this.

Tom Benedict
Optum


This e-mail, including attachments, may include 

Re: Export text columns containing carriage returns to Excel?

2018-08-06 Thread Perkins, Bradley D via 4D_Tech
Tom,

That sounds extremely useful. In addition to "" any "s in the text do I also 
need to \, any commas?

I doubt the data source will be too large, but if it is can break the export 
into a couple of files. We'll only need to do this once.

Thanks,

Brad Perkins

From: "Benedict, Tom" 
Date: Monday, August 6, 2018 at 1:26 PM
To: Bradley Perkins , "4d_tech@lists.4d.com" 
<4d_tech@lists.4d.com>
Subject: RE: Export text columns containing carriage returns to Excel?

Brad,

Here’s a hint that you may (or may not) find useful.

I used a single column in the QR Editor to hold the full ‘record’ I was 
exporting. I wrapped all the fields with double-quotes and used commas as field 
delimiters. I also had to escape any embedded quotes by replacing them with 
double-double quotes. The result was a CSV file which can be opened in Excel 
(double-clicked on Desktop, not via File>Open. Excel is strange). Use CSV 
avoided the didn’t need to restore any of the embedded characters.

My data source ended up being too large to use this approach, as the output 
file exceeded 4GB, so I end up writing similar code to generate the CSV. But if 
your data is modest sized the QR approach avoid the code-test-release cycle 
(unless your system is running interpreted).

Tom Benedict
Optum



From: Perkins, Bradley D [mailto:bperk...@lanl.gov]
Sent: Sunday, August 05, 2018 1:26 PM
To: Benedict, Tom; 4d_tech@lists.4d.com
Subject: Re: Export text columns containing carriage returns to Excel?


Hi Tom,

I've been working  this with the QR Editor with some success. Another challenge 
I've found is that the 4D text fields have carriage returns, carriage 
return/new line pairs, and even some tabs.  Therefore I'll need to nest the 
calls to Replace string in the proper order to place markers for all three.



Thanks for pointing out the limitations I will need to see if any of the text 
fields are larger than 32,767 characters. This is an older system that started 
life in v3. The output file size will not be an issue.

Best,

Brad


From: Benedict, Tom 
Sent: Friday, August 3, 2018 2:19:44 PM
To: Perkins, Bradley D; 4d_tech@lists.4d.com
Subject: Re: Export text columns containing carriage returns to Excel?

Brad Perkins writes:

>I've been asked to provide an export from a legacy 4D system delivered as an 
>.xlsx file.

>The challenge I'm facing is that this table contains a number of text fields 
>and
>the customer requires the imported column cells to retain the returns or line 
>feeds
>in the original text fields. If I do a straight tab-delimited export with 
>carriage returns
>as the end of line marker, the imported result does not preserve the original 
>row
>because any returns encountered in the text fields are interpreted as end of 
>row.

>My other challenge is that I need to do this with out-of-box end user 
>capabilities
>from a client (v15.4 remote) against a compiled server. I can't install 
>plugins, create new methods, etc.
>It has been many years since I've had to do this type of thing in 4D.

>Can I replace the carriage returns in the text fields with a special marker 
>during export?
>I could replace the Excel cells containing the any carriage return markers 
>with actual returns after import.

Use the Quick Report Editor. You can put formulas in the columns which include 
a call to Replace string.

There are some limitation which I’ve encountered:


-  The Quick Report Editor is 32bit (evidently) which limits the size 
of the output file to 4GB. Hopefully you don’t run in to that limit. (I did 
recently).

-  Any given cell in Excel can only hold 32,767 characters. If you have 
more than that you’ll have to do some fancy segmenting into another column in 
the output.

HTH, let me know if you have further questions. I have very recent experience 
doing just this.

Tom Benedict
Optum


This e-mail, including attachments, may include confidential and/or
proprietary information, and may be used only by the person or entity
to which it is addressed. If the reader of this e-mail is not the intended
recipient or his or her authorized agent, the reader is hereby notified
that any dissemination, distribution or copying of this e-mail is
prohibited. If you have received this e-mail in error, please notify the
sender by replying to this message and delete this e-mail immediately.

This e-mail, including attachments, may include confidential and/or
proprietary information, and may be used only by the person or entity
to which it is addressed. If the reader of this e-mail is not the intended
recipient or his or her authorized agent, the reader is hereby notified
that any dissemination, distribution or copying of this e-mail is
prohibited. If you have received this e-mail in error, please notify the
sender by replying to this message and delete this e-mail immediately.

This e-mail, including attachments, may include confidential and/or
proprietary information, and may be used only by 

Re: Export text columns containing carriage returns to Excel?

2018-08-05 Thread Perkins, Bradley D via 4D_Tech
Keith,

I asked because I haven't seen that feature. I mostly work with non-4D systems 
these days and some have that capability. Also, I'd like to not have to install 
code, a component etc as I'm trying to do the export from their production 
compiled database.

It is looking like I can probably get 90% of where I need to be with QRs and 
using Replace string to mark the crlf, cr and tab occurrences. I'll then need 
to open the exported file in a text editor that can handle large files and 
ensure that the file will be importable into Excel.

Best,

Brad



From: Keith Goebel 
Sent: Sunday, August 5, 2018 2:53 PM
To: 4D Tech Mailing List Technical; Perkins, Bradley D
Subject: Re: Export text columns containing carriage returns to Excel?

Brad,
I don’t know - I rarely use 4D’s export and when I do it’s only for a quick 
text file (tab delimited) export.
I do my main exports using code and the csv version follows the cvs rules and 
it works great.
Sorry I can’t share the code - it is buried in a contracted project.
I suspect there are some 4Ders that have csv export code at their fingertips 
(or in a component) that may chip in here…
Cheers, Keith

Is there an explicit CSV option in Export Data or Quick Reports that will 
properly 'quote' and escape any commas (or tabs, unfortunately there are a few) 
in the exported text fields?  If 4D can produce a file that I don't have to 
inspect and manipulate prior to importing into Excel that would be wonderful.

There have been a couple of “export data” related threads lately that seem to 
be having problems with embedded CRs.
Where I have CRs in the data, I save the exported data as csv and that has 
always solved that problem for me.
Perhaps there is some reason that is not suitable for you...
**
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: Export text columns containing carriage returns to Excel?

2018-08-05 Thread Perkins, Bradley D via 4D_Tech
Hi Tom,

I've been working  this with the QR Editor with some success. Another challenge 
I've found is that the 4D text fields have carriage returns, carriage 
return/new line pairs, and even some tabs.  Therefore I'll need to nest the 
calls to Replace string in the proper order to place markers for all three.


Thanks for pointing out the limitations I will need to see if any of the text 
fields are larger than 32,767 characters. This is an older system that started 
life in v3. The output file size will not be an issue.

Best,

Brad


From: Benedict, Tom 
Sent: Friday, August 3, 2018 2:19:44 PM
To: Perkins, Bradley D; 4d_tech@lists.4d.com
Subject: Re: Export text columns containing carriage returns to Excel?

Brad Perkins writes:

>I've been asked to provide an export from a legacy 4D system delivered as an 
>.xlsx file.

>The challenge I'm facing is that this table contains a number of text fields 
>and
>the customer requires the imported column cells to retain the returns or line 
>feeds
>in the original text fields. If I do a straight tab-delimited export with 
>carriage returns
>as the end of line marker, the imported result does not preserve the original 
>row
>because any returns encountered in the text fields are interpreted as end of 
>row.

>My other challenge is that I need to do this with out-of-box end user 
>capabilities
>from a client (v15.4 remote) against a compiled server. I can't install 
>plugins, create new methods, etc.
>It has been many years since I've had to do this type of thing in 4D.

>Can I replace the carriage returns in the text fields with a special marker 
>during export?
>I could replace the Excel cells containing the any carriage return markers 
>with actual returns after import.

Use the Quick Report Editor. You can put formulas in the columns which include 
a call to Replace string.

There are some limitation which I’ve encountered:


-  The Quick Report Editor is 32bit (evidently) which limits the size 
of the output file to 4GB. Hopefully you don’t run in to that limit. (I did 
recently).

-  Any given cell in Excel can only hold 32,767 characters. If you have 
more than that you’ll have to do some fancy segmenting into another column in 
the output.

HTH, let me know if you have further questions. I have very recent experience 
doing just this.

Tom Benedict
Optum


This e-mail, including attachments, may include confidential and/or
proprietary information, and may be used only by the person or entity
to which it is addressed. If the reader of this e-mail is not the intended
recipient or his or her authorized agent, the reader is hereby notified
that any dissemination, distribution or copying of this e-mail is
prohibited. If you have received this e-mail in error, please notify the
sender by replying to this message and delete this e-mail immediately.
**
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: Export text columns containing carriage returns to Excel?

2018-08-05 Thread Perkins, Bradley D via 4D_Tech
Hi Keith,

Is there an explicit CSV option in Export Data or Quick Reports that will 
properly 'quote' and escape any commas (or tabs, unfortunately there are a few) 
in the exported text fields?  If 4D can produce a file that I don't have to 
inspect and manipulate prior to importing into Excel that would be wonderful.

Thanks,

Brad


From: Keith Goebel 
Sent: Saturday, August 4, 2018 7:58:56 PM
To: 4D Tech Mailing List Technical
Cc: Perkins, Bradley D
Subject: Re: Export text columns containing carriage returns to Excel?

Brad,
There have been a couple of “export data” related threads lately that seem to 
be having problems with embedded CRs.
Where I have CRs in the data, I save the exported data as csv and that has 
always solved that problem for me.
Perhaps there is some reason that is not suitable for you...
Excel can open a csv file using a double-click without problems (for me 
anyway), although I haven’t found a way to create page tabbed spreadsheets or 
pre-formatted cells, but you can embed some “commands” in the exported data 
(Sum, etc).
HTH, Keith

> I've been asked to provide an export from a legacy 4D system delivered as an 
> .xlsx file.
>
> The challenge I'm facing is that this table contains a number of text fields 
> and the customer requires the imported column cells to retain the returns or 
> line feeds in the original text fields….
**
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: Export text columns containing carriage returns to Excel?

2018-08-03 Thread Perkins, Bradley D via 4D_Tech
Thanks Randy,

It looks like I can do this with a quick report.
I need to add a custom column with a formula like:
Replace string([proposals]proposal_text;Char(13)+Char(10);"[[crlf]]")

As to the other question about using Excel, they are working with a cloud-based 
SAAS that processes uploaded excel files for data imports. It works much nicer 
than you'd expect!
The other import options involve REST or SQL. Since this is a legacy 4D system 
that is behind a firewall I can't provide those.
I will be exporting these to a text file first and will have to massage the 
data once it is in Excel. 

Best,

Brad Perkins

On 8/3/18, 11:44 AM, "4D_Tech on behalf of 4d_tech-requ...@lists.4d.com" 
<4d_tech-boun...@lists.4d.com on behalf of 4d_tech-requ...@lists.4d.com> wrote:

Message: 8
Date: Fri, 3 Aug 2018 10:43:47 -0700
From: "Randy Engle" <4d.l...@xc2.us>
To: "'4D iNug Technical'" <4d_tech@lists.4d.com>
Subject: RE: Export text columns containing carriage returns to Excel?
Message-ID:



Content-Type: text/plain;   charset="utf-8"

Brad

Can I replace the carriage returns in the text fields with a special marker 
during export? I could replace the Excel cells containing the any carriage 
return markers with actual returns after import.

This is frequently what I need to do:

Replace the CR (13), (10), (11) with "///" or somesuch.
Then put the CR back after import.

Randy Engle

-Original Message-
    From: 4D_Tech <4d_tech-boun...@lists.4d.com> On Behalf Of Perkins, Bradley 
D via 4D_Tech
Sent: Friday, August 3, 2018 10:22 AM
To: 4d_tech@lists.4d.com
Cc: Perkins, Bradley D 
Subject: Export text columns containing carriage returns to Excel?

I've been asked to provide an export from a legacy 4D system delivered as 
an .xlsx file.

The challenge I'm facing is that this table contains a number of text 
fields and the customer requires the imported column cells to retain the 
returns or line feeds in the original text fields. If I do a straight 
tab-delimited export with carriage returns as the end of line marker, the 
imported result does not preserve the original row because any returns 
encountered in the text fields are interpreted as end of row.

My other challenge is that I need to do this with out-of-box end user 
capabilities from a client (v15.4 remote) against a compiled server. I can't 
install plugins, create new methods, etc.
It has been many years since I've had to do this type of thing in 4D.

Can I replace the carriage returns in the text fields with a special marker 
during export? I could replace the Excel cells containing the any carriage 
return markers with actual returns after import.

Thanks,

Brad Perkins

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

Export text columns containing carriage returns to Excel?

2018-08-03 Thread Perkins, Bradley D via 4D_Tech
I've been asked to provide an export from a legacy 4D system delivered as an 
.xlsx file.

The challenge I'm facing is that this table contains a number of text fields 
and the customer requires the imported column cells to retain the returns or 
line feeds in the original text fields. If I do a straight tab-delimited export 
with carriage returns as the end of line marker, the imported result does not 
preserve the original row because any returns encountered in the text fields 
are interpreted as end of row.

My other challenge is that I need to do this with out-of-box end user 
capabilities from a client (v15.4 remote) against a compiled server. I can't 
install plugins, create new methods, etc.
It has been many years since I've had to do this type of thing in 4D.

Can I replace the carriage returns in the text fields with a special marker 
during export? I could replace the Excel cells containing the any carriage 
return markers with actual returns after import.

Thanks,

Brad Perkins
**
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: 4D Backup causes 4D Remote to hang (15.4) [Solved?]

2017-11-25 Thread Perkins, Bradley D via 4D_Tech
I think this problem is finally solved. As I'd always suspected, it was likely 
related to power management features.

As previously noted, running the command ...

$ pmset -g

... suggested that all settings were as they should be. Mainly power nap was 
turned off globally.

About a week ago someone asked another question here about 'app nap'. I'd 
previously checked 4D.app using Get Info after the Sierra > High Sierra upgrade 
and verified it was set as needed.

I ran the command to check app nap on 4D.app and there was no value returned. 
Hmmm?
I then ran the command to enable app nap on 4D.app then check it again. It was 
now set.

I also toggled all of the machine's energy saver settings. I recorded them. 
Changed them. Saved them. Then reset them. This may have not helped, but I 
don't see how it could have hurt.

We've run for almost a week now.

-- Brad



From: Perkins, Bradley D
Sent: Friday, November 17, 2017 9:59 AM
To: 4d_tech@lists.4d.com
Subject: Re: 4D Backup causes 4D Remote to hang (15.4)

Still having problems. Based on various email notifications, I can see
that the scripts that under past OS versions would reliably restart 4D are
trying to do so, but w/o success. I don't know why they fail, but can see
they are repeatedly trying. That continues until I remotely access the
Mac. At that point the next scheduled run of the script succeeds.

If I try to run these scripts via SSH they don't succeed. I have to launch
Apple Remote Desktop.
I also have a password protected PHP app running on that server that
allows me to kill a hung 4D from my phone. That doesn't work during these
problem periods either.

It seems like this points to a power management issue, but pmset -g would
indicate that everything is set as it should be. I did not mention it
earlier, but this Mac Mini sits in a rack and hooked to a KVM. It normally
doesn't have a display.

Are any others running v15.4 (or v15.5) 4D Remote on Mac OS High Sierra
successfully? Or, if you are running it and having problems, what are they?

Thanks,

Brad Perkins



On 11/15/17, 5:13 PM, "Perkins, Bradley D"  wrote:

>Thanks Chuck,
>
>I've reset the backup by deleting preferences. I also modified my scripts
>to use kill -9 instead of killall. Hopefully this will improve the
>situation. I should know overnight.
>
>-- Brad Perkins
>
>On 11/14/17, 1:00 PM, "4D_Tech on behalf of 4d_tech-requ...@lists.4d.com"
><4d_tech-boun...@lists.4d.com on behalf of 4d_tech-requ...@lists.4d.com>
>wrote:
>
>I would quit 4D server, delete preferences and recreate using menu
>commands
>re backup. Perhaps that us trhe problem. Also check where the backup
>is
>going to if a HD try a different location
>
>Regards and hiope this helps
>Chuck
>

**
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: 4D Backup causes 4D Remote to hang (15.4)

2017-11-17 Thread Perkins, Bradley D via 4D_Tech
Still having problems. Based on various email notifications, I can see
that the scripts that under past OS versions would reliably restart 4D are
trying to do so, but w/o success. I don't know why they fail, but can see
they are repeatedly trying. That continues until I remotely access the
Mac. At that point the next scheduled run of the script succeeds.

If I try to run these scripts via SSH they don't succeed. I have to launch
Apple Remote Desktop.
I also have a password protected PHP app running on that server that
allows me to kill a hung 4D from my phone. That doesn't work during these
problem periods either.

It seems like this points to a power management issue, but pmset -g would
indicate that everything is set as it should be. I did not mention it
earlier, but this Mac Mini sits in a rack and hooked to a KVM. It normally
doesn't have a display.

Are any others running v15.4 (or v15.5) 4D Remote on Mac OS High Sierra
successfully? Or, if you are running it and having problems, what are they?

Thanks,

Brad Perkins



On 11/15/17, 5:13 PM, "Perkins, Bradley D"  wrote:

>Thanks Chuck,
>
>I've reset the backup by deleting preferences. I also modified my scripts
>to use kill -9 instead of killall. Hopefully this will improve the
>situation. I should know overnight.
>
>-- Brad Perkins
>
>On 11/14/17, 1:00 PM, "4D_Tech on behalf of 4d_tech-requ...@lists.4d.com"
><4d_tech-boun...@lists.4d.com on behalf of 4d_tech-requ...@lists.4d.com>
>wrote:
>
>I would quit 4D server, delete preferences and recreate using menu
>commands
>re backup. Perhaps that us trhe problem. Also check where the backup
>is
>going to if a HD try a different location
>
>Regards and hiope this helps
>Chuck
>

**
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: 4D Backup causes 4D Remote to hang (15.4) (John DeSoi)

2017-11-14 Thread Perkins, Bradley D via 4D_Tech
John,

Possibly, but under normal circumstances there might be one request. This is a 
small database and backup runs quick. There is a remote monitoring system that 
sends a web request every 3 minutes. The page simply responds with the current 
time although it might get that time from the server. Thing is we've been doing 
this for more than a decade without problems. We also use NTK and Active4D for 
web serving.

Does On Backup Startup Database method run on all connected clients when the 
server is backed up? The docs say "This concerns all 4D environments: 4D (all 
modes), 4D Server and databases merged with 4D Volume Desktop." It isn't clear 
if that means it can be run in all modes or runs in any mode?

Thanks,

Brad

On 11/14/17, 8:26 AM, "4D_Tech on behalf of 4d_tech-requ...@lists.4d.com" 
<4d_tech-boun...@lists.4d.com on behalf of 4d_tech-requ...@lists.4d.com> wrote:

Are there database requests coming in via the web server at the time of the 
backup? Have you tried turning off the web server during backup? Or at least 
return an error response if access to the database is needed when backup is 
running.

John DeSoi, Ph.D.

**
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 Backup causes 4D Remote to hang (15.4)

2017-11-14 Thread Perkins, Bradley D via 4D_Tech
Changing the thread title of "4D Remote hanging at 3am after upgrading to Hi 
Sierra. Need logging advice."

4D 15.4
Mac OS High Sierra Client
Windows 2008r2 Server

As noted in previous posts I now suspect that a 5am (formerly 3am) scheduled 4D 
Backup is causing 4D to 'hang'.
I checked my phone at 5:30 this morning and saw a message that our 4D-based web 
app was not responding.
Normally, this would be followed by a message that it recovered. There would 
also be messages if any action was taken to reboot 4D. There were neither.

I remotely logged into the client machine. Finder is frontmost. There are no 
error dialogs visible.
4D is running. This is an unattended client (web server) so no UI is visible.
I click on the 4D icon in the dock. A "backup is running" dialog appears in the 
lower left hand corner of the screen. Its status bar is at 1% and not moving.
I dismiss the dialog and check Activity Monitor.
4D is not responding and is consuming 99% of the CPU. Memory usage is NOT 
abnormal and much lower than many other running apps.
Click 4D again and dialog doesn't appear. Try this a few more times and can't 
make dialog reappear. I wanted to see if there has been any progress.
Recheck Activity Monitor. 4D is still not responding and is consuming 99% of 
the CPU. Force quit 4D. Scripts that monitor 4D restart 4D within a minute.

Again, this started when the client was updated to High Sierra 3 weeks ago. 
That was mandated by their institution's cybersecurity people. 4D has hung 
almost every night. Controls in place to keep 4D running stopped working after 
the upgrade.

When I first remembered the backup was running at 3am (now 5am) I ran a backup 
manually from the server admin console. It ran fine and there were no apparent 
problems. I even watched the 4D remote. Checks of the data file and indexes 
show no problems.

What should I try next? Start with a new backup? Reinstall 4D?

Thanks,

Brad Perkins


**
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: 4D Remote hanging at 3am after upgrading to Hi Sierra. Need logging advice.

2017-11-13 Thread Perkins, Bradley D via 4D_Tech
The good news is that the problem hasn't occurred the last 2 nights.
I haven't had time to check if the backups didn't run though. It is 
possible that the database didn't change over the weekend and backups
were skipped. Friday was a federal holiday. Now that people are back at 
work I'll be surprised if we don't hang tomorrow at ~5 am. Fingers crossed.

Tim Nevels wrote:

> I’ve been following this thread and thought I’d post a comment. I too
> was confused and thought the problem was happening on 4D Server and it
> was running on a Mac with High Sierra. I think Miyako may have thought
> that too. That’s why he talked about purge.

FWIW, I manually ran purge on the client machine just in case it might
help.

> Since 4D Server is on Windows I don’t think it is a server problem
> unless it is a network layer problem. I don’t recall what 4D version
> you are running. But are you using the new network or “legacy” network
> layer?  I would try switching and see if that makes a difference.

We're running 4D 15.4. Still using the legacy network layer. I don't read 
anything
good about using the new layer, so I'll stay where we are.
Unless this is a problem that is known and fixed in 15.5 I'm not going 
to take the time to test and upgrade. I'm basically dealing with this problem 
for them for free. I first asked here hoping someone more familiar with High 
Sierra might point to a known issue that is responsible.

What is weird is that there is a correlation between the time the backup
runs and the time that the client hangs. In 20+ years of working with 4D
Server we haven't experienced that. Not in my recent memory at least.

> There have been reports of certain versions of 4D having issues on
> certain Mac models running High Sierra. Looks like you’ve run into one
> of those situations. So what are your options?

Where are those reports? What are the specific issues? This is why I
originally asked here. Are there workarounds?

> 1. Live with it. Obviously not really an option. 

It's not, but this incident and the time and expense we go through 
every time we have to do a major 4D upgrade just so that we can continue 
to keep using a legacy 4D application has the customer strongly considering 
dumping 4D after almost 23 years. The only reason they still use 4D is
because the solution has served them well. 

> 2. Switch 4D versions and hope it is a bug that got fixed and a new 
> version solves the problem. 

Upgrading to 16 isn't an option at this time. See 1 above. 

> 3. It is a weird machine specific problem. Wipe the machine,
> reinstall fresh High Sierra macOS and fresh 4D Remote version. 
> Maybe it fixes this machine problem. 

I've considered this as a last resort. This is a relatively new machine
that was installed when we did our v15 upgrade. It only has one OS upgrade. 
Rebuilding the machine is a much larger job than one would expect as I have to
install a bunch of additional software to be compliant with institutional 
cybersecurity requirements, reconfigure 3 Apache virtual hosts on top of setting
up client and all of the scripts I have in place to run client 24/7/365.
It is an 8-12 hour job at a minimum and would have to be done over a weekend.

> 4. Work around the problem.

Which is basically what I've done for 25 years of 4D development including
4D web serving on client since 95. My workarounds have been to rely on 
external tools that monitor 4D and keep it running. The problem now is that
those tools fail. They've been in place since we moved our Mac clients to
OS X (2004?). I've had to modify them over time, but they've always 
worked.

> Write an AppleScript that you launch just before the backup starts.
> Use LEP to do this. Then QUIT 4D. The script will pause for enough
> time for the backup to complete. Maybe 5 minutes or whatever it is for
> your situation. Then the script launches 4D Remote again and
> reconnects automatically to 4D Server. The script quits.

I already have an Applescript that will restart 4D client if not running. 
It relies on launchd though. It runs 24/7.
I would need to modify the structure and run a process that will quit the 
client before the backup runs. 
I'll also have to modify all of my keep alive scripts to be aware of the backup 
'window' 
so that they don't run during that time. 
I'd prefer to not have to do this unless absolutely necessary.

> If you can’t fix a problem, just avoid it and work around it. Would
> this be an option?

As mentioned we already do to some extent, but in this case I'd like to
solve the problem. Right now the workaround is to manually reboot the client
each morning. We support a global user base and even in the US I have east
coast web users whose day starts 3 hours earlier than mine so we've got cases
now where people can't use the system. I've actually been getting up early to 
check on and fix the problem the past few weeks. I can't keep doing that. 

---

Also, I saw Jim Crate's suggestion to have a script take a screen 

Re: 4D Remote hanging at 3am after upgrading to Hi Sierra. Need logging advice.

2017-11-04 Thread Perkins, Bradley D via 4D_Tech
This problem went away for a few days, but restarted a couple of nights ago. It 
still happens at 3am. I have not been able to observe what happens at that time 
and suspect that if I try I won't see the problem. I suspect that Apple's 
evolving power management features are part of the problem and that if a user 
were interacting with the system at 3am, we wouldn't see this because the 
system would not be idle. Spending the night on site, which is an hour away, 
isn't an option, nor is getting up in the middle of the night and remotely 
logging in in the hope I can observe an obvious problem.

I believe I've done everything I can using the pmset command to prevent sleep, 
standby etc. It isn't clear if you can totally turn power management off 
everywhere though. In researching this problem I also discovered the 
'caffeinate' command. This is a command-line system utility that is supposed to 
prevent the computer from sleeping. I haven't tried it yet. Has anyone here 
used it? If so, can you describe how?

I first deployed this system in 1995 under 3.x and it has provided continuous 
near 24/7/365 service since then. It has a small, but global user base which is 
primarily web-based. The machine in question is the web 'client', but it also 
runs a Apache for static web content and an SFTP server. This system has 
remained largely unchanged functionality-wise in the last 10 years. The main 
structure changes have been those required to upgrade major 4D versions. I 
maintain this system, but haven't implemented many newer 4D features. I've 
tried to stay aware of how 4D has changed.

While I can appreciate Apple's intentions with the power management features, 
my experience has been that they increasingly work against running 4D 24/7. 
This system is deployed on a network at a govt. agency. Their cyber security 
people force us to run the latest OS. No recent OS upgrade seems to go smoothly 
4D-wise. The 4D client in question had always run for weeks or even months w/o 
problems, but every Mac OS upgrade seems to lessen that. Moving this web system 
to Windows is not an option. We do run 4D Server on Windows.

I have a number of controls in place to to ensure that the system is running. 

1. Auto-launch 4D Remote in web serving mode if it is not running.  I can 
toggle this on/off. This is done with a combination of shell scripts and 
AppleScript. Apple's Launchd system manages this.
2. Continuously monitor the 4D web server. Every few minutes an off-site 
monitoring agent requests a simple dynamically generated page. If the request 
times out, or if the response contains unexpected content, I get notified. 
These requests provide an added benefit of keeping 4D busy during light or no 
usage periods.
3. There is not an easy way to externally determine if 4D, or any Mac OS 
desktop app has hung. You can easily detect if 4D is running, but not when it 
is non-responsive. For us this is when 4D has encountered a low-level error 
that can't be gracefully handled with an error handler. It doesn't help that 
any displayed dialogs provide little useful information. One solution is to 
have 4D run a process that writes a 'heartbeat' file every minute and have a 
system process check for changes to this file. If the file is present and 
hasn't changed in more than a few minutes, we'll assume that 4D has hung and 
run a script to kill it. At this point the auto-launcher from (1) above takes 
over. This is where we seem to be failing currently. 

If others have done (3) how do you implement your heartbeat? I write a current 
timestamp into the file every minute. That assumes the file exists and is 
writable. It usually is. Is there a better way that is more robust?

I know that 4D has improved logging features, but I've never used them. What 
would I need to do to enable 4D to log between 2:45 and 3:15 AM? 

Thanks,

Brad


From: Perkins, Bradley D
Sent: Monday, October 30, 2017 9:08 AM
To: 4d_tech@lists.4d.com
Subject: Re: 4D Remote hanging at 3am after upgrading to Hi Sierra.

I think I found the problem. When I upgraded the server OS on Tuesday I had a 
second GUI login session open for the admin user as I needed to sudo to fix 
some permissions, etc (aka fast user switching). When I checked on the 
application early Saturday AM I realized I had left that user logged in with an 
idle terminal session. I also found that when I remotely logged in to to check 
on the 'web client' user that 4D was not running, but quickly launched (my 
login woke the system up). I suspect that power management features were 
causing the network and/or hard disks to 'sleep' at 3AM. We have not had 
problems since logging that user out. Therefore, even though you may think that 
Power Nap is configured to be off, it isn't totally.

Brad Perkins.

On 10/27/17, 3:02 PM, "Perkins, Bradley D"  wrote:

I have grep'd everything in /var/log --- the files the the console displays 

Re: 4D Remote hanging at 3am after upgrading to Hi Sierra.

2017-10-30 Thread Perkins, Bradley D via 4D_Tech
I think I found the problem. When I upgraded the server OS on Tuesday I had a 
second GUI login session open for the admin user as I needed to sudo to fix 
some permissions, etc (aka fast user switching). When I checked on the 
application early Saturday AM I realized I had left that user logged in with an 
idle terminal session. I also found that when I remotely logged in to to check 
on the 'web client' user that 4D was not running, but quickly launched (my 
login woke the system up). I suspect that power management features were 
causing the network and/or hard disks to 'sleep' at 3AM. We have not had 
problems since logging that user out. Therefore, even though you may think that 
Power Nap is configured to be off, it isn't totally.

Brad Perkins.

On 10/27/17, 3:02 PM, "Perkins, Bradley D"  wrote:

I have grep'd everything in /var/log --- the files the the console displays 
-- and haven't found anything that is running at 3am. That is assuming of 
course that any system level activity would be logged. The closest entry is at 
3:01 and that is when my monitoring script emails me the first of many messages 
that there is a problem.

I was mainly asking here in case those that are more in tune with current 
Mac goings on were aware of anything new in High Sierra that might have caused 
problems with 4D.

I'm not familiar with the use of  4D's debug/request log. Can that be 
turned on easily, or do I have to recompile the structure to enable it?
I'm mainly interested in what is going on at the client. I'd also guess 
that whatever is hanging 4D might not get logged to the server.

Thanks,

Brad

> From: JBellos 

> Try turning on the debug/request log in 4D to see what's firing in your
> application at that time, if anything..

> Also, look at the Mac Console log to see what's happening at 3 AM, if
> there's anything unique running there that's not  happening earlier.

**
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: 4D Remote hanging at 3am after upgrading to Hi Sierra.

2017-10-27 Thread Perkins, Bradley D via 4D_Tech
I have grep'd everything in /var/log --- the files the the console displays -- 
and haven't found anything that is running at 3am. That is assuming of course 
that any system level activity would be logged. The closest entry is at 3:01 
and that is when my monitoring script emails me the first of many messages that 
there is a problem.

I was mainly asking here in case those that are more in tune with current Mac 
goings on were aware of anything new in High Sierra that might have caused 
problems with 4D.

I'm not familiar with the use of  4D's debug/request log. Can that be turned on 
easily, or do I have to recompile the structure to enable it?
I'm mainly interested in what is going on at the client. I'd also guess that 
whatever is hanging 4D might not get logged to the server.

Thanks,

Brad

> From: JBellos 

> Try turning on the debug/request log in 4D to see what's firing in your
> application at that time, if anything..

> Also, look at the Mac Console log to see what's happening at 3 AM, if
> there's anything unique running there that's not  happening earlier.
**
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: 4D Remote hanging at 3am after upgrading to Hi Sierra.

2017-10-27 Thread Perkins, Bradley D via 4D_Tech
Chip, 

/var/log/daily.out exists
Since the OS  is newly updated no weekly or monthlies have run yet.
I can see that the daily OS X cleanup scripts are running at ~22:15 local time. 
That rules these out.

Thanks,

Brad Perkins

On 10/27/17, 12:25 PM, "Chip Scheide" <4d_o...@pghrepository.org> wrote:

here is a link about the cron jobs/scripts
http://thexlab.com/faqs/maintscripts.html

I do not really know what they do, only that they exist, I only quickly 
scanned the article.
the article at the above link says they (may) run at 3:15am

of course, the underlying OS changed (Sierra to High Sierra),
existing anti-virus, or other things may interact differently - 
especially if you did not update that software with the OS.

EX: - 
where I work they run/use Sophos AV
under the OS we were running (10.6 - due to legacy applications), 
Sophos thinks - maybe rightly so :) - that MS Office is a virus and 
will not let it run. So we have had to get a different AV package 
(Intego Virus Barrier)
 

**
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: 4D Remote hanging at 3am after upgrading to Hi Sierra.

2017-10-27 Thread Perkins, Bradley D via 4D_Tech
Chip,

Except for the OS Upgrade nothing changed. This problem didn't exist under 
Sierra.
The machine has  AV installed (IT policy mandates that too) but it has never 
been a problem in the past.
I'm the only end user of the machine. As noted I do have a 3am job, but that 
has run fine in the past and doesn't cause problems when manually executed 
while 4D is running.
What are the 'daily cleanup' routines that OS X runs? I'm assuming previous OS 
X versions did that too, but want to look into this.

Thanks,

Brad

On 10/27/17, 10:38 AM, "Chip Scheide" <4d_o...@pghrepository.org> wrote:

since it is at the same time -
There are a couple of possibilities:
- anti virus software (either update, or scan)
- cron job - specifically the daily 'cleanup' routines run by OS X
- some other specific timed action setup by(?) IT, the end user(s)?

Chip
 

**
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 Remote hanging at 3am after upgrading to Hi Sierra.

2017-10-27 Thread Perkins, Bradley D via 4D_Tech
We had to update a machine to Mac OS X Hi Sierra this week (cybersecurity 
mandate) on Tuesday of this week.
This machine runs as a web 'client' on 4D 15.4.
I have long standing controls in place to monitor the 4D application and keep 
it running.
Since the OS update, 4D is hanging at 3am every morning and is not recovering. 
I know this because my scripts are sending me email every 3 minutes that there 
is a problem. I have to manually reboot 4D every morning.

From what I can tell Power Nap is off on the machine:

$ pmset -g
System-wide power settings:
Currently in use:
standby  1
Sleep On Power Button 1
womp 1
autorestart  1
hibernatefile/var/vm/sleepimage
powernap 0
gpuswitch2
networkoversleep 0
disksleep0
sleep0 (sleep prevented by screensharingd)
autopoweroffdelay28800
hibernatemode0
autopoweroff 1
ttyskeepawake1
displaysleep 30
standbydelay 10800
I have an external job that runs at 3am via launchd, but turned it off 
yesterday to see if it was causing the problem. We still had the problem this 
morning. I can also run that job manually while 4D is running and it doesn't 
cause problems.
When I accessed 4D this morning to reboot, I briefly saw a 4D error dialog that 
would make me think the source of the problem is in a 4Dprocess that writes a 
file to disk. That process is running now without problem. Unfortunately the 
dialog dismissed itself before I could write down details. Therefore, I suspect 
something is running at ~3 that is not letting 4D write that file.

I've dug through logs and looked at other system settings to see if the system 
is running something at that time, but haven't found anything.

Any ideas would be appreciated?

-- Brad



**
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: [OFF] Mac OS High Sierra PHP and Apache Versions & 15.4 compatibilty

2017-09-28 Thread Perkins, Bradley D via 4D_Tech
James (and others who answered),

Thanks. I updated their dev server yesterday day.

PHP and Apache are latest and will hopefully be 'compliant' for awhile.
Apple is always very slow to update these. My limited 4D testing running
15.4 were also OK.

I had to restore previous Apache configurations to get their sites to
work. Apple backs these as httpd.conf~previous during the OS upgrade. The
OS upgraded also clobbered 4D app-related log file in /var/logs/local.


$ php -v
PHP 7.1.7 (cli) (built: Jul 15 2017 18:08:09) ( NTS )
$ httpd -v
Server version: Apache/2.4.27 (Unix)
Server built:   Jul 15 2017 15:41:46

Best,

Brad Perkins



On 9/27/17, 12:16 PM, "4D_Tech on behalf of 4d_tech-requ...@lists.4d.com"
<4d_tech-boun...@lists.4d.com on behalf of 4d_tech-requ...@lists.4d.com>
wrote:

>Message: 9
>Date: Wed, 27 Sep 2017 10:37:52 +1000
>From: James Brown 
>To: 4D iNug Technical <4d_tech@lists.4d.com>
>Subject: Re: [OFF] Mac OS High Sierra PHP and Apache Versions & 15.4
>   compatibilty
>Message-ID: 
>Content-Type: text/plain;  charset=us-ascii
>
>I get same php, but different Apache:
>
>httpd -v
>Server version: Apache/2.4.27 (Unix)
>Server built:   Jul 15 2017 15:41:46
>
>
>James

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

[OFF] Mac OS High Sierra PHP and Apache Versions & 15.4 compatibilty

2017-09-25 Thread Perkins, Bradley D via 4D_Tech
If anyone has installed the just released version of Mac OS High Sierra can you 
confirm which versions of Apache and PHP are installed?

$ http -v
$ php -v

I have a customer that runs a 4D web system on Sierra and their IT/Cyber people 
have complained the installed versions Apache 2.4.25 and PHP 5.6.30 are 
vulnerable and are threatening network blocks. If High Sierra provides 
compliant versions we might update them.

More importantly  4D 15.4 certified for High Sierra? Any known problems.

Thanks,

Brad Perkins
**
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 Database Server Hardware recommendation

2017-07-12 Thread Perkins, Bradley D via 4D_Tech
A customer needs to replace aging Windows server hardware. I haven't spec'd any 
Windows server hardware in a long time and am looking for recommendations.
The primary use is to host 4D Server.  This isn't a large database, but does 
need to run near 24/7/365.
The are currently running 4D v15.*
They'll want Dell. Server needs to be rack-mounted. Lower cost is fine. These 
are replacing R610 models bought in 2010.
They'll also have to upgrade from Windows Server 2008 r3 to some version of 
Windows Server 2012. Are there any things I should be aware of related to that?

What models are people using recently for 4D Server deployments?

Thanks,

Brad Perkins
**
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: Unattended Mac OS X Sierra v15.4 remote disconnects

2017-04-17 Thread Perkins, Bradley D via 4D_Tech
Chip,

I had already done that, but this helps as it made me review my settings:

Here are the settings for both machines:

Turn display off after : 30 minutes
[ ] Prevent computer from sleeping automatically when display is off.
[ ] Put hard disks to sleep when possible
[x] Wake for Ethernet network access
[x] Start up automatically after a power failure
[ ] Enable Power Nap.

I think the first option should be checked. These machines site in a rack
and are hooked to a KVM. The display is typically off.

[x] Prevent computer from sleeping automatically when display is off.
[ ] Put hard disks to sleep when possible
[x] Wake for Ethernet network access
[x] Start up automatically after a power failure
[ ] Enable Power Nap.


Thanks,

Brad

Chip Scheide wrote:
>try :
>System preferences -> Energy Saver :
>- Computer sleep = never
>- Put Hard disks to sleep when possible = off

**
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: Unattended Mac OS X Sierra v15.4 remote disconnects

2017-04-17 Thread Perkins, Bradley D via 4D_Tech
I spoke too soon. Client disconnects started once I left work on Friday. I
apparently have app nap turned off for 4D (checkbox in 4D.app get info).
It also is off for most other apps based on viewing the Energy tab of all
processes in Activity monitor. The one exception is Finder, for which
there doesn't appear to be a way to turn App Nap off.

My observation is that problems start when these machines are idle. On
Friday I didn't see any problems until I left for the day. Monitors noted
web apps failing, emails that the client had hung and rebooted about 30
minutes after I left the office.
* I was no longer connected to the server via 4D.
* I wasn't viewing both 'web client' machines via the Apple Screen Sharing
app.
* It was a Friday afternoon. Light traffic.

Our client/server timeout is set for one minute. That is the same setting
we ran on v14 and these clients would stay connected for months on v14.
We are still running 32-bit server so it is using the old network layer.
Web clients are running macOS Sierra 10.12.4 on a Mac Mini with 16GB of
memory.
Server is Windows 2008r2 with ample memory.

Does anyone have any other suggestions?

Thanks,

Brad Perkins



>Bob,
>
>Thank you. I was aware of this but was confusing 'App Nap' with the 'Power
>Nap' settings in the Energy Saver control panel. I changed these a few
>hours ago and no disconnects so far.
>
>Brad Perkins
>
>From: Robert McKeever 
>>
>>Disable App Nap.

**
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: Unattended Mac OS X Sierra v15.4 remote disconnects

2017-04-14 Thread Perkins, Bradley D via 4D_Tech
Bob,

Thank you. I was aware of this but was confusing 'App Nap' with the 'Power
Nap' settings in the Energy Saver control panel. I changed these a few
hours ago and no disconnects so far.

Brad Perkins

From: Robert McKeever <bobmckee...@mac.com>
>
>Disable App Nap.
>
>>On Apr 13, 2017, at 6:30 PM, Perkins, Bradley D via 4D_Tech
>><4d_tech@lists.4d.com> wrote:
>>I'm trying to deploy a couple of system upgrades. We moved two 'web
>>client' machines from v14 on Mac OS X El Capitan to v15.4 on Sierra this
>>week. Previous versions of both systems have been deployed for years and
>>gone through many upgrades.
>>I am observing that 4D is losing its connection to the server. When this
>>happens I notice that Apache has stopped serving too, and that I often
>>can't remotely access the machine.
>>When moving to 15.4 do I need to change network settings for 4D?
>>On both machines I have turned off the Energy Saver settings that would
>>normally make a machine sleep. Are there other settings on Sierra that I
>>am missing?
>>Thanks,
>>Brad Perkins


**
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: v14 on macOS Sierra?

2017-03-31 Thread Perkins, Bradley D via 4D_Tech
I originally asked this question back in December.

From what I've followed, with newer versions of Sierra, stability of v15
improved greatly. We're still working on our v15 upgrade though and I'm
being forced to do Sierra upgrades next week and am wondering if anyone is
running v14 under newer versions successfully?

Thanks,

Brad Perkins

On 12/5/16, 11:14 AM, "Perkins, Bradley D"  wrote:

>Thanks for all of the responses. This doesn't sound encouraging though as
>some respondents can't even run v15 on Sierra. At this point I guess all I
>can do is try and hope for the best and have a rollback/recovery plan in
>place.
>
>-- Brad Perkins
>
>
>>I have an old customer that runs a 'web client' on v14 on El Capitan.
>>Their institutional cybersecurity folks are mandating an upgrade to
>>Sierra (sigh). I looked at 4D's certification matrix for v14 and they
>>list 10.11 as compatible, but no 10.12.
>>Is anyone running v14 on Sierra. Any problems? Since this machine is a
>>web client it runs 24/7. There is very little if any user UI interaction.
>>
>>Longer term plan is to get them up to v15, but that will take a month or
>>two.
>

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