[TYPO3] External PHP executed twice?

Alexander Schloegl office at viennadesign.com
Fri Jul 7 23:08:50 CEST 2006

Hello all,

I included an external PHP-Skript on every page by using a template 
marker ###INDEX_HOOK### and the following TS and PHP code:

In the template:

includeLibs.indexhook = fileadmin/scripts/typo_includes/hook_index.php
blabla.marks.INDEX_HOOK = USER
blabla.marks.INDEX_HOOK.userFunc = user_indexhook

...and hook_index.php looks as follows:

function user_indexhook() {
	$content = '';

	$server = $_SERVER['SERVER_NAME'];
	mail("you at your.com","PHP test","$server\nSuccess!");

	return $content;


everything works fine (don't worry the mail is only for testing purposes ;)

but the problem is:
the mail is sent twice. One mail should be enough.

Any ideas why this happens? I haven't found a bug yet at bugs.typo3.org, 
do you think this is one to report?

regards and thanks


More information about the TYPO3-english mailing list