View Issue Details

IDProjectCategoryView StatusLast Update
0000255WackoWikidatabasepublic2009-10-13 16:03
Reporteradministrator Assigned Toebal  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Target Version5.0.betaFixed in Version5.0.beta 
Summary0000255: Warning: mysqli_connect() expects parameter 5 to be long, string given in \db\mysqli.php on line 31
Descriptionyou got this error message if you use the database_driver => "mysqli_legacy",
but the value for database_port is empty in the config file, mysqli_connect() requires a port

set in config.inc.php instead
database_port => "3306",

and the error should disappear
TagsNo tags attached.

Relationships

related to 0000254 resolvedadministrator mysqli_connect() expects parameter 5 to be long, string given 
related to 0000240 resolvedadministrator replace deprecated mysql_escape_string with mysql_real_escape_string 

Activities

ebal

2009-03-06 19:41

developer   ~0000598

File: classes/wacko.php
line: 0000056

Before:
$this->dblink = connect($this->config["database_host"], $this->config["database_user"], $this->config["database_password"], $this->config["database_database"], $this->config["db_collation"], $this->config["database_driver"], $this->config["database_port"]);
        
After:
if ( $this->config["database_driver"] == mysqli_legacy && $this->config["database_port"] == "" )
  $this->dblink = connect($this->config["database_host"], $this->config["database_user"], $this->config["database_password"], $this->config["database_database"], $this->config["db_collation"], $this->config["database_driver"], "3306");
else
  $this->dblink = connect($this->config["database_host"], $this->config["database_user"], $this->config["database_password"], $this->config["database_database"], $this->config["db_collation"], $this->config["database_driver"], $this->config["database_port"]);

ebal

2009-03-06 19:47

developer   ~0000599

I havent svn commit the above (yet),
the warning exists because the database port isnt set
"database_port" => ""

I can only test it on my machines thats why i hope you all give feedback

administrator

2009-03-07 20:26

administrator   ~0000600

Last edited: 2009-03-07 20:27

this issue should be solved solely in the installer

if no value is given for mysqli set default value for port in config.inc.php to "3306" instead of ""

ebal

2009-03-11 18:28

developer   ~0000603

r300

i think its solved - plz check it

administrator

2009-03-12 17:17

administrator   ~0000604

Last edited: 2009-03-12 19:20

run a fresh install -> mysqli, the port value made it in the config.inc.php file

but I got a new error message:

Warning: mysqli_real_escape_string() expects parameter 1 to be mysqli, null given in mysqli.php on line 5

http://de.php.net/manual/de/mysqli.real-escape-string.php

ebal

2009-03-18 21:47

developer   ~0000605

The problem occurs when a new cache file is created.
The error that provide this bug is classes/cache.php
that doesnt connect to database to return a $dblink variable.

so i did what i know best - i didnt solve the bug,
i've just eliminate the error :)

svn r324

administrator

2009-03-19 04:07

administrator   ~0000606

tested -> works

(?) perhaps there should be an indication in the case the port value for mysqli is mistakenly empty so the user get an info

Issue History

Date Modified Username Field Change
2009-01-10 10:30 administrator New Issue
2009-01-10 10:30 administrator Legacy => NEW
2009-01-10 10:30 administrator Status new => confirmed
2009-01-10 10:31 administrator Relationship added related to 0000254
2009-01-10 10:31 administrator Relationship added related to 0000240
2009-01-10 10:33 administrator Description Updated
2009-03-06 19:02 ebal Status confirmed => assigned
2009-03-06 19:02 ebal Assigned To => ebal
2009-03-06 19:41 ebal Note Added: 0000598
2009-03-06 19:47 ebal Note Added: 0000599
2009-03-07 20:26 administrator Note Added: 0000600
2009-03-07 20:26 administrator Description Updated
2009-03-07 20:27 administrator Note Edited: 0000600
2009-03-11 18:28 ebal Note Added: 0000603
2009-03-12 17:17 administrator Note Added: 0000604
2009-03-12 17:32 administrator Note Edited: 0000604
2009-03-12 19:20 administrator Note Edited: 0000604
2009-03-18 21:47 ebal Note Added: 0000605
2009-03-19 04:07 administrator Note Added: 0000606
2009-03-19 04:07 administrator Status assigned => resolved
2009-03-19 04:07 administrator Resolution open => fixed
2009-03-19 04:07 administrator Fixed in Version => 5.0.0
2009-10-13 16:00 administrator Target Version 5.0.0 => 5.0.beta
2009-10-13 16:03 administrator Fixed in Version 5.0.0 => 5.0.beta
2010-03-08 10:11 administrator Category Database => database