PRB: CONFIG.FP or CONFIG.FPW Causes "Syntax Error" at Startup

ID: Q103465

The information in this article applies to:

SYMPTOMS

When you are starting FoxPro with an associated CONFIG.FP or CONFIG.FPW file, the following error messages may occur:

   Syntax error
   <Cancel> <Suspend> <Ignore>

   Variable <variable name> not found
   <Cancel> <Suspend> <Ignore>

CAUSE

FoxPro is executing the CONFIG.FP or CONFIG.FPW file as a program file. This behavior most often occurs because of an incorrectly specified startup switch. For example, the following command issued at the MS-DOS prompt will cause a syntax error:

   foxpro.exe -c <drive>:\<directory>\<configuration file>

NOTE: This command will cause an error as long as the specified configuration file exists and has entries in it.

RESOLUTION

To correct this problem, do the following:

1. Remove the space between the "-c" switch and the path and filename

   for the configuration file.

2. Look for the SET FOXPROWCFG line in the Autoexec.bat file to ensure
   that the startup switches are correct.

MORE INFORMATION

Steps to Reproduce Problem

1. Start FoxPro.

2. In the Command window, type:

      MODIFY COMMAND SYS(2019)

3. Change the first line so it reads:

      COMMAND = WAIT WINDOW

4. Quit FoxPro.

5. Start FoxPro with the syntax noted above in the "Cause" section,

   making sure that the full path and filename point to the CONFIG.FPW
   or CONFIG.FPW file used by FoxPro.

Keywords          : kberrmsg FoxDos FoxWin FxenvConfigfp 
Version           : 2.0 2.5 2.5a
Issue type        : kbprb

Last Reviewed: June 24, 1997