| View previous topic :: View next topic   | 
	
	
	
		| Author | 
		Message | 
	
	
		fall95 -
 
  Joined: 11 Apr 2003 Posts: 2
 
  | 
		
			
				 Posted: Sat Jul 26, 2003 5:01 pm    Post subject: Does the webserver support $_ENV["OSTYPE"] | 
				      | 
			 
			
				
  | 
			 
			
				| Is there away I can set the $_ENV["OSTYPE"] on the webserver? :? | 
			 
		  | 
	
	
		| Back to top | 
		
			          | 
		
	
	
		  | 
	
	
		datwig -
 
  Joined: 26 Jan 2003 Posts: 85
 
  | 
		
			
				 Posted: Sat Jul 26, 2003 5:06 pm    Post subject:  | 
				      | 
			 
			
				
  | 
			 
			
				I beleive there is, but I don't know it.  I do know howto get both browser version and OS though.
 
 
$ostype = getenv("HTTP_USER_AGENT"); | 
			 
		  | 
	
	
		| Back to top | 
		
			           | 
		
	
	
		  | 
	
	
		fall95 -
 
  Joined: 11 Apr 2003 Posts: 2
 
  | 
		
			
				 Posted: Sat Jul 26, 2003 5:39 pm    Post subject:  | 
				      | 
			 
			
				
  | 
			 
			
				The reason is that my development enviorment is windows but
 
my web host is freebsd and the include directories have to be set differently
 
for some reason:
 
 
if(!eregi("win",$_ENV["OSTYPE"]))
 
{
 
	ini_set("include_path",ini_get("include_path").":".$_SERVER['DOCUMENT_ROOT'].
 
        	"/phpincludes/");
 
}
 
else
 
{
 
    ini_set("include_path",ini_get("include_path").";".$_SERVER['DOCUMENT_ROOT'].
 
        	"/phpincludes/");
 
} | 
			 
		  | 
	
	
		| Back to top | 
		
			          | 
		
	
	
		  | 
	
	
		aprelium -
 
  Joined: 22 Mar 2002 Posts: 6800
 
  | 
		
			
				 Posted: Sat Jul 26, 2003 6:55 pm    Post subject:  | 
				      | 
			 
			
				
  | 
			 
			
				Abyss Web Server does not export the OSTYPE environment variable. Anyway, you can set it manually. Open CGI Parameters and add in the CGI Environement Variable a new variable with OSTYPE as name and enter its desired value.
 
By doing so, OSTYPE is added in the environment of any executed CGI script. _________________ Support Team
 
Aprelium - http://www.aprelium.com | 
			 
		  | 
	
	
		| Back to top | 
		
			           | 
		
	
	
		  | 
	
	
		 |