[TYPO3-english] MySQL Warnings with PHP 5.2.9 [SOLVED]

Xavier Perseguers typo3 at perseguers.ch
Sat Mar 14 18:43:54 CET 2009


Hi,

>>> Since I upgraded PHP to the latest version available on MacPorts, I 
>>> get a huge list of PHP Warnings with TYPO3 4.2.6:
>>>
>>> Warning:  mysql_fetch_assoc(): supplied argument is not a valid MySQL 
>>> result resource in 
>>> /Users/xavier/Development/TYPO3/typo3_src-4.2.6/t3lib/class.t3lib_db.php 
>>> on line 809
> 
> I'll investigate a bit more. Another person wrote me that he had the 
> same problem. A patch seems to be needed... :-)

No patch is needed and there is no problem with PHP 5.2.9. I had a big 
mess with "a few" tables:

- cache_hash
- cache_imagesizes
- sys_log
- cache_pages
- cache_pagesection
- cache_typo3temp_log
- cache_md5params
- fe_session_data
- fe_sessions
- tx_realurl_pathcache
- tx_realurl_chashcache
- tx_realurl_urldecodecache
- tx_realurl_urlencodecache

In fact, I wanted to be ready for developer days and as such thought 
that I should first update my PHP version (5.2.5) I had installed from 
entropy.ch to latest available from branch 5.2 as the distribution on 
entropy.ch is not maintained anymore.

I read that Karsten said on 5.0 list that 5.3beta1 was available from 
MacPorts and as such I installed version 5.2.9 from MacPorts. Problem is 
that I wanted then to have MySQL server too from MacPorts instead of the 
distribution from mysql.org, in order to be able to upgrade more easily.

I could not dump my DB from the "old" install (server could not be 
started anymore). This is where I made something risky: I simply copied 
DB files from old to new server. There was not any problem with MYISAM 
tables but INNODB were corrupted. Install tool saw that aforementioned 
were not defined the way they should have been but could not recreate 
them. I dropped them manually and then Install tool was able to recreate 
all but one table. I decided then to dump the "valid" content to 
recreate a clean DB but mysqldump made an error when coming to dump the 
table that could not be recreated. It was not present but somehow was 
still referenced somewhere.

Using option --lock-tables=false helped a bit but --ignore-table=<name 
of table with problem> did not help. As such, I dumped my DB the other 
way around with

$ mysqldump -u root <db-name> <table1> <table2> ...

where table1... were all important tables such as be_users, be_groups, 
pages, sys_templates, ... I did not dump other tables that may be 
recreated easily such as cache_* tables or logs.

I then created a new DB, went back to Install tool and it was then able 
to recreate missing tables.

Message "supplied argument is not a valid MySQL result resource" was as 
such related to a problem in my tables, not a problem with Core's code 
or a new version from PHP5.

I'm quiet again ;-)

-- 
Xavier Perseguers
http://xavier.perseguers.ch/en

One contribution a day keeps the fork away


More information about the TYPO3-english mailing list