Jump to content
The Uniform Server Community

Is it possible to create ENV_VAR outside of the UniServerZ directory?


Recommended Posts

I would like to store my error pages outside the UniSeverZ folder structure (making it easier to upgrade UniServer without losing my custom error pages.)

My error pages are in the parent directory for UniServerZ.  I don't see how to indicate the parent directory in the construct of an environment variable.

This keeps me inside the UniServer directory structure...


This gets me nothing...


Any ideas?


-- Cliff

Link to comment
Share on other sites

  • 2 weeks later...

If you are looking to upgrade UniformServer without losing any of your pages, I would suggest using the folder outside the UniformServer setup location. This can be done by using the Apache -> Change Apache Root folders function where you can point the server to use a folder outside the UniServer folder structure.

The only downside of this is that you will break portability, and the change needs to be done whenever you upgrade UniServer, but you will not lose your files or your data with an accidental overwrite to the www or the ssl folders.

Windows unfortunately does not seem to support .. paths to move across directories. 

You could also use the home/us_config.ini in the ENV_PATHS section to set up absolute paths or relative paths, but if you need portability, it would need to be inside the UniServer folder structure.

Link to comment
Share on other sites

Thanks, Sudeep!

In terms of portability, Uniform Server is just one component of our Chipster project, literally a folder within a larger folder that will always be moved as a complete set.

I know that somewhere in Uniform Server is code that will detect the full path of the US executable and assign it to %UniConPath% because I move my project folder (containing US) from device to device and anywhere in my hard drive's structure and the full path in %UniConPath% is always correct.

So I'm assuming that same code could potentially be used to identify the parent folder of Uniform Server.

Or, perhaps, I could parse the %UniConPath% to get the detected full path, and then do some string manipulation to create a new variable.

My coding skills are suspect, but I'd gladly hire someone to figure this out for the greater good.


-- Cliff

Link to comment
Share on other sites

Yes, If portability is a requirement, then it does become a problem.

The %UniConPath% is designed to use the top level of the UniformServer folder and not any higher since the accessibility of the code is always below that level. If you have a program which is running at a higher level than UniformServer, I would recommend using that to fetch the %UniConPath% from the env variables, but that would be available only when UniController is running.

I went through the Chipster.Org project and I think what you are doing is good. DM me separately, I can see how I can help.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...