[TYPO3-core] RFC #17250: Bug: BE ajax request fails on some systems with php 5.3

Ernesto Baschny [cron IT] ernst at cron-it.de
Mon Jan 24 08:16:28 CET 2011


Johannes Feustel schrieb am 23.01.2011 20:09:

> Bugtracker references:
> http://bugs.typo3.org/view.php?id=17250
> 
> Branches:
> 4.4, trunk
> 
> Problem:
> Beacause of a php bug on some systems the request to ajax.php fails. In
> ajax.php thi file is included as '../t3lib/class.t3lib_div.php' with
> relative path while init.php uses PATH_t3lib.'class.t3lib_div.php'. On
> some systems PHP seems not to be able to detect the already included
> file if different paths are used.
> This ends up in a completely broken BE. Only the flash message "No
> module found" appears.
> 
> Solution:
> Remove loading of t3lib_div which is included only for fetching
> _GP('ajaxID') and use $_REQUEST['ajaxID'] instead.
> 
> Notes:
> Was detected on mac/MAMP PHP 5.3.2 with introductionpackage 4.5RC1. I am
> not sure if many systems are detected but it doesn't hurt to fix it.
> 
> Since the code is the same I think this could also go to 4.4 branch.
> 
> Thanks for your great work on 4.5!

I would prefer to make it work with t3lib_div::_GP anyway and make the
requirement load.

ajax.php loads "init.php" some lines below your change, which means that
the auto-loader is then available. Try it out if you move the init.php
loading to the start and then no further "require" should be needed and
you can keep on using t3lib_div.

Cheers,
Ernesto



More information about the TYPO3-team-core mailing list