[PHP] Environment Variable

2006-03-08 Thread steff
Hello, I want to define my own environemnt variable APPLICATION_ROOT and be able to retrieve his value from php. As apache module, cgi, cron and command line. Now i'm just be able to get it from command line. In other (module,cgi,cron) when I print $_ENV I never get the same environment :(

Re: [PHP] Environment Variable

2006-03-08 Thread chris smith
On 3/8/06, steff [EMAIL PROTECTED] wrote: Hello, I want to define my own environemnt variable APPLICATION_ROOT and be able to retrieve his value from php. As apache module, cgi, cron and command line. Now i'm just be able to get it from command line. In other (module,cgi,cron) when I print

Re: [PHP] Environment Variable

2006-03-08 Thread Jarratt Ingram
Hello, If you are running on apache and have access to either the .conf file or .htaccess you can use the apache SetEnv directive eg. SetEnv APPLICATION_ROOT /var/www/html/ and then from php use the $_SERVER['APPLICATION_ROOT'] to access the correct information HTH Jarratt On 3/7/06,

Re: [PHP] Environment Variable

2006-03-08 Thread Jarratt Ingram
Sorry i ment to add to my previous email, you will only be able to access the $_SERVER['APPLICATION_ROOT'] when using apache and not from Cron or Command line, for that i suppose you could add the following to the /etc/profile file APPLICATION_ROOT=/var/www/ and then to the export line EXPORT

[PHP] Environment Variable contamination between vhosts - 1.3.33

2005-08-08 Thread Marc Powell
Hi all, First time poster here so I apologize in advance for any gaffs. I've Googled, searched the archives and the FAQ but can't find anything close to what I'm experiencing. I have apache-1.3.33, mod_ssl-2.8.22 (with patches), php-4.3.2 (with patches, 4.4.0 tested as well), mod_perl-1.29-5

Re: [PHP] Environment Variable contamination between vhosts - 1.3.33

2005-08-08 Thread Rasmus Lerdorf
Marc Powell wrote: Hi all, First time poster here so I apologize in advance for any gaffs. I've Googled, searched the archives and the FAQ but can't find anything close to what I'm experiencing. I have apache-1.3.33, mod_ssl-2.8.22 (with patches), php-4.3.2 (with patches, 4.4.0 tested as

RE: [PHP] Environment Variable contamination between vhosts - 1.3.33

2005-08-08 Thread Marc Powell
-Original Message- From: [EMAIL PROTECTED] [mailto:replies-lists- [EMAIL PROTECTED] Sent: Monday, August 08, 2005 11:49 AM To: Marc Powell Subject: Re: [PHP] Environment Variable contamination between vhosts - 1.3.33 Date: Monday, August 08, 2005 09:34:50 AM -0700 From

Re[2]: [PHP] Environment Variable contamination between vhosts - 1.3.33

2005-08-08 Thread Tom Rogers
Hi, Tuesday, August 9, 2005, 3:04:41 AM, you wrote: MP Using -- MP #!/usr/bin/perl MP ## MP ## printenv -- demo CGI program which just prints its environment MP ## MP print Content-type: text/plain\n\n; MP foreach $var (sort(keys(%ENV))) { MP $val = $ENV{$var}; MP $val =~ s|\n|\\n|g;

[PHP] environment variable code fails

2002-03-20 Thread jrfoutin
? session_start(); include($DOCUMENT_ROOT/php/main.home.php); ? The environment variable in this code on index.php is not invoking main.home.php page in php folder in htdocs on new server. Code worked on previous server setup, but fails on new server. Other php calls to MySQL db in ported site

[PHP] environment variable, why does it not work?

2001-03-29 Thread Scott Fletcher
Hi! I'm using PHP4, iODBC OpenLink for the database connection and communication. After installing the iODBC (driver manager) OpenLink (driver), fix up the odbc.ini (part of iODBC or OpenLink) and did the odbctest. The test passed and it connect the linux to the MS-SQL Server and I was