Web Connection
Setting cSystemFilesDataPath
Gravatar is a globally recognized avatar based on your email address. Setting cSystemFilesDataPath
  Harvey Mushman
  All
  May 2, 2020 @ 11:53am

Assuming OnProcessInit() fires on every hit and I want to test for a valid user by looking up the cookie in the Session table, and needing to keep the session table tied to this application on a server running multiple applications (I want separate Session tables), I want do the following:

this.InitSession('myCookie',1800,.t.)

Once into oProcess.InitSession() the default code wants to set the data path to the session table as shown below.


Function InitSession()
...
   IF TYPE("this.oServer.oConfig") = "O"
      this.oSession.cDataPath = ADDBS(this.oServer.oConfig.cSystemFilesDataPath)
   ENDIF

Question, where does cSystemFilesDataPath get set? (with or without the prefix "c" assuming it goes into myApplication.ini file)

I have tried to set in myAppliaction.ini within the [Main]. [ServerConfig], [myAppProcess] and even by creating a [Config] section but all my attempts fail to set the empty default value.

This has to be really simple... 😦

Gravatar is a globally recognized avatar based on your email address. re: Setting cSystemFilesDataPath
  Rick Strahl
  Harvey Mushman
  May 2, 2020 @ 10:21pm

.cSystemFilesDataPath is a configuration setting that's empty by default meaning it'll look in the startup folder.

You can change that path in the yourApp.ini file and point it somewhere else if you need to.

This is a new setting that's been added to support running with shared files in a central location (in this case when I was mucking around with running WWC under Linux).

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Setting cSystemFilesDataPath
  Harvey Mushman
  Rick Strahl
  May 4, 2020 @ 07:07am

Yes, I tried to set the value in myApp.ini file but to no avail, at runtime the value is not set.

In myApp.ini what section "[Main] perhaps" is the value set? Or is there a hook that I'm missing in myProjectProcess.prg or myProjectMain.prg that must be set before oSERVER.cSystemFilesDataPath will show the value I set in the myApp.ini file?

Gravatar is a globally recognized avatar based on your email address. re: Setting cSystemFilesDataPath
  Rick Strahl
  Harvey Mushman
  May 4, 2020 @ 07:02pm

The value should not be set. It should be an empty string unless you have a very good reason to set it. The value in the INI [Main] section is SystemFilesDataPath. Not no c prefix.

You can click on Save Settings on the Status Form to dump out all the active configuration values into the config file including those that aren't initially set in the file.

+++ Rick ---

© 1996-2020