Bug #17616
closeddb error on saving
0%
Description
Whenever i try to save a page, or page content, or template... i get errors like this:
Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in ...\t3lib\class.t3lib_db.php on line 208
Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource in ...\t3lib\class.t3lib_db.php on line 778
PHP: 5.1.6
MySQL: 5.0.24a
Apache: 2.0.59
Typo3: 4.0.2
(issue imported from #M6366)
Updated by Oliver Hader about 17 years ago
Please go to your Install Tool of TYPO3, select the "5: All Configuration" section and enable debugging selecting the property "sqlDebug". Next time the error occurs, you'll get some more information about it.
I guess that this isn't a Core issue, but more a mistake on SQL queries of an extension (e.g. missing field, typing-mistake or whatever).
Please keep us informed, what the SQL debug showed.
Updated by Peter Wechtersbach about 17 years ago
OK, i did that, ie in the install tool selecting sqlDebug.
but i still dont get any more information than this:
Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in C:\-server-
\planika\t3lib\class.t3lib_db.php on line 207
Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource in C:\-server-
\planika\t3lib\class.t3lib_db.php on line 776
(A few more lines like this)
On line 207 of class.t3lib_db.php is the exec_DELETEquery function. So now i tried to echo the delete query on line 430 (the delete querr). So now i get this:
DELETE FROM sys_lockedrecords WHERE userid=526
DELETE FROM sys_history WHERE tstamp<1187546617 AND tablename='pages'
DELETE FROM cache_pages
Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in C:\-server-
\planika\t3lib\class.t3lib_db.php on line 207
Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource in C:\-server-
\planika\t3lib\class.t3lib_db.php on line 777
DELETE FROM cache_pagesection
Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in C:\-server-
\planika\t3lib\class.t3lib_db.php on line 207
Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource in C:\-server-
\planika\t3lib\class.t3lib_db.php on line 777
DELETE FROM tx_realurl_pathcache WHERE page_id =12031
Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in C:\-server-
\planika\t3lib\class.t3lib_db.php on line 207
Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource in C:\-server-
\planika\t3lib\class.t3lib_db.php on line 777
DELETE FROM tx_realurl_urlencodecache WHERE page_id IN (12031)
Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in C:\-server-
\planika\t3lib\class.t3lib_db.php on line 207
Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource in C:\-server-
\planika\t3lib\class.t3lib_db.php on line 777
DELETE FROM tx_realurl_urldecodecache WHERE page_id IN (12031)
Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in C:\-server-
\planika\t3lib\class.t3lib_db.php on line 207
Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource in C:\-server-
\planika\t3lib\class.t3lib_db.php on line 777
but this queries are ok? Im not so shure that its some extension, becouse i have the same extensions loaded and its ok...
Updated by Oliver Hader about 17 years ago
Thanks for giving some more feedback. The MySQL message "supplied argument is not a valid MySQL-Link resource" shows that there went something wrong on connecting/using the database. Do you use more than one MySQL database in your environment and/or are you using persistant database connections?
Updated by Peter Wechtersbach about 17 years ago
Yes, im using more databases and persistant also:
[MySQL]
; Allow or prevent persistent links.
mysql.allow_persistent = On
I also tried now with off, still same result
What can i do, this is happening on a production page and its really not nice :(
Maybe upgrade typo3 to higher version?
Updated by Oliver Hader about 17 years ago
The MySQL message on your system shows, that
a) and old database link was overwritten by another one (persitent)
b) the maximum of allowed database connections on your system was reached
In the Install Tool > All Configuration there's a flag 'no_pconnect' - maybe this helps. You said that you use/connect to more databases in your TYPO3 site at the same time - the persisten thingy only occurs if the same database user is used for both/all of those databases, e.g.
user:dbuser1;pass:dbpass1;database:t3_mysite_com -> creates a new link
user:dbuser1;pass:dbpass1;database:external_something -> would reuse and overwrite the link to t3_mysite_com
Updated by Peter Wechtersbach about 17 years ago
solvec issue, i downgraded mysql to 4.1 and now it works normal...
Updated by Christian Kuhn over 15 years ago
Resolved, no change required as problem is solved for reporter.