Project

General

Profile

Actions

Bug #18689

closed

Cannot upgrade from 4.1.6 to 4.2.0 due to error

Added by Bill Taroli over 16 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Category:
Install Tool
Target version:
-
Start date:
2008-04-24
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.2
PHP Version:
5.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

In the process of upgrading from 4.1.6 to 4.2, I first duplicated my 4.1.6 site (alternate URL) and verified it functioned properly there. Next I take the usual upgrade steps, ending with replacing the typo3_src symlink and entering the install tool. Upon doing so, I get the following result in the page output:

Fatal error: Call to a member function admin_get_charsets() on a non-object in /homepages/12/d196318331/htdocs/typo3/4.2.0/t3lib/class.t3lib_install.php on line 456

To test, I tried just updating the typo3_src link in my production site and the install page did display. After taking a backup of the prod site, I attempted to proceed with the upgrade there, thinking that perhaps a configuration file in the test duplicate was the fault. But upon resolving database differences in the install tool, I started getting the same error message there as well (and had to restore back to 4.1.6).

This looks almost identical to bug 8113 reported against 4.2RC1. That case was "magically fixed" when RC2 came out. But I find that I get this error no matter whether I use RC1, RC2, or GA source trees.
(issue imported from #M8231)


Files

bug_8231.diff (876 Bytes) bug_8231.diff Administrator Admin, 2008-04-28 09:23
bug_8231_v2.diff (2.25 KB) bug_8231_v2.diff Administrator Admin, 2009-05-02 16:58
bug_8231_v3.diff (1.62 KB) bug_8231_v3.diff Administrator Admin, 2009-05-07 08:38

Related issues 5 (0 open5 closed)

Related to TYPO3 Core - Bug #18785: Compare DB with dbalClosedChris topher2008-05-14

Actions
Has duplicate TYPO3 Core - Bug #18616: PHP Error after upgrade from 4.2.0beta3 to 4.2.0RC1ClosedOliver Hader2008-04-13

Actions
Has duplicate TYPO3 Core - Bug #18959: PostgreSQL + dbal + adodb = Install Tool CRASHClosedOliver Hader2008-06-14

Actions
Has duplicate TYPO3 Core - Bug #19082: Please apply patch to 4.2.xClosedOliver Hader2008-07-10

Actions
Has duplicate TYPO3 Core - Bug #19843: DBAL 0.9.20 crashes TYPO3 4.2.xClosedChristian Kuhn2009-01-16

Actions
Actions #1

Updated by Oliver Hader over 16 years ago

In general the $GLOBAL['TYPO3_DB'] should be instantiated at the point you mentioned. What DBMS and which version are you using?
Maybe manually deleting the files typo3temp/temp_CACHED_* helps?

Actions #2

Updated by Bill Taroli over 16 years ago

Database in use is MySQL 5.0, which was the same release being used with my 4.1.6 installation. There were no files named temp_CACHED_* in this typo3temp. I had cleaned up temp objects through install tool in 4.1.6 before changing typo3src to point to 4.2. I did find temp_CACHED in typo3conf, and deleted those. There was no change in the behavior upon launching the installer though.

Actions #3

Updated by Michael Stucki over 16 years ago

Hi Bill. Does this patch solve the problem? Please let me know.

Actions #4

Updated by Bill Taroli over 16 years ago

Yes, this patch has things working wonderfully now. I have been able to complete my upgrade in my test environment without further incident.

Actions #5

Updated by jochen no-lastname-given over 16 years ago

Hi . I had the same effect but when i tried to activate the new system extension - login.

the update from 4.1.6 to 4.2 worked fine before

patch didn´t work for me here.
problem was the dbal extension not felogin.

deleted "dbal" from localconf.php deleted the cache localconfs too and it worked again.

Actions #6

Updated by Mangan over 16 years ago

1. UPDATED Typo3 from 4.1.5 to 4.2.0
2. completely fresh INSTALLTION of 4.2.0

on PostgreSQL 8.2.

I could follow your steps up to the point where the diff-patch comes in.

This patch solved the problem at the point the meantioned error occured AND after that I could access the INSTALL tool and make my DB setup, BUT

WHEN I HIT "COMPARE" DB in the database analyser the following comes up:

Fatal error: Call to undefined function mysql_query() in /var/local/typo3_src-4.2.0/t3lib/class.t3lib_db.php on line 1046

Unlike Jochen, I can not delete dbal because I'm on postgres system.

No matter if do an update on the running system or setup a new one I just cant get 4.2.0 work on postgres.

Please tell me the reason for this behavior. THX!

M.

Actions #7

Updated by Debbie over 16 years ago

We also have Typo3 with PostgreSQL running and updated it to version 4.2 . We were able to solve this issue (the error that you get when hitting COMPARE) by editing
/html/typo3conf/ext/dbal/class.ux_t3lib_db.php
and adding the following to the code:

function admin_get_charsets() {
return Array();
}

This solved the issue.

a.m.p.

Actions #8

Updated by hans over 16 years ago

I´ve got the same error, as i try to install the dbal-extension. typo3 has append "dbal" to the $TYPO3_CONF_VARS['EXT']['extList'] array, than the error is shown on the extension-manager, install-tool etc...
the bugfix "bug_8231.diff 28.04.08 09:23" solved this problem, thanks!

- php v5.2
- typo3 v4.2.0

Actions #9

Updated by Mangan over 16 years ago

Thank you Debbie, your great!

Unfortunately they haven't included fixes in new releases yet, so you have to redo it every single time...

Actions #10

Updated by Markus Klein over 16 years ago

Hi there,

I just wanna mention that I've experienced this problem too.
I'm currently running two installations of 4.2.1:
1. site: this problem appeared immediately after upgrading from 4.1 to 4.2.0 -> patch worked fine here. when updating now to 4.2.1 the happended again, and the patch worked fine again.
2. site: I started this one from a blank 4.2.0 installation and everything was fine... until i updated to 4.2.1. again the patch did it.

what seems to be important: both sites have dbal installed.

So I suggest to include this patch into the next release.

Actions #11

Updated by Franz Holzinger over 16 years ago

Yes, this patch fixes the problem.

Actions #12

Updated by Simon Harhues over 16 years ago

While performing an Update from T3 4.1 to 4.2.1 I also got the error message
"Fatal error: Call to a member function admin_get_charsets() on a non-object in /path/to/typo3_src-4.2.1/t3lib/class.t3lib_install.php on line 456"

The patch solved the problem for me to.

I'm using PHP 5.2.5 and MySQL 4.1.22
The extension "dbal" is installed (please don't ask me why).

Actions #13

Updated by Chris Bischoff over 16 years ago

This patch did not work for me... even after disabling dbal.

I must let you know that I got this error when trying to import an entire site as a .t3d from version 4.1.5 & installing it into 4.2.1.

Any other ideas as to what could help? Thank you.

Actions #14

Updated by Juan about 16 years ago

Hi

I am new to Typo3, testing it, and I am having troubles similar to aboves configuring Typo3 with Postgres. Under

- Debian Etch 4.0r4
- PHP 5.2.0-8
- Postgres 8.3.3-1
- Typo3 4.2.1

Removed "ENGINE=InnoDB" from SQL files and applied patch attached to this bug. Database created manually. Install from scratch. I access the 1-2-3 install. Fill username, password and host of the database. The I select the EMPTY database already created called "typo3_db" (I leave empty the field "Create new database"); continue; then I select from "Please select a database dump:" -> "Create default database tables". When clicking "Import database" I get this error:

Fatal error: Call to undefined function mysql_query() in /usr/lib/typo3_src-4.2.1/t3lib/class.t3lib_db.php on line 1046

It looks that the file t3lib/class.t3lib_db.php calls direct mysql queries instead of using $GLOBALS['TYPO3_DB'].

Is there already any patch or solved from SVN?

Thanks in advance.

Actions #15

Updated by Hary Stubnya about 16 years ago

the Patch from Michael Stucki seems to work fine on typo 4.2.2 !

Actions #16

Updated by Sven Teuber almost 16 years ago

This seems to be a fundamental misconception in the way DBAL and the installer work together. The error occurs when TYPO3 tries to set the $TYPO3_DB-object. While setting it, DBAL calls t3lib_install, which assumes that this object is already there!

Chicken and eggs, anyone? That's like using the car you are building just now to drive to the tire shop to get the tires. ;)

The real source of the error is
ux_t3lib_db->cacheFieldInfo()

238: $parsedExtSQL = $this->Installer->getFieldDefinitions_fileContent($extSQL);

This is where the installer is called although the mandatory object $TYPO3_DB is not set yet. I think dbal has to make sure the environment is set up correctly before calling core methods (which admittedly is a problem here).

If you want to trace it:

/typo3/index.php -> calls /typo3/init.php
init.php -> tries to make an instance of the db object:
167: $TYPO3_DB = t3lib_div::makeInstance('t3lib_DB');

t3lib_div detects the extension class ux_t3lib_db and tries to make an instance of that, leading to the failure in cacheFieldInfo().

I will cross post this as a ticket in the tx_dbal section, hopefully Dimitry or someone else can come up with a fix.

[Edit: Reworked some parts that could've lead to misunderstandings]

Actions #17

Updated by Bernd Gaspers over 15 years ago

I have same problem with TYPO3 4.2.6
with bug_8231.diff work compare

Actions #18

Updated by Kostas over 15 years ago

Sorry if i ask a silly question, i am new in typo3, but how on earth do i apply the bugfix?

Actions #19

Updated by Xavier Perseguers over 15 years ago

I had to enhance it a bit to work with 4.3 trunk

Actions #20

Updated by Xavier Perseguers over 15 years ago

According to suggestion from Karsten in core list (on 05.05.2009), here is a new patch (v3) without the "ENGINE"-fix which is tackled with in #20397.

Actions #21

Updated by Steffen Kamper over 15 years ago

committed to trunk, rev 5464

Actions #22

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF