On 26/06/17 01:54, Geert Van Pamel wrote:
I try to convert a MediaWiki database from 1.4.5 to
1.5.8 (yes I know I am a bit late. but up to now the database has perfectly
served me ever since 2005). We now want to migrate to a new Linux server, so we want to
upgrade to the latest available version.
Well done running 1.4 for so long, you are very special.
PHP Notice: mysql_query(): Function called without
first fetching all rows from a previous unbuffered query in
/var/www/html/bike/includes/Database.php on line 349
We eventually stopped using unbuffered queries, because of issues like
this. You can either figure out why mysql_query() is being called and
fix it, or you can convert the query to a buffered query. A buffered
query means trying to fit the entire result into memory, which is more
feasible on 2017 hardware than 2005 hardware!
You will need enough memory to fit the largest table into memory, not
including the "old" table since it is renamed not copied.
diff --git a/includes/Database.php b/includes/Database.php
index 06c4b61..d99f8ce 100644
--- a/includes/Database.php
+++ b/includes/Database.php
@@ -359,7 +359,7 @@ class Database {
* @param string $sql SQL query.
*/
function doQuery( $sql ) {
- if( $this->bufferResults() ) {
+ if( true || $this->bufferResults() ) {
$ret = mysql_query( $sql, $this->mConn );
} else {
$ret = mysql_unbuffered_query( $sql, $this->mConn );
After you've upgraded, please run
ALTER TABLE <table name> CONVERT TO CHARACTER SET binary;
on all your tables, to avoid having UTF-8 stored as latin1, which can
easily cause corrupted backups.
-- Tim Starling