https://bugzilla.wikimedia.org/show_bug.cgi?id=42370
Web browser: ---
Bug #: 42370
Summary: PHP 5.4: Undefined property
DatabasePostgres::$mTrxDoneWrites stops database
writes using pgbouncer
Product: MediaWiki
Version: 1.20
Platform: PC
OS/Version: Linux
Status: UNCONFIRMED
Severity: blocker
Priority: Unprioritized
Component: Database
AssignedTo: [email protected]
ReportedBy: [email protected]
Classification: Unclassified
Mobile Platform: ---
Hi,
I've installed media wiki from git, using the REL1_20 branch.
My setup is as follows (debian versions on second line in brackets, running
debian wheezy):
Web server:
nginx version: nginx/1.2.1
(1.5.2-4)
PHP 5.4.4-9 (fpm-fcgi) (built: Oct 26 2012 13:10:40)
(1.5.2-4)
Database server:
stunnel 4.53 on x86_64-pc-linux-gnu platform
(1.5.2-4)
pgbouncer version 1.5.2 (compiled by <cbe@benz> at 2012-11-02 10:29:46)
(1.5.2-4)
postgresql 9.1.6
(9.1+134wheezy2)
The error I got in in my error log was:
PHP message: PHP Notice: Undefined property: DatabasePostgres::$mTrxDoneWrites
in /var/www/wiki.example.com/includes/db/Database.php on line 512
The error in the pgbouncer logs was:
2012-11-22 10:07:54.054 17899 LOG C-0xafec38:
wiki_example_com/wiki.example.com@unix:6432 closing because: client close
request (age=0)
2012-11-22 10:07:54.054 17899 LOG S-0xae16c0:
wiki_example_com/wiki.example.com@unix:5432 closing because: unclean server
(age=0)
What I was trying to do, for example, was send a confirmation email to confirm
the email, which tries to write the confirmation key to the database. This was
not correctly written to the database, and so the link did not work.
When I add this patch (not final product! just to get it working) it works
fine.
diff --git a/includes/db/Database.php b/includes/db/Database.php
index eca684a..4ef5f72 100644
--- a/includes/db/Database.php
+++ b/includes/db/Database.php
@@ -509,7 +509,7 @@ abstract class DatabaseBase implements DatabaseType {
* @return bool
*/
public function writesOrCallbacksPending() {
- return $this->mTrxLevel && ( $this->mTrxDoneWrites ||
$this->mTrxIdleCallbacks );
+ return true || $this->mTrxLevel && ( $this->mTrxDoneWrites ||
$this->mTrxIdleCallbacks );
}
/**
I think it could just be because of my funky setup with pgbouncer as well, but
there is an undefined property which should probably get tracked down. When I
get some free time I will write up a patch for it.
If you need more details like config etc, let me know.
Cheers,
Hugh
--
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