https://bugzilla.wikimedia.org/show_bug.cgi?id=30935

       Web browser: ---
             Bug #: 30935
           Summary: update.php fails with fatal PHP error
           Product: MediaWiki
           Version: 1.19-svn
          Platform: PC
        OS/Version: Windows 7
            Status: NEW
          Severity: normal
          Priority: Unprioritized
         Component: Database
        AssignedTo: [email protected]
        ReportedBy: [email protected]
    Classification: Unclassified


I am trying to update installation of older MediaWiki (probably 1.17a) via
maintenance/update.php at 32-bit Windows computer. I've already updated to
current trunk. Also, I should mention that the same box has MediaWiki 1.15.4
running just fine. However, I get the following fatal error when trying to run
php update.php from cmd.exe console:

c:\www\phase3\maintenance>php update.php
MediaWiki 1.19alpha Updater

PHP Fatal error:  Call to undefined function mysql_error() in
C:\www\phase3\includes\db\DatabaseMysql.php on line 245

My first guess is that mysql module is unavailable. It looks so:
c:\www\phase3\maintenance>php -m
[PHP Modules]
bcmath
calendar
com_dotnet
Core
ctype
date
dom
ereg
filter
ftp
hash
iconv
json
libxml
mcrypt
mhash
mysqlnd
odbc
pcre
PDO
Phar
Reflection
session
SimpleXML
SPL
standard
tokenizer
wddx
xml
xmlreader
xmlwriter
zip
zlib

However I do not compile PHP for Windows myself, it is usual binary package
downloaded from php.net mirror:
c:\www\phase3\maintenance>php -v
PHP 5.3.3 (cli) (built: Jul 21 2010 20:03:25)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies

Not very new one, I must admit, however 5.3.3 should be supported and why it
runs 1.15.4 at the same box?
However, php update.php performed in 1.15.4 installation directory gives a
cleaner error message:
c:\www\psychologos\maintenance>php update.php
MediaWiki 1.15.4 Updater

DB connection error: MySQL functions missing, have you compiled PHP with the
--with-mysql option?

But why does it run in http server mode? Aren't maintenance scripts using the
same Database classes?

I remember that php offers separate configs for CLI and SAPI modes, however it
seems not the case:
c:\www\psychologos\maintenance>php --ini
Configuration File (php.ini) Path: C:\Windows
Loaded Configuration File:         C:\Windows\php.ini
Scan for additional .ini files in: (none)
Additional .ini files parsed:      (none)

Please forgive my ignorance, in case the resolving is trivial.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to