Project

General

Profile

Actions

Bug #25292

closed

Exception "tx_em_Parser_MirrorXmlPushParser: Unable to create XML parser" when updating extension list

Added by Daniel Minder about 13 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Extension Manager
Target version:
-
Start date:
2011-03-09
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
4.5
PHP Version:
5.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

This happens both when clicking on the Retrieve/Update button in the new extension manager and when using the Update Extension List task in T3 4.5.2 (Side note: I had to fix the requireOnce() call in class.tx_em_parser_mirrorxmlabstractparser.php first, but this is already removed in SVN).

In tx_em_Repository_Utility->updateExtList(), isExtListUpdateNecessary() is called which calls getRemoteExtHashFile(). After this fetchExtListFile() is called which calls getRemoteExtListFile(). Both getRemoteExtHashFile() and getRemoteExtListFile() call getMirrors(TRUE) which result in tx_em_Import_MirrorListImporter->getMirrors() and tx_em_Parser_MirrorXmlPushParser->parseXML() calls.

And here is the source of the problem: The XML parser (objXML member) is created in the constructor of the tx_em_Parser_MirrorXmlPushParser class, but freed at the end of the parseXML() method. Therefore, in the second call to parseXML() objXML is not a resource any more and the exception is thrown.

My current solution is to move the following lines from tx_em_Parser_MirrorXmlPushParser __construct() to the beginning of method parseXML():
if ($this->isAvailable()) {
$this->objXML = xml_parser_create();
xml_set_object($this->objXML, $this);
}

(issue imported from #M17906)

Actions #1

Updated by Daniel Minder almost 13 years ago

  • Target version deleted (0)

The bug is still present in TYPO3 4.5.3 and can be solved in the same way.

But it might not appear on many systems since most users will run PHP >= 5.1.0. Then, tx_em_Parser_MirrorXmlPullParser is available which runs without problems.

In our case, PHP was compiler without xmlreader, which is necessary for the pull parser. Therefore, the push parser was used - with the effects described above.

Actions #2

Updated by Sebastian Michaelsen over 12 years ago

I also ran into this. It turns out that the PHP used is also compiled without xmlreader.

Actions #3

Updated by Christian no-lastname-given over 12 years ago

I also ran into this bug on Typo3 4.5.4. But the fix above works.

Actions #4

Updated by Frank over 12 years ago

  • % Done changed from 0 to 100

Had the same Problem with TYPO3 4.6.1

After installing xmlreader for php it works.

Actions #5

Updated by Daniel Minder over 12 years ago

  • % Done changed from 100 to 0

Why did you change "Done" to 100%? It's not done - if the push parser is used because xmlreader is not present the problem still occurs!

Either fix it or remove the whole push parser. I switch this back to 0%...

Actions #6

Updated by Ralf Richter about 12 years ago

Hi all,
i ran into same issue. First Download of Repository is no Problem. But updating will cause the issue.
I followed your workaround which relly workes well. Thank you there fore - it would be nice to have it wolved for next Version.

My Typo3 Version is current stable: 4.6.4.

Actions #7

Updated by Stanislas Rolland about 12 years ago

  • Category set to Extension Manager
Actions #8

Updated by Stanislas Rolland about 12 years ago

Ralf Richter wrote:

Hi all,
i ran into same issue. First Download of Repository is no Problem. But updating will cause the issue.
I followed your workaround which relly workes well. Thank you there fore - it would be nice to have it wolved for next Version.

My Typo3 Version is current stable: 4.6.4.

What version of PHP? Why is xmlreader not available?

Actions #9

Updated by Stanislas Rolland about 12 years ago

I am not able to reproduce this issue with TYPO3 4.6.4. Please explain how to reproduce.

Actions #10

Updated by Stefan Galinski about 12 years ago

  • Status changed from New to Needs Feedback
Actions #11

Updated by Jean-Sébastien Gervais about 12 years ago

I had this error as well for a couple of months on a server, however, I didn't have much time or need to fix it until now.

It affected TYPO3 version 4.5.4 - 4.5.11 on my system, although, a missing php component is really to blame ..

In TYPO3 Log
Core: Error handler (BE): PHP Warning: filemtime(): stat failed for /opt/www/www.domain.com/html/typo3temp/extensions.xml.gz in /opt/www/TYPO3/typo3_src-4.5.11/typo3/sysext/em/classes/index.php line 2466

With Centos 6 / RHEL 6, I believe the default Php build comes with xmlreader disabled, the only thing I had to do was to install the php-xml package on my server.

Here's a quick how to for federa/centos/red-hat servers, assuming you have the right repositories set up.

sudo yum install php-xml.x86_64
Loaded plugins: rhnplugin
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package php-xml.x86_64 0:5.3.3-3.el6_2.6 will be installed
--> Processing Dependency: php-common = 5.3.3-3.el6_2.6 for package: php-xml-5.3.3-3.el6_2.6.x86_64
--> Running transaction check
---> Package php-common.x86_64 0:5.3.3-3.el6 will be updated
--> Processing Dependency: php-common = 5.3.3-3.el6 for package: php-mbstring-5.3.3-3.el6.x86_64
--> Processing Dependency: php-common = 5.3.3-3.el6 for package: php-5.3.3-3.el6.x86_64
--> Processing Dependency: php-common = 5.3.3-3.el6 for package: php-cli-5.3.3-3.el6.x86_64
--> Processing Dependency: php-common = 5.3.3-3.el6 for package: php-ldap-5.3.3-3.el6.x86_64
--> Processing Dependency: php-common = 5.3.3-3.el6 for package: php-mysql-5.3.3-3.el6.x86_64
--> Processing Dependency: php-common = 5.3.3-3.el6 for package: php-pdo-5.3.3-3.el6.x86_64
--> Processing Dependency: php-common = 5.3.3-3.el6 for package: php-gd-5.3.3-3.el6.x86_64
---> Package php-common.x86_64 0:5.3.3-3.el6_2.6 will be an update
--> Running transaction check
---> Package php.x86_64 0:5.3.3-3.el6 will be updated
---> Package php.x86_64 0:5.3.3-3.el6_2.6 will be an update
---> Package php-cli.x86_64 0:5.3.3-3.el6 will be updated
---> Package php-cli.x86_64 0:5.3.3-3.el6_2.6 will be an update
---> Package php-gd.x86_64 0:5.3.3-3.el6 will be updated
---> Package php-gd.x86_64 0:5.3.3-3.el6_2.6 will be an update
---> Package php-ldap.x86_64 0:5.3.3-3.el6 will be updated
---> Package php-ldap.x86_64 0:5.3.3-3.el6_2.6 will be an update
---> Package php-mbstring.x86_64 0:5.3.3-3.el6 will be updated
---> Package php-mbstring.x86_64 0:5.3.3-3.el6_2.6 will be an update
---> Package php-mysql.x86_64 0:5.3.3-3.el6 will be updated
---> Package php-mysql.x86_64 0:5.3.3-3.el6_2.6 will be an update
---> Package php-pdo.x86_64 0:5.3.3-3.el6 will be updated
---> Package php-pdo.x86_64 0:5.3.3-3.el6_2.6 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

===============================================================================================================================================================================================================
Package Arch Version Repository Size ===============================================================================================================================================================================================================
Installing:
php-xml x86_64 5.3.3-3.el6_2.6 rhel-x86_64-server-6 100 k
Updating for dependencies:
php x86_64 5.3.3-3.el6_2.6 rhel-x86_64-server-6 1.1 M
php-cli x86_64 5.3.3-3.el6_2.6 rhel-x86_64-server-6 2.2 M
php-common x86_64 5.3.3-3.el6_2.6 rhel-x86_64-server-6 522 k
php-gd x86_64 5.3.3-3.el6_2.6 rhel-x86_64-server-6 104 k
php-ldap x86_64 5.3.3-3.el6_2.6 rhel-x86_64-server-6 36 k
php-mbstring x86_64 5.3.3-3.el6_2.6 rhel-x86_64-server-optional-6 453 k
php-mysql x86_64 5.3.3-3.el6_2.6 rhel-x86_64-server-6 79 k
php-pdo x86_64 5.3.3-3.el6_2.6 rhel-x86_64-server-6 73 k

Transaction Summary ===============================================================================================================================================================================================================
Install 1 Package(s)
Upgrade 8 Package(s)

Total download size: 4.6 M
Is this ok [y/N]: y
Downloading Packages:
(1/9): php-5.3.3-3.el6_2.6.x86_64.rpm | 1.1 MB 00:00
(2/9): php-cli-5.3.3-3.el6_2.6.x86_64.rpm | 2.2 MB 00:00
(3/9): php-common-5.3.3-3.el6_2.6.x86_64.rpm | 522 kB 00:00
(4/9): php-gd-5.3.3-3.el6_2.6.x86_64.rpm | 104 kB 00:00
(5/9): php-ldap-5.3.3-3.el6_2.6.x86_64.rpm | 36 kB 00:00
(6/9): php-mbstring-5.3.3-3.el6_2.6.x86_64.rpm | 453 kB 00:00
(7/9): php-mysql-5.3.3-3.el6_2.6.x86_64.rpm | 79 kB 00:00
(8/9): php-pdo-5.3.3-3.el6_2.6.x86_64.rpm | 73 kB 00:00
(9/9): php-xml-5.3.3-3.el6_2.6.x86_64.rpm | 100 kB 00:00
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 1.3 MB/s | 4.6 MB 00:03
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Updating : php-common-5.3.3-3.el6_2.6.x86_64 1/17
Updating : php-cli-5.3.3-3.el6_2.6.x86_64 2/17
Updating : php-pdo-5.3.3-3.el6_2.6.x86_64 3/17
Updating : php-mysql-5.3.3-3.el6_2.6.x86_64 4/17
Updating : php-5.3.3-3.el6_2.6.x86_64 5/17
Updating : php-gd-5.3.3-3.el6_2.6.x86_64 6/17
Updating : php-mbstring-5.3.3-3.el6_2.6.x86_64 7/17
Updating : php-ldap-5.3.3-3.el6_2.6.x86_64 8/17
Installing : php-xml-5.3.3-3.el6_2.6.x86_64 9/17
Cleanup : php-mysql-5.3.3-3.el6.x86_64 10/17
Cleanup : php-5.3.3-3.el6.x86_64 11/17
Cleanup : php-cli-5.3.3-3.el6.x86_64 12/17
Cleanup : php-pdo-5.3.3-3.el6.x86_64 13/17
Cleanup : php-ldap-5.3.3-3.el6.x86_64 14/17
Cleanup : php-mbstring-5.3.3-3.el6.x86_64 15/17
Cleanup : php-gd-5.3.3-3.el6.x86_64 16/17
Cleanup : php-common-5.3.3-3.el6.x86_64 17/17

Installed:
php-xml.x86_64 0:5.3.3-3.el6_2.6

Dependency Updated:
php.x86_64 0:5.3.3-3.el6_2.6 php-cli.x86_64 0:5.3.3-3.el6_2.6 php-common.x86_64 0:5.3.3-3.el6_2.6 php-gd.x86_64 0:5.3.3-3.el6_2.6 php-ldap.x86_64 0:5.3.3-3.el6_2.6
php-mbstring.x86_64 0:5.3.3-3.el6_2.6 php-mysql.x86_64 0:5.3.3-3.el6_2.6 php-pdo.x86_64 0:5.3.3-3.el6_2.6

Complete!

Actions #12

Updated by Daniel Minder almost 12 years ago

I have Fedora 16 installed in a VM and just tried to update the extension list - same error. I also had to install php-xml manually. But it would be better if the push parser was working...

Actions #13

Updated by Gerrit Code Review about 11 years ago

  • Status changed from Needs Feedback to Under Review

Patch set 1 for branch TYPO3_4-5 has been pushed to the review server.
It is available at https://review.typo3.org/18886

Actions #14

Updated by Marcus Krause about 11 years ago

I could this reproduce only with TYPO3 4-5 branch (4.5.25). (not with TYPO3 4-7)

Looks like this is originally is caused by an ExtDirect issue. However, the pushed patch to Gerrit resolves the issue by adjusting the Parser class.

Actions #15

Updated by Christian Kuhn about 11 years ago

reproduced in 4.5 and 4.7 by commenting out the MirrorXmlPullParser.

Actions #16

Updated by Gerrit Code Review about 11 years ago

Patch set 2 for branch TYPO3_4-5 has been pushed to the review server.
It is available at https://review.typo3.org/18886

Actions #17

Updated by Gerrit Code Review about 11 years ago

Patch set 1 for branch TYPO3_4-7 has been pushed to the review server.
It is available at https://review.typo3.org/18965

Actions #18

Updated by Gerrit Code Review about 11 years ago

Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/18966

Actions #19

Updated by Marcus Krause about 11 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #20

Updated by Gerrit Code Review about 11 years ago

  • Status changed from Resolved to Under Review

Patch set 1 for branch TYPO3_6-0 has been pushed to the review server.
It is available at https://review.typo3.org/18967

Actions #21

Updated by Christian Kuhn about 11 years ago

  • Status changed from Under Review to Resolved
Actions #22

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF