Bug #23066

mysql_pconnect() has too many parameters

Added by Christian Baer almost 12 years ago. Updated almost 11 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

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
#1

Updated by Chris topher almost 12 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...

#2

Updated by Chris topher almost 12 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?

#3

Updated by Stefan Neufeind almost 11 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
#4

Updated by Stefan Neufeind almost 11 years ago

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

#5

Updated by Steffen Gebert almost 11 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.

Also available in: Atom PDF