Jump to content


Photo

SetEnv relative for Apache

apache setenv env path relative

  • Please log in to reply
2 replies to this topic

#1 pascual_dav

pascual_dav

    Newbie

  • Member
  • Pip
  • 2 posts
  • Main OS: Windows 7

Posted 04 September 2014 - 08:02 AM

Hi,

 

I just started to use Uniform for developments in PHP and think it's an incredible tool. 
 
I'm working with Uniform Zero XI but also with other tools from PortableApps project's.
 
Uniform is located in the path
 
X:/PortableApps/UniServerZ 

I need to install the "Oracle Instant Client" so that share the facility with some applications and the Uniform Server, so I have set in: 

 
X:/PortableApps/instantclient_11_2

I need to include in the httpf.conf SetEnv directives file, for example: 

 
SetEnv ORACLE_HOME "${US_ROOTF}../instantclient_11_2" 
However, this configuration does not seem to be interpreted correctly by Apache / PHP (see phpinfo). 
 
Is there any way to include my own variables in algú Uniform ini file to do the replacement?
 
Perhaps this issue should be treated as a new feature. 
 
Thanks for everything, I hope your answer.


#2 Ric

Ric

    Project Manager

  • Admin
  • PipPipPipPipPip
  • 1,535 posts
  • Gender:Male
  • Location:Cambridge,UK
  • Interests:Electronics
    Internet in general
    Open source projects
  • SourceForge IDmpgcan
  • Wiki ID: Ric
  • Main OS: Windows XP

Posted 24 September 2014 - 01:10 PM

I am assuming "Oracle Instant Client" is a separate application!

If this is true you cannot set the environment as above.

You need to set environment variables at the system level.
 
It looks like you are using Windows 7 (Main OS),

proceed as follows to set the environment variable and any other variables required:


1. From the Desktop, right-click the Computer icon and select Properties.
   If you do not have a Computer icon on your desktop, click the Start button,
   right-click the Computer option in the Start menu, and select Properties.

2. Click the Advanced System Settings link in the left column.
    In the System Properties window, click on the Advanced tab,
    then click the Environment Variables button near the bottom of that tab.


3. In the Environment Variables window,
   click New and enter the Variable name and Variable value.

Quick test: After setting the environment variable open a CMD window
 and enter command set this lists all the environments variables.

 

Note: After setting environment variable always open a new command
window to perform the above test.

All the best
Ric



#3 pascual_dav

pascual_dav

    Newbie

  • Member
  • Pip
  • 2 posts
  • Main OS: Windows 7

Posted 06 November 2014 - 03:45 AM

Hi,

 

It is not necessary to set the environment variable at the system level . It works well if you get to read it properly using Apache SetEnv .

 

The same applies to JRE (for example), if you want PHP to access a particular version, you can specify it by Apache env var using setenv .

 

In any case, it would be interesting for users set their own collection of "properties" to replace in configuration files at UniServer boot.

Thank you very much for the reply and sorry for my delay in reading it .







Also tagged with one or more of these keywords: apache, setenv, env, path, relative

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users