Project

General

Profile

Actions

Bug #23066

closed

mysql_pconnect() has too many parameters

Added by Christian Baer over 13 years ago. Updated over 12 years ago.

Status:
Rejected
Priority:
Should have
Category:
Database API (Doctrine DBAL)
Target version:
-
Start date:
2010-07-01
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.3
PHP Version:
5.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

/t3lib/class.t3lib_db.php
Line 1015

$this->link = @mysql_pconnect($TYPO3_db_host, $TYPO3_db_username, $TYPO3_db_password, false, MYSQL_CLIENT_COMPRESS);

has to be

$this->link = @mysql_pconnect($TYPO3_db_host, $TYPO3_db_username, $TYPO3_db_password, MYSQL_CLIENT_COMPRESS);

This bug slows down the FE when the webserver and the database-server are not on the same machine.
(issue imported from #M14959)


Files

14959.t3lib_db.patch (710 Bytes) 14959.t3lib_db.patch Administrator Admin, 2010-07-01 15:29

Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Feature #17957: Improve database performance for external database hostClosedDmitry Dulepov2007-12-29

Actions
Related to TYPO3 Core - Bug #23346: dbClientCompress crashes with pconnectClosedOliver Hader2010-08-04

Actions
Actions #1

Updated by Chris topher over 13 years ago

Yes, according to the PHP docs there only are four parameters.

Seeing that I don't really understand the comment in the code saying:

// We use PHP's default value for 4th parameter (new_link), which is false.
// See PHP sources, for example: file php-5.2.5/ext/mysql/php_mysql.c, function php_mysql_do_connect(), near line 525

Dmitry has put that in. In the discussion in Core List (#17957) noone wrote anything about it.
Would be great if Dmitry could explain this...

Actions #2

Updated by Chris topher over 13 years ago

However, please make a patch file out of your change and send it to Core List!
See here http://typo3.org/teams/core/core-mailinglist-rules/

And could you check the other occurences of mysql_pconnect, too?

Actions #3

Updated by Stefan Neufeind over 12 years ago

Checked 4.3 to 4.6 and it's already patched in all of them. No other occurences of mysql_pconnect with this error.

Fixed by:
commit 1c1cb9ae4f18a80d64a15d4dad16871bb263f6e5
Author: Oliver Hader <>
Date: Thu Aug 5 15:55:30 2010 +0000

Fixed bug #15343: dbClientCompress crashes with pconnect
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@8484 709f56b5-9817-0410-a4d7-c38de5d9e867
Actions #4

Updated by Stefan Neufeind over 12 years ago

hmm #15343 refers to bugs.typo3.org. The forge-issue for that is #23346

Actions #5

Updated by Steffen Gebert over 12 years ago

  • Status changed from Needs Feedback to Rejected
  • Assignee set to Steffen Gebert
  • Target version deleted (0)

mysql_pconnect doesn't have a new_link parameter, as stated in the PHP documentation. The source code of the mysql extension also says /* mysql_pconnect does not support new_link parameter */.

And that's how it is in the code since #23346.

Actions

Also available in: Atom PDF