phplist

NOTE:: Before reporting an issue, make sure you are running the latest version, currently 3.3.1


View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0018133phplist applicationOtherpublic07-06-16 10:4514-09-16 21:57
Reporterduncanc 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version3.2.5 
Target Versionnext patchFixed in Version3.2.6 
Summary0018133: Incorrect parameters to mysqli_connect
DescriptionThe function mysqli_connect does not take exactly the same parameters as mysql_connect. In particular the flags parameter for mysql does not exist for mysqli. Instead a different function needs to be used, mysqli_real_connect.

The code to connect using mysqli in file mysqli.inc is using the fourth and fifth parameters incorrectly, they actually apply to database name and port

  $db = mysqli_connect($host, $user, $password, false, $compress | $secure);

To use ssl or compression, mysqli_init and mysqli_real_connect need to be used, see the procedural style example http://php.net/manual/en/mysqli.real-connect.php [^]
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0057759)
michiel (manager)
07-06-16 22:05

Ah, good one. Things are already piling up for a next release. This should be in there.
(0058239)
duncanc (developer)
14-09-16 16:41
edited on: 14-09-16 21:13

I've worked on the change to use the correct parameters for the mysqli_* functions. I will issue a PR shortly.
See https://github.com/phpList/phplist3/pull/84 [^]

(0058241)
michiel (manager)
14-09-16 21:32

great!
(0058242)
michiel (manager)
14-09-16 21:37

Hmm, refreshed the code and got this on my local system

Warning: mysqli_real_connect(): (HY000/2006): MySQL server has gone away in ...phpList3/public_html/lists/admin/mysqli.inc on line 25
Sorry, the server is currently too busy, please try again later.
(0058243)
michiel (manager)
14-09-16 21:49

I have both compression and secure switched on. It didn't like the secure option. That may be a local config.
(0058244)
michiel (manager)
14-09-16 21:57

It works with MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT instead of MYSQLI_CLIENT_SSL


Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker