[TYPO3-core] showpic.php bug

Bernhard Kraft kraftb at kraftb.at
Thu Sep 15 15:34:34 CEST 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Kasper Skårhøj wrote:
| For $HTTP_ENV_VARS["_"], now use:
|
| $_ENV['_']?$_ENV['_']:$_SERVER['_']

Can't confirm this.

Using PHP-CLI 4.1.2 and procmail v3.22 the '_' key isn't set either
in $_ENV nor in $_SERVER.

When the script get's called from the commandline "_" in both: $_ENV and
$_SERVER is set properly.

To count it up there are more than 2 ways of getting the path of the actual
executed script. These are:

$_ENV['_']
$HTTP_ENV_VARS['_']
$_SERVER['_']
$_SERVER['argv'][0]		// C-style. Should work for cli AND cgi scripts AFAIK

Using getcwd() as I wrote before is not a good solution as I found out there are
differences wheter you use a cgi or cli version of php. Search for "does not change" on:
http://www.php-resource.de/manual.php?p=features.commandline


greets,
Bernhard
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFDKXhoIl4dkVkDMFkRAgM0AKCw0tw/0bhw8cgLo78TSlx2v+hO1gCdFT45
hl5JxdEheajcpiDSdMwBaZU=
=kLDK
-----END PGP SIGNATURE-----



More information about the TYPO3-team-core mailing list