Bug #20266
closedTypo3 raises many PHP Notice errors in php.log
0%
Description
Usually we do only log errors. However if you set the log level to E_ALL in your php.ini, you'll see that typo3 and typo3 extensions do write lots of PHP Notice stuff in the log, making it grow very quickly.
I know many people will answer "you should raise the log level to errors only and the problem is gone". But these notices seem to me to be true problems which may trigger error mechanisms lowering the performance of Typo3.
I beleive it would be a good thing to solve those problematic notices if we can.
Here is what is output on my installation while loading a single page :
[02-Apr-2009 17:46:56] PHP Notice: Use of undefined constant PATH_this - assumed 'PATH_this' in /var/www/vhosts/agam.org/httpdocs/typo3conf/ext/captcha/captcha/captcha.php on line 39
[02-Apr-2009 17:46:56] PHP Notice: Use of undefined constant PATH_site - assumed 'PATH_site' in /var/www/vhosts/agam.org/httpdocs/typo3conf/ext/captcha/captcha/captcha.php on line 40
[02-Apr-2009 17:46:56] PHP Notice: Use of undefined constant PATH_typo3conf - assumed 'PATH_typo3conf' in /var/www/vhosts/agam.org/httpdocs/typo3conf/ext/captcha/captcha/captcha.php on line 41
[02-Apr-2009 17:46:56] PHP Notice: Use of undefined constant PATH_t3lib - assumed 'PATH_t3lib' in /var/www/vhosts/agam.org/httpdocs/typo3conf/ext/captcha/captcha/captcha.php on line 42
[02-Apr-2009 17:46:56] PHP Notice: Use of undefined constant PATH_tslib - assumed 'PATH_tslib' in /var/www/vhosts/agam.org/httpdocs/typo3conf/ext/captcha/captcha/captcha.php on line 43
[02-Apr-2009 17:46:56] PHP Notice: Undefined variable: TYPO3_AJAX in /var/www/vhosts/agam.org/httpdocs/typo3_src-4.2.6/t3lib/config_default.php on line 437
[02-Apr-2009 17:46:56] PHP Notice: Undefined variable: TT in /var/www/vhosts/agam.org/httpdocs/typo3_src-4.2.6/t3lib/config_default.php on line 441
[02-Apr-2009 17:46:56] PHP Notice: Undefined index: cms in /var/www/vhosts/agam.org/httpdocs/typo3conf/temp_CACHED_psce42_ext_localconf.php on line 13
[02-Apr-2009 17:46:56] PHP Notice: Undefined index: sv in /var/www/vhosts/agam.org/httpdocs/typo3conf/temp_CACHED_psce42_ext_localconf.php on line 45
[02-Apr-2009 17:46:56] PHP Notice: Undefined index: css_styled_content in /var/www/vhosts/agam.org/httpdocs/typo3conf/temp_CACHED_psce42_ext_localconf.php on line 79
[02-Apr-2009 17:46:56] PHP Notice: unserialize() [<a href='function.unserialize'>function.unserialize</a>]: Argument is not a string in /var/www/vhosts/agam.org/httpdocs/typo3conf/temp_CACHED_psce42_ext_localconf.php on line 86
[02-Apr-2009 17:46:56] PHP Notice: Undefined index: lowlevel in /var/www/vhosts/agam.org/httpdocs/typo3conf/temp_CACHED_psce42_ext_localconf.php on line 121
[02-Apr-2009 17:46:56] PHP Notice: Undefined index: install in /var/www/vhosts/agam.org/httpdocs/typo3conf/temp_CACHED_psce42_ext_localconf.php on line 149
[02-Apr-2009 17:46:56] PHP Notice: Undefined index: beuser in /var/www/vhosts/agam.org/httpdocs/typo3conf/temp_CACHED_psce42_ext_localconf.php on line 173
[02-Apr-2009 17:46:56] PHP Notice: Undefined index: rtehtmlarea in /var/www/vhosts/agam.org/httpdocs/typo3conf/temp_CACHED_psce42_ext_localconf.php on line 188
[02-Apr-2009 17:46:56] PHP Notice: unserialize() [<a href='function.unserialize'>function.unserialize</a>]: Argument is not a string in /var/www/vhosts/agam.org/httpdocs/typo3conf/temp_CACHED_psce42_ext_localconf.php on line 335
[02-Apr-2009 17:46:56] PHP Notice: Undefined offset: 2 in /var/www/vhosts/agam.org/httpdocs/typo3_src-4.2.6/t3lib/class.t3lib_div.php on line 1002
[02-Apr-2009 17:46:56] PHP Notice: Undefined index: t3skin in /var/www/vhosts/agam.org/httpdocs/typo3conf/temp_CACHED_psce42_ext_localconf.php on line 434
[02-Apr-2009 17:46:56] PHP Notice: Undefined index: static_info_tables in /var/www/vhosts/agam.org/httpdocs/typo3conf/temp_CACHED_psce42_ext_localconf.php on line 452
[02-Apr-2009 17:46:56] PHP Notice: unserialize() [<a href='function.unserialize'>function.unserialize</a>]: Argument is not a string in /var/www/vhosts/agam.org/httpdocs/typo3conf/temp_CACHED_psce42_ext_localconf.php on line 480
[02-Apr-2009 17:46:56] PHP Notice: Undefined index: ext/static_info_tables/class.tx_staticinfotables_div.php in /var/www/vhosts/agam.org/httpdocs/typo3conf/ext/static_info_tables/class.tx_staticinfotables_div.php on line 626
[02-Apr-2009 17:46:56] PHP Notice: Undefined offset: 43 in /var/www/vhosts/agam.org/httpdocs/typo3_src-4.2.6/t3lib/class.t3lib_extmgm.php on line 895
[02-Apr-2009 17:46:56] PHP Notice: Undefined index: cssstyledcontent/static/ in /var/www/vhosts/agam.org/httpdocs/typo3_src-4.2.6/t3lib/class.t3lib_extmgm.php on line 897
[02-Apr-2009 17:46:56] PHP Notice: Undefined index: thumbsizes in /var/www/vhosts/agam.org/httpdocs/typo3conf/ext/dam/lib/tx_dam_types.php on line 235
[02-Apr-2009 17:46:56] PHP Notice: Undefined index: FE in /var/www/vhosts/agam.org/httpdocs/typo3conf/ext/dam/lib/tx_dam_types.php on line 252
[02-Apr-2009 17:46:56] PHP Notice: Undefined index: ext/dam/lib/class.tx_dam_db.php in /var/www/vhosts/agam.org/httpdocs/typo3conf/ext/dam/lib/class.tx_dam_db.php on line 1638
[02-Apr-2009 17:46:56] PHP Notice: Undefined index: ext/dam/lib/class.tx_dam_allowdeny.php in /var/www/vhosts/agam.org/httpdocs/typo3conf/ext/dam/lib/class.tx_dam_allowdeny.php on line 448
[02-Apr-2009 17:46:56] PHP Notice: Undefined index: ext/dam/lib/class.tx_dam.php in /var/www/vhosts/agam.org/httpdocs/typo3conf/ext/dam/lib/class.tx_dam.php on line 2979
[02-Apr-2009 17:46:56] PHP Notice: Undefined index: ext/dam/lib/class.tx_dam_image.php in /var/www/vhosts/agam.org/httpdocs/typo3conf/ext/dam/lib/class.tx_dam_image.php on line 383
[02-Apr-2009 17:46:56] PHP Notice: Undefined variable: TYPO3_CONF_VARS in /var/www/vhosts/agam.org/httpdocs/typo3conf/ext/dam/lib/class.tx_dam_config.php on line 347
[02-Apr-2009 17:46:56] PHP Notice: Undefined index: userTSconfig. in /var/www/vhosts/agam.org/httpdocs/typo3conf/ext/dam/lib/class.tx_dam_config.php on line 76
[02-Apr-2009 17:46:56] PHP Notice: Undefined index: TSFE in /var/www/vhosts/agam.org/httpdocs/typo3conf/ext/dam/lib/class.tx_dam_config.php on line 272
[02-Apr-2009 17:46:56] PHP Notice: Undefined index: BE_USER in /var/www/vhosts/agam.org/httpdocs/typo3conf/ext/dam/lib/class.tx_dam_config.php on line 292
[02-Apr-2009 17:46:56] PHP Notice: Undefined index: pageTSconfig. in /var/www/vhosts/agam.org/httpdocs/typo3conf/ext/dam/lib/class.tx_dam_config.php on line 81
[02-Apr-2009 17:46:56] PHP Notice: Undefined index: TSFE in /var/www/vhosts/agam.org/httpdocs/typo3conf/ext/dam/lib/class.tx_dam_db.php on line 1189
[02-Apr-2009 17:46:56] PHP Notice: Undefined index: ext/dam/lib/class.tx_dam_sysfolder.php in /var/www/vhosts/agam.org/httpdocs/typo3conf/ext/dam/lib/class.tx_dam_sysfolder.php on line 164
[02-Apr-2009 17:46:56] PHP Notice: Undefined index: TYPO3_DB in /var/www/vhosts/agam.org/httpdocs/typo3conf/ext/dam/lib/class.tx_dam_sysfolder.php on line 70
[02-Apr-2009 17:46:56] PHP Notice: Undefined index: setup. in /var/www/vhosts/agam.org/httpdocs/typo3conf/ext/dam/lib/class.tx_dam_config.php on line 176
[02-Apr-2009 17:46:56] PHP Notice: Undefined index: pageUserTSconfig. in /var/www/vhosts/agam.org/httpdocs/typo3conf/ext/dam/lib/class.tx_dam_config.php on line 194
[02-Apr-2009 17:46:56] PHP Notice: Undefined index: setup. in /var/www/vhosts/agam.org/httpdocs/typo3_src-4.2.6/t3lib/class.t3lib_div.php on line 1835
[02-Apr-2009 17:46:56] PHP Notice: Use of undefined constant TYPO3_OS - assumed 'TYPO3_OS' in /var/www/vhosts/agam.org/httpdocs/typo3_src-4.2.6/t3lib/class.t3lib_div.php on line 3827
[02-Apr-2009 17:46:56] PHP Notice: Undefined index: fileIconPaths_FE in /var/www/vhosts/agam.org/httpdocs/typo3conf/ext/dam/lib/class.tx_dam.php on line 2759
[02-Apr-2009 17:46:56] PHP Notice: Use of undefined constant TYPO3_OS - assumed 'TYPO3_OS' in /var/www/vhosts/agam.org/httpdocs/typo3_src-4.2.6/t3lib/class.t3lib_div.php on line 3827
[02-Apr-2009 17:46:56] PHP Notice: Undefined index: fileIconPaths_BE in /var/www/vhosts/agam.org/httpdocs/typo3conf/ext/dam/lib/class.tx_dam.php on line 2759
[02-Apr-2009 17:46:56] PHP Notice: Undefined offset: 2 in /var/www/vhosts/agam.org/httpdocs/typo3_src-4.2.6/t3lib/class.t3lib_div.php on line 1002
[02-Apr-2009 17:46:56] PHP Notice: Undefined offset: 2 in /var/www/vhosts/agam.org/httpdocs/typo3_src-4.2.6/t3lib/class.t3lib_div.php on line 1002
[02-Apr-2009 17:46:56] PHP Notice: Undefined offset: 1 in /var/www/vhosts/agam.org/httpdocs/typo3conf/ext/dam/lib/class.tx_dam.php on line 2939
[02-Apr-2009 17:46:56] PHP Notice: Undefined offset: 1 in /var/www/vhosts/agam.org/httpdocs/typo3conf/ext/dam/lib/class.tx_dam.php on line 2939
[02-Apr-2009 17:46:56] PHP Notice: Undefined offset: 1 in /var/www/vhosts/agam.org/httpdocs/typo3conf/ext/dam/lib/class.tx_dam.php on line 2939
[02-Apr-2009 17:46:56] PHP Notice: Undefined offset: 1 in /var/www/vhosts/agam.org/httpdocs/typo3conf/ext/dam/lib/class.tx_dam.php on line 2939
[02-Apr-2009 17:46:56] PHP Notice: Undefined offset: 1 in /var/www/vhosts/agam.org/httpdocs/typo3conf/ext/dam/lib/class.tx_dam.php on line 2939
[02-Apr-2009 17:46:56] PHP Notice: Undefined offset: 1 in /var/www/vhosts/agam.org/httpdocs/typo3conf/ext/dam/lib/class.tx_dam.php on line 2939
[02-Apr-2009 17:46:56] PHP Notice: Undefined offset: 1 in /var/www/vhosts/agam.org/httpdocs/typo3conf/ext/dam/lib/class.tx_dam.php on line 2939
[02-Apr-2009 17:46:56] PHP Notice: Undefined offset: 1 in /var/www/vhosts/agam.org/httpdocs/typo3conf/ext/dam/lib/class.tx_dam.php on line 2939
[02-Apr-2009 17:46:56] PHP Notice: Undefined offset: 1 in /var/www/vhosts/agam.org/httpdocs/typo3conf/ext/dam/lib/class.tx_dam.php on line 2939
[02-Apr-2009 17:46:56] PHP Notice: Undefined offset: 1 in /var/www/vhosts/agam.org/httpdocs/typo3conf/ext/dam/lib/class.tx_dam.php on line 2939
[02-Apr-2009 17:46:56] PHP Notice: Undefined offset: 1 in /var/www/vhosts/agam.org/httpdocs/typo3conf/ext/dam/lib/class.tx_dam.php on line 2939
[02-Apr-2009 17:46:56] PHP Notice: Undefined offset: 1 in /var/www/vhosts/agam.org/httpdocs/typo3conf/ext/dam/lib/class.tx_dam.php on line 2939
[02-Apr-2009 17:46:56] PHP Notice: Undefined offset: 1 in /var/www/vhosts/agam.org/httpdocs/typo3conf/ext/dam/lib/class.tx_dam.php on line 2939
[02-Apr-2009 17:46:56] PHP Notice: Undefined index: dropdown_sitemap in /var/www/vhosts/agam.org/httpdocs/typo3conf/temp_CACHED_psce42_ext_localconf.php on line 958
[02-Apr-2009 17:46:56] PHP Notice: Undefined offset: 43 in /var/www/vhosts/agam.org/httpdocs/typo3_src-4.2.6/t3lib/class.t3lib_extmgm.php on line 895
[02-Apr-2009 17:46:56] PHP Notice: Undefined index: cssstyledcontent/static/ in /var/www/vhosts/agam.org/httpdocs/typo3_src-4.2.6/t3lib/class.t3lib_extmgm.php on line 897
[02-Apr-2009 17:46:56] PHP Notice: Undefined index: devlog in /var/www/vhosts/agam.org/httpdocs/typo3conf/temp_CACHED_psce42_ext_localconf.php on line 1012
[02-Apr-2009 17:46:56] PHP Notice: Undefined index: ext/rgsmoothgallery/class.tx_rgsmoothgallery_fe.php in /var/www/vhosts/agam.org/httpdocs/typo3conf/ext/rgsmoothgallery/class.tx_rgsmoothgallery_fe.php on line 239
[02-Apr-2009 17:46:56] PHP Notice: Undefined index: flvplayer2 in /var/www/vhosts/agam.org/httpdocs/typo3conf/temp_CACHED_psce42_ext_localconf.php on line 1106
[02-Apr-2009 17:46:56] PHP Notice: Undefined index: flvplayer in /var/www/vhosts/agam.org/httpdocs/typo3_src-4.2.6/t3lib/class.t3lib_extmgm.php on line 774
[02-Apr-2009 17:46:56] PHP Notice: Undefined index: cwt_feedit in /var/www/vhosts/agam.org/httpdocs/typo3conf/temp_CACHED_psce42_ext_localconf.php on line 1139
[02-Apr-2009 17:46:56] PHP Notice: Undefined index: cwt_community in /var/www/vhosts/agam.org/httpdocs/typo3conf/temp_CACHED_psce42_ext_localconf.php on line 1152
[02-Apr-2009 17:46:56] PHP Notice: Undefined index: vge_tagcloud in /var/www/vhosts/agam.org/httpdocs/typo3conf/temp_CACHED_psce42_ext_localconf.php on line 1174
[02-Apr-2009 17:46:56] PHP Notice: Undefined index: loginbox_macmade in /var/www/vhosts/agam.org/httpdocs/typo3conf/temp_CACHED_psce42_ext_localconf.php on line 1200
[02-Apr-2009 17:46:56] PHP Notice: Undefined index: ext/tt_address/class.tx_ttaddress_compat.php in /var/www/vhosts/agam.org/httpdocs/typo3conf/ext/tt_address/class.tx_ttaddress_compat.php on line 92
[02-Apr-2009 17:46:56] PHP Notice: Undefined variable: TT in /var/www/vhosts/agam.org/httpdocs/typo3_src-4.2.6/t3lib/config_default.php on line 455
So it would be a good practice to turn on E_NOTICE logging when developping for Typo3...
Here are the solutions of 2 errors I have figured before realizing there were so many to fix. You may want to include these fixes into the trunk already :
Symptom:
[02-Apr-2009 17:36:01] PHP Notice: Undefined variable: TT in /var/www/vhosts/agam.org/httpdocs/typo3_src-4.2.6/t3lib/config_default.php on line 455
Solution:
Edit: /typo3_src-4.2.6/t3lib/config_default.php Line 455
remove: if (TYPO3_MODE=='FE' && is_object($TT)) $TT->pull();
add: if (TYPO3_MODE=='FE' && is_object($TT) && isset($TT)) $TT->pull();
Symptom:
[02-Apr-2009 17:36:01] PHP Notice: Undefined index: T3_SERVICES in /var/www/vhosts/agam.org/httpdocs/typo3_src-4.2.6/t3lib/class.t3lib_extmgm.php on line 531
Solution:
Edit: /typo3_src-4.2.6/t3lib/class.t3lib_extmgm.php Line 531
remove: if (is_array($TYPO3_CONF_VARS['T3_SERVICES'][$serviceType][$serviceKey])) {
add: if (isset($TYPO3_CONF_VARS['T3_SERVICES']) && is_array($TYPO3_CONF_VARS['T3_SERVICES'][$serviceType][$serviceKey])) {
(issue imported from #M10832)
Updated by Christian Kuhn over 14 years ago
Resolved as dulicate of #22398 as this is basically the same issue.