Jump to content
The Uniform Server Community

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


Chipster.org
 Share

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

     MyErrorPages=%UniConPath%\MyErrorPages

This gets me nothing...

     MyErrorPages=%UniConPath%\..\MyErrorPages

Any ideas?

Thanks!

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

Best,

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

  • 1 year later...
On 11/25/2022 at 10:04 PM, Chipster.org said:

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

     MyErrorPages=%UniConPath%\MyErrorPages

This gets me nothing...

     MyErrorPages=%UniConPath%\..\MyErrorPages

Any ideas?

Thanks!

-- Cliff






Le service client qu'offre le Casino Macau en France est une autre caractéristique qui ajoute à la popularité et à la fiabilité du casino sur le marché français. En contactant l'entreprise par chat en direct, par e-mail ou par téléphone, les utilisateurs peuvent être certains d'obtenir un service à la fois rapide et efficace. De plus, le service client du casino macao adopte une approche personnalisée, ce qui signifie qu'il prend en compte les besoins spécifiques de chaque joueur. De cette façon, le sentiment de confiance et de sécurité des joueurs est renforcé, ce qui est bénéfique. L'image du Casino Macau en tant qu'environnement fiable qui s'adresse aux joueurs français est considérablement renforcée par l'aide exceptionnelle fournie par le casino.

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.

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.

Guest
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.

Loading...
 Share

×
×
  • Create New...