Re: [phpOpenTracker-User] v1.2 first bugs :)
Sebastian Bergmann <[email protected]>
| Newsgroups | gmane.comp.web.phpopentracker.general |
|---|---|
| Organization | www.sebastian-bergmann.de |
| Message-ID | <[email protected]> |
Jean-Christian Imbeault wrote:
> PHP Notice: Undefined index: REMOTE_ADDR in
> phpOpenTracker/Container.php on line 89
> PHP Warning: gethostbyaddr(): Address is not a valid IPv4 or IPv6
> address in phpOpenTracker/Container.php on line 95
> PHP Notice: Undefined index: HTTP_USER_AGENT in
> phpOpenTracker/Container.php on line 111
> PHP Notice: Undefined index: REQUEST_URI in
> phpOpenTracker/Container.php on line 164
This should have been addressed by
if (isset($_SERVER['REMOTE_ADDR'])) {
$container['ip_address'] = $_SERVER['REMOTE_ADDR'];
if (isset($_SERVER['REMOTE_HOST'])) {
$container['host_orig'] = $_SERVER['REMOTE_HOST'];
} else {
if ($config['resolve_hostname']) {
$container['host_orig'] = gethostbyaddr($container['ip_address']);
} else {
$container['host_orig'] = $container['ip_address'];
}
}
} else {
$container['host_orig'] = '';
$container['ip_address'] = '';
}
Anyway, this is a very rare situation. I don't know why this
$_SERVER variable is not set in your environment.
> PostgreSQL has become more strict with SQL syntax and no longer
> automatically converts 0/1 to boolean.
I did not, and cannot, test a release with PostgreSQL. So if you can
come up with a fix for that, I will put into a phpOpenTracker 1.2.1
release.
--
Sebastian Bergmann
http://sebastian-bergmann.de/ http://phpOpenTracker.de/
Das Buch zu PHP 5: http://professionelle-softwareentwicklung-mit-php5.de/
-------------------------------------------------------
This SF.Net email sponsored by: Parasoft
Error proof Web apps, automate testing & more.
Download & eval WebKing and get a free book.
www.parasoft.com/bulletproofapps