Project

General

Profile

Actions

Bug #16402

closed

If typo3 wants to send a html-mail i got a error message

Added by Oliver Vogel over 18 years ago. Updated over 18 years ago.

Status:
Closed
Priority:
Should have
Category:
Communication
Target version:
-
Start date:
2006-07-24
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.0
PHP Version:
4
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

The message is:
Warning: gethostbyaddr(): Address is not a valid IPv4 or IPv6 address in /homepages/6/d17216529/htdocs/ihrhobby.eu/document_root/t3lib/class.t3lib_htmlmail.php on line 274

Warning: Cannot modify header information - headers already sent by (output started at /homepages/6/d17216529/htdocs/ihrhobby.eu/document_root/t3lib/class.t3lib_htmlmail.php:274) in /homepages/6/d17216529/htdocs/ihrhobby.eu/document_root/typo3/sysext/cms/tslib/class.tslib_fe.php on line 2767

This is because $host = php_uname('n') in t3lib_htmlmail.php get the wrong content at a schlund und Partner Server. the COntent is for example:
"Linux infong 2.4 #1 SMP Wed Jan 18 14:53:29 CET 2006 i686 unknown"

the problem is, that there is a "." in this string, so typo3 runs
$host = gethostbyaddr(gethostbyname($host));
and this line producese this error.

i think if you "say" if the string is longer than (xxx.xxx.xxx.xxx) it cound NOT be a ip-adress and if the string containt a " " it could not be a host-name

i changed the line
$host = php_uname('n');
to
$host = $_SERVER['HTTP_HOST'];

and for me it wirks fine!

(issue imported from #M3926)


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #16081: Wrong parameter count for php_uname() reported by using the htmlmail function with PHP 4.2.2ClosedMartin Kutschker2006-04-24

Actions
Actions #1

Updated by Michael Stucki over 18 years ago

That seems indeed like a reasonable problem. I will add the whitespace check which should solve the issue.

Actions #2

Updated by Michael Stucki over 18 years ago

Forget it, I just discovered that this is already fixed in 4.0.1:

// 'n' is ignored in broken installations
if (strpos($host, ' ')) $host = '';

Did you try the 4.0.1-rc1?

Actions

Also available in: Atom PDF