Bug #23066
closedmysql_pconnect() has too many parameters
0%
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
Updated by Chris topher over 14 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...
Updated by Chris topher over 14 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?
Updated by Stefan Neufeind over 13 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 <oliver.hader@typo3.org>
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
Updated by Stefan Neufeind over 13 years ago
Updated by Steffen Gebert over 13 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.