Re: probably stupid problem
From: Pedro Graca (hexkid_at_hotpop.com)
Date: 02/26/04
- Next message: laidbak69_at_hotmail.com: "Re: ftp_connect error"
- Previous message: Andy Hassall: "Re: Users IP on PHP3?"
- In reply to: Snah: "Re: probably stupid problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 26 Feb 2004 00:56:38 GMT
Snah wrote:
> Your right that's the problem, in the meantime i discovered the phpinfo()
> function call. This allows me easily to compare the different platforms.
> Thanks for your tip
You can print all the variables in $_SERVER with
<?php
echo '<pre>';
print_r($_SERVER);
echo '</pre>';
?>
for both servers, and print/compare the output.
It's easier than the output of phpinfo() :)
I also remember I ended up doing something like:
<?php // config.inc.php
if (stristr(php_sapi_name(), 'apache') {
$DOCUMENT_ROOT = $_SERVER['DOCUMENT_ROOT'];
$OTHER_VARS = $_SERVER['OTHER_VARS'];
} else { // IIS
$DOCUMENT_ROOT = $_SERVER['ROOT_DIRECTORY']; // probably wrong
$OTHER_VARS = $_SERVER['EXTRA_VARS'];
}
?>
and then require that file (which had more things in it) and using
$DOCUMENT_ROOT (instead of $_SERVER['DOCUMENT_ROOT'])
for scripts running on apache or IIS.
--
--= my mail box only accepts =--
--= Content-Type: text/plain =--
--= Size below 10001 bytes =--
- Next message: laidbak69_at_hotmail.com: "Re: ftp_connect error"
- Previous message: Andy Hassall: "Re: Users IP on PHP3?"
- In reply to: Snah: "Re: probably stupid problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|