Opened 3 years ago

Closed 2 years ago

Last modified 2 years ago

#1564 closed Bug/Fehler (fixed)

mysqli_connect - Parameter vertauscht

Reported by: vr Owned by: somebody
Priority: hoch Milestone: modified-shop-2.0.5.0
Component: Shop Version: 2.0.4.2

Description (last modified by Tomcraft)

Siehe PHP Umstellung von 5.6 auf 7.1

inc/db_functions_mysqli.inc.php, Funktion xtc_db_connect:

Die Konvention lautet <host>[:<port>[:<socket>]] und kann auch in dieser Form im Parameter $server übergeben werden.
...
$socket = explode(':', $server);
...

hat anschließend

$socket[0] = <host>
$socket[1] = <port>
$socket[2] = <socket>

In der Signatur von mysqli_connect kommt der Parameter port vor socket, in xtc_db_connect werden die beiden vertauscht bestückt.

Bei DBSERVER = 'dbserver.meinshop.de:3306' würde 3306 als socket übergeben.
Bei DBSERVER = 'localhost:3306' wird normalerweise der port ignoriert (siehe http://php.net/manual/de/mysqli.construct.php#121002), aber in xtc_db_connect trotzdem als socket übergeben.

Attachments (0)

Change History (5)

comment:1 Changed 3 years ago by vr

  • Description modified (diff)

comment:2 Changed 3 years ago by vr

  • Version set to 2.0.4.2

comment:3 Changed 3 years ago by Tomcraft

  • Description modified (diff)
  • Milestone set to modified-shop-2.0.5.0
  • Priority changed from normal to hoch

comment:4 Changed 2 years ago by GTB

  • Resolution set to fixed
  • Status changed from new to closed

In 11509:

fix #1564

comment:5 Changed 2 years ago by GTB

In 11516:

fix #1564

Add Comment

Modify Ticket

Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.