How to get PHP-Includes work under Typo3 4.5
By updating some Typo3 websites to the current version 4.5, i have the problem that the PHP-Includes no longer work. Now, at first i have a look about, how and from where the PHP-File is included. The PHP-File is currently located within the fileadmin directory, and included with a bit TypoScript.
After inspect the TypoScript Debugger, quickly turns out that the problem is the directory where the included files are located. The fileadmin directory is in the default configuration of Typo3 4.5 not allowed, as a PHP include path.
After a little research i found two ways for a solution. The first is, to relocate the PHP-File into a valid directory like the uploads directory. The second is, add the current PHP-File directory to the allowed paths.
I decide me for the second solution, because it is the faster way for the existing version.
How to add an allowed path?!
Open the /typo3conf/localconf.php and add the following row:
$TYPO3_CONF_VARS['FE']['addAllowedPaths'] = "folder1/,folder2/";
Tipp: When you set up a new Typo3-Site, don’t forget to place all your files in the uploads directory 😉