Bug #15950
closedExtension manager link in BE-Navigation wont launch extension manager
0%
Description
On a fresh install of 4.0rc2, the link for accessing the extension manager in the navigation column in the backend does not launch the extension manager. The other columns of the backend stay unchanged and show the last view before clicking the extension manager link.
This Problem remains when retrying, and after a logout/login cycle.
Backend viewed with Safari (Mac OS X 10.4.5). When viewed with Firefox (1.5) on Mac OS X, Firefox pops up a download-dialog titled "Opening index.php" with choices "Open with" or "Save to disk"
Install on debian woody, stock php and mysql, safe-mode enabled
(issue imported from #M3069)
Files
Updated by Rainer H¤rtlein over 18 years ago
Just for information : the same server runs 3.8.1 without problems
Updated by Franz Holzinger over 18 years ago
Set
memory_limit = 64M ; Maximum amount of memory a script may consume (32MB)
in php.ini.
Check entries in your php error_log file.
Updated by Rainer H¤rtlein over 18 years ago
memory_limit set to 64M, no changes. No output in error log either.
Updated by Ansgar Brauner over 18 years ago
Same problem on Windows viewed with iexplorer and firefox 1.5.0.1. The difference is that no pop-up-dialog is shown.
When viewed with Firefox the navigation-Frame is unchanged. the other frames doesnt show anything.
When viewed with iexplorer the other frame shows a page not found error.
Details: Fresh install, PHP 4, SuSE Linux, Apache 1.3.xx
update: Set the memorylimit to 64M nothing changes.
but it could be no solution to let a script consume so much memory. maybe the script could be optimized.
Updated by Rainer H¤rtlein over 18 years ago
Hmmm, I did a clean install of apache2, php5 and mysql4 via fink on a Macintosh running OS X 10.4.5, and retried typo3-4.0rc2 with this setup. No problems, access to extension manager works like expected.
So this is a completely different setup than the debian, apache 1.3, mysql3, php4.1.2 server I have the problem with, what could I do to help find the problem ? Where should I start ?
Updated by Franz Holzinger over 18 years ago
The mysql3 could be the reason.
Try to debug the sql statements created when you click on the EM link.
http://wiki.typo3.org/index.php/Extension_Development#Database
[SYS][sqlDebug] = 1
Updated by Rainer H¤rtlein over 18 years ago
[SYS][sqlDebug] = 1 inserted into localconf.php
No output when trying to access Extension Manager.
Updated by Rainer H¤rtlein over 18 years ago
Retried with typo3-4.0rc3, same result. Fresh install.
Should I file this with the new rc3 ?
Updated by Ansgar Brauner over 18 years ago
What prerequisites are defined for typo3v4? Maybe the problem is some piece of software which doesn't match the needed version. Maybe the MySQL-Server in version 3.xx.
Detailed Information about my System:
Server: Apache/1.3.26 (Linux/SuSE)
PHP/4.2.2
MySQL 3.23
PHP Memory Limit at 32 MB
Updated by Karsten Dambekalns over 18 years ago
I changed it to be under rc3.
I don't suspect this to be a SQL issue, but rather some PHP/Apache issue. It may be related to Apache segfaulting, so could you please check the Apache error log(s) and see if there are segfaults happening.
See also #15784 for a possible solution if this is indeed the problem.
Updated by Rainer H¤rtlein over 18 years ago
Error log checked, apache is indeed segfaulting.
Our PHP-Version is 4.1.2, so this might be the problem.
I do not really see a solution in the related bug report, if it is not upgrading php to version >= 4.4.3
(Jörg Wagner says : There is a bug in PHP up to 4.4.2 ...) but upgrading does not seem a solution for debian woody users, still stuck with PHP 4.1.2, unless they choose a solution outside the regular debian apt-get upgrade system.
Updated by Ansgar Brauner over 18 years ago
Any news?
I also get a segmentation fault in my log files.
Updated by Rainer H¤rtlein over 18 years ago
Any ideas since ? I have to install a new typo3 based site on our debian server, and I'd hate to be forced to do it with 3.8 ...
Updated by J¶rg Wagner over 18 years ago
Unfortunatelly PHP 4.4.3 is still not released, but since I installed 4.4.3dev I have a completely stable system and EM is working nicely again (see http://bugs.typo3.org/view.php?id=2795 ). Bad luck for Debian users though.
Updated by Rainer H¤rtlein over 18 years ago
I'd be ready to spend some time to track down / solve the problem by modifying the Extension Manager if anybody could tell me where to start ... I never looked inside the Extension manager, so a little hint would be appreciated.
Updated by Rainer H¤rtlein over 18 years ago
I'm on something here !!!
I tracked down the problem to a php function used in function fixEMCONF in class.em_index.php.
The php function is version_compare(), when I comment out the four lines (2974, 2975, 2980, 2981) including this php function, the extension manager causes no segfault.
This should be REALLY easy to fix, no ?
Googling a bit, I found cases of version_compare segfaulting, when entering a infinite recursive loop ...
Updated by Rainer H¤rtlein over 18 years ago
Here is the solution (I'm testing it ...) :
The problem seems to be version_compare segfaulting when an empty string is passed to one of the parameters. the function splitVersionRange() returns empty strings when its argument is like '-' or '3.7.0-', and these strings are passed into version_compare in function fixEMCONF().
My solution is modifying function splitVersionRange() as follows :
function splitVersionRange($ver) {
$versionRange = array();
if(strstr($ver, '-')) {
$versionRange = explode('-', $ver, 2);
if(!$versionRange[0]) $versionRange[0] = '0.0.0';
if(!$versionRange[1]) $versionRange[1] = '0.0.0';
} else {
$versionRange[0] = $ver;
$versionRange[1] = '0.0.0';
}
return $versionRange;
}
Maybe somebody has a more elegant solution ? I continue testing and will post results here.
Updated by J¶rg Wagner over 18 years ago
Can it really be so simple!
Have a look at http://bugs.php.net/search.php?cmd=display&search_for=version_compare
... it seems that version_compare() has been known to segfault on PHP versions before 4.3 !!!
Updated by Ansgar Brauner over 18 years ago
Nice debug work!
It seems that the Patch is working fine. nearly all functions of the Extensionmanager are working. But if i try to import an extension and try to show the repository i get the following error:
Warning: Wrong parameter count for implode() in /home/www/typo3_src-4.0/typo3/mod/tools/em/class.em_index.php on line 1392
i didnt have a look at the code yet. i will report here if i find any news.
Updated by Rainer H¤rtlein over 18 years ago
Yesterday I did a complete rework of the class, there were several issues with php 4.1.2 now everything seems to work. I contacted Karsten because I wanted him to have a look at my changes, as there are some things I am not really sure of. I am going to post a complete version somewhere later.
Updated by H Klausner over 18 years ago
Same Problem with 4.0 final on 2 Servers having PHP 4.2.2 and 4.1.2, both with MYSQL 3.23. Having the same Error (Wrong parameter count for implode ...) after making suggested changes in class.em_index.php.
Is there a fix already?
Updated by Rainer H¤rtlein over 18 years ago
I am running a modified version of extension manager now which runs great on php 4.1.2. I'd be glad to share the code, and I'd be even more happy to contribute the chages to typo3. I tried to get in touch with Karsten Dambekalns in order to check my additions / modifications together, but I did not get a reply.
How could I share the code ? Anyone an idea ?
Updated by Ansgar Brauner over 18 years ago
Just make a diff to the original Class an attach this file to a note in this thread.Or post the complete new file. Maybe it would be better topost the complete file.Maybe we have different Versions ofthe File.
Updated by Karsten Dambekalns over 18 years ago
Rainer, sorry I didn't get back to you yet - I received your email, of course...
Anyway, just attach a diff to this tracker item, that's a good start anyway!
Updated by Rainer H¤rtlein over 18 years ago
Uploaded the class. Changes preventing the crash concern the function splitVersionRange, as it can return an empty string as result. The reason for the crash is php's version_compare function crashing when given an empty string as argument. I chose to return "0" rather than an empty string, but in some cases the Extension manager throws a warning, if an extension developer left empty the information about a required version (ex : php is 4.1.2 required php version is empty strin, so extension manager complains about not meeting the requirements for version 0)
Other changes concern the use of php's implode function. As of php version 4.3.0, the glue parameter is optional, but php 4.1.2 complains about missing parameter count if not set ( ex : implode(array( ...)) instead of implode('', array(...)). My changes fixed that.
BTW for those who want to use templavoila with typo3-4.0, the last version of TV working with php 4.1.2 is TV 0.4.0 which works well for me. But there also is an include statement without glue parameter somewhere. I did not try to "backport" the last version of TV to php 4.1.2 anyone knows which are the features / code parts requiring higher php versions in TV ?
Updated by H Klausner over 18 years ago
Works for me so far on PHP 4.2.2 and 4.1.2. THANX
Updated by Andreas Zedler over 18 years ago
I have the same error with:
Windows 2003 Server
PHP 5.1.2
MySQL 5.0.19
Apache2.0.55
Firefox 1.5.0.4
Until now all works fine (more or less ;-)) with TYPO3 3.8.1 dummy package.
Now I use TYPO3 Version 4.0 final
( Downloads from www.typo3.org: dummy-4.0.zip, typo3_src-4.0.zip)
csh_de is not installed.
typo3conf\l10n was empty in the dummy package!
I have downloaded the new language packs from
www.typo3.net/fileadmin/downloads/l10n.tgz
German BE-Language works fine.
Intrestingly the bug discussed here occured first time after I have
changed the Backend Language in the Setup of the "User"-Modul.
After "Reset all Values to default" Extension Manager works again!
But when I tryed to "Save Selection", the one and only button (!)
in "Translation Handling" => "Translation Settings"
I get mouse arrow with "egg timer"and then an empty page.
And again the whole Extension Manger fails with empty page.
Now the step with the user-setup to reactivate the EM is reproducibly.
No entry in the PHP error log!
No entry in Apache error log!
memory_limit =128M
Questions:
1.)
Were can I download the official Version 4-compatible
Language Packs from the official TYPO3 page (www.typo3.org)?
2.)
Where can I found up-to-date documentations, espically an installation instruction (merging of two downloads, creating of the missing dirs, new language pack version, I have to load down from where. And so on)?
Most documents I found are not for the new Version 4!
Updated by Rainer H¤rtlein over 18 years ago
Andreas,
did you try the class I uploaded here previously ? There should be no link between the settings and the extension manager problem, as the source lies in a php function. Also it should not concern your php version, as the bug has been fixed since (see other posts)
Updated by Andreas Zedler over 18 years ago
Rainer and all,
sorry for my long notes. I'm a newbee and TYPO3- U S E R only and not a PHP-Programmer. It's very difficult, to find appropriate information related to TYPO3 .
Have uploaded the class to <Document Root>\dummy-4.0\typo3\mod\tools\em.
Great!
It works, but once more first after a renewed "Reset all Values to default" in the USER-Setup and subsequent changing to the desired setup.
Thank you very much!
My dream of an permanent updated install intruction for non-PHP-Programmers, that includes all the hints to veryfied REQUIRED!!! bugfixes remains....
Updated by Ansgar Brauner about 18 years ago
Problem disappers with PHP 4.4.4
it would be nice if there would be a hint in the requierements until this bug is solved in the core.
Updated by Michael Stucki about 18 years ago
Updated by Michael Stucki about 18 years ago
According to user feedback, the attached patch should solve the problem...
Updated by Gerwin Brill about 18 years ago
There exists another problem with Typo3 4.x on Hosts running PHP 4.1.x besides the version_compare bug. class.em_index.php makes use of the function md5_file() which is available since PHP Version 4.2. The attached patch incorporates the diff-file which solves the version_compare problem, but adds a local replacement for calls to md5_file.
Updated by Michael Stucki almost 18 years ago
Will be fixed in TYPO3 4.0.5 and 4.1