ERROR 1202 Program is too large and/or IIS stack overflow

Topics: Developer Forum, Project Management Forum, User Forum
Coordinator
Apr 28 at 3:36 PM
If you get error 1202 Program is too large, you are probably running into VFP's default 128k memory limit. Unfortunately you can't increase this limit using ActiveVFP v6.03 because it doesn't allow you.

I have already fixed this problem for myself. I created a CONFIG.FPW file and rebuilt the ActiveVFP project from the source code in VFP 9.0. If you don't have VFP then you may be stuck.

The config.fpw only needs to contain one line:
ALLOWEXTERNAL=ON

You can either add the following fix to that file or include another CONFIG.FPW file in your site folder. The simplest fix is to allow dynamic memory allocation:
PROGCACHE=0

I'm kind of disappointed that in all this time no one has updated the activeVFP.dll in the download. 128k is really not a lot of memory. I built a table class wrapper which is over 50k so opening two tables at once often blows my memory limit often causing IIS to crash with a stack overflow.
Apr 29 at 4:33 AM
Thanks for this info Tachyx... you are amongst the only voices around here. I am re-taking a project I began to work with; excited about it but concerned about the little community input these days.
Coordinator
May 1 at 4:08 PM
One thing about using external config.fpw is I can't get either command= or _startup= lines to work, but any other set commands I tried work fine. I was planning to use a common procedure to set up datasessions but I can still call that in my main.prg.

I personally anticipate using this project for the long term, although eventually I would like to migrate to SQL, I could only do that after I completely replace my existing application front end which is a VFP desktop application I don't have the source code for. The reason I end up posting here is because I'm actually using this in a complex production application for which we have little other recourse.
Coordinator
May 3 at 1:31 PM
Edited May 3 at 1:31 PM
Hi Tachyx,

You might want to contact/coordinate with Victor. The current version I'm using 603ext. I was able to actually compile an .app and call it from my main.prg. Basically, this suits my need for calling common procedures in one place plus the fact that it's an app instead of individual prg which can be read easily. I don't know though if requirements like the command= or _startup= will work though.

Aldrin
May 3 at 5:25 PM
Hi Aldrin,

Can you elaborate a bit more on how you are using an .APP? I need to conceal at least some of my code (that calls docs/data in my site) but don't know what are all my alternatives without sacrificing the advantage of using the 'CompileIfNew' feature/function in ActiveVFP. Also, what is a good way to allow my ActiveVFP site to read from a DBF without that DBF being accessible to the public.
Coordinator
May 4 at 2:23 PM
For the app, I basically ha a folder in my working folder called _prg. This contains a project and all the common prgs that I need. I have a genericmain.prg (the main for this project) where the following are defined like:
SET PROCEDURE TO "stringgenericfuncs.prg" ADDITIVE
SET PROCEDURE TO "timegenericfuncs.prg" ADDITIVE
SET PROCEDURE TO "othersgenericfuncs.prg" ADDITIVE

I then compile this as an APP. Now, in my main.prg for the actual website, I have the following line before the big case statement:
DO genericmain.app

So when I distribute the actual project to clients. All I have in my PRG folder are the following:
main.prg
datapath.prg

The genericmain.app is stored in the root folder of the project.

Hope this make sense.
May 4 at 4:54 PM
Excellent... so many thanks Aldrin,!

I like that approach; I am going to be re-thinking my project with your strategy in mind in order to keep some of my code a bit more behind doors.

Regarding the reading of DBFs, don't know exactly what I can do to further restrict non-logged users from them.
Coordinator
May 4 at 5:13 PM
You're welcome.

Sorry, I didn't pay attention on the other question that you had regarding DBF. How exactly you know that the public can access/see your DBF?
May 4 at 6:20 PM
Edited May 4 at 9:31 PM
Nothing in particular... I am currently in 'pre-design mode' trying to cover all the bases by thinking how the site will operate; hopefully I will put solid enough barriers so that it would take very considerable effort by the strangers to gain access.