From owner-freebsd-questions@FreeBSD.ORG Mon Dec 29 20:12:34 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D08E11065672 for ; Mon, 29 Dec 2008 20:12:34 +0000 (UTC) (envelope-from bseklecki@collaborativefusion.com) Received: from collaborativefusion.com (mx01.pub.collaborativefusion.com [206.210.89.201]) by mx1.freebsd.org (Postfix) with ESMTP id 7A7BB8FC1A for ; Mon, 29 Dec 2008 20:12:34 +0000 (UTC) (envelope-from bseklecki@collaborativefusion.com) Received: from Internal Mail-Server by mx01 (envelope-from bseklecki@collaborativefusion.com) with SMTP; 29 Dec 2008 15:12:33 -0500 From: "Brian A. Seklecki" To: Mel In-Reply-To: <200812271028.11339.fbsd.questions@rachie.is-a-geek.net> References: <1230146554.4673.265.camel@soundwave.ws.pitbpa0.priv.collaborativefusion.com> <200812271028.11339.fbsd.questions@rachie.is-a-geek.net> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-uCrvkLGbZs5Q8CfMARHU" Organization: Collaborative Fusion, Inc. Date: Mon, 29 Dec 2008 15:12:33 -0500 Message-Id: <1230581553.19488.7.camel@soundwave.ws.pitbpa0.priv.collaborativefusion.com> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 (2.22.3.1-1.fc9) Cc: freebsd-questions@freebsd.org, Bill Moran Subject: Re: Default list of exported variables in sh(1) - $HOSTNAME X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: bseklecki@collaborativefusion.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Dec 2008 20:12:35 -0000 --=-uCrvkLGbZs5Q8CfMARHU Content-Type: text/plain Content-Transfer-Encoding: quoted-printable > > SSH_CONNECTION > > FTP_PASSIVE_MODE > > EDITOR >=20 > I suspect linux to set them from .profile files (even /etc/profile) and n= ot=20 > hardcoded in a shell or login program. The default skeletons=20 Mel: You were right to some extent. However, the problem is more complicated (or less complicated, depending). First, FreeBSD's default php.ini doesn't have: $variables_order =3D "EGPCS", so $ENV[] array wasn't getting popualted at all. Second, Apache FreeBSD RC scripts inherit the user environment from sudo(8) unless you pass -H or -i flag/args E.x.:, % sudo -H -i -u root /usr/local/etc/rc.d/apache22 restart Compared to: $ su - Password: $ /usr/local/etc/rc.d/apache22 restart Result in completely different results in PHP's $_ENV[] Additionally, the results of "$ su -" differ completely from the shell environment that executes when rc(8) is first run at boot time. I may be better off using getenv() in PHP directly. =20 ~BAS > in /usr/share/skel on FreeBSD does not set them. Neither=20 > does /etc/login.conf.=20 > I would set it in /etc/profile. >=20 --=20 Brian A. Seklecki Collaborative Fusion, Inc. --=-uCrvkLGbZs5Q8CfMARHU Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEABECAAYFAklZLywACgkQCne6BNDQ+R9coQCfRy+izM84yZuASMewZzOTUYkl PkoAnR2nzBV7efqhEpSkSaouPtTkVIf3 =TCrY -----END PGP SIGNATURE----- --=-uCrvkLGbZs5Q8CfMARHU--