mfazliazran / webvulscan

Automatically exported from code.google.com/p/webvulscan
GNU General Public License v3.0
0 stars 0 forks source link

Problem with connection string #17

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
//hello guys
//i have a problem with the connection string, i don't have the default //port 
for mysql, i have the port number '3308'.

//i try this :

        $server = 'localhost';
    $user = 'root';
    $pass ='';
    $datab ='webvulscan';
    $port = (int)$port='3308';

    $db = $db = new mysqli($server,$user,$pass,$datab,$port); 

// but that doesn't work.

//then i try other way:

$db = $db = new mysqli('localhost','root','','webvulscan','3308');

thankss.. i hope you can help me!

Original issue reported on code.google.com by switch8...@gmail.com on 27 Apr 2013 at 3:36

GoogleCodeExporter commented 9 years ago
Hi,

Did you try passing in the port without the single quotes? e.g. $db = $db = new 
mysqli('localhost','root','','webvulscan',3308);

Other than that, I am not sure what the problem is. Your best option would 
probably be to capture the error code using mysqli_connect_errno() and check 
what the error is.

Regards,
Dermot

Original comment by webvuls...@gmail.com on 11 May 2013 at 4:48

GoogleCodeExporter commented 9 years ago
Just did a bit of googling and found this on the mysqli API page on php.net: 
"If $port is a string, such as '3306', mysqli::query() will not work, even 
though mysqli_connect_errno() reports no error (value 0)!". Therefore, passing 
the port in as an integer will hopefully resolve the issue.

Dermot

Original comment by webvuls...@gmail.com on 11 May 2013 at 4:51

GoogleCodeExporter commented 9 years ago
hello sir 
i have an error accured please help me

There was a problem connecting to the database. Please contact the 
administrator if problem persists

kindly email me
aburehan23@gmail.com

Original comment by abureha...@gmail.com on 31 Oct 2013 at 8:50

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Hi,

Do you have the webvulscan database created in mysql?

Regards,
Dermot

Original comment by webvuls...@gmail.com on 4 Nov 2013 at 9:29

GoogleCodeExporter commented 9 years ago
yes sir i created but again tell me here step by step tahnk you

Original comment by abureha...@gmail.com on 8 Nov 2013 at 12:08

GoogleCodeExporter commented 9 years ago
The following is from the ReadMe file included in the downloadable source:

Import the database named “webvulscan.sql”, which is contained in the 
source code folder into your MySQL database.
The database credentials that the scanner is using are the “root” user with 
no password. If you want to change this it can be edited in 
“webvulscan_vx.xx/scanner/functions/databaseFunctions.php” in the 
connectToDb() function. The second and third parameter passed into the mysqli 
constructor are the username and password of a MySQL database user.  e.g. 
“root” and “”.
For whatever user you are using in the connectToDb() function, you must ensure 
there is a corresponding database user in the database and they have sufficient 
privileges to read/write from/to the webvulscan database.

Original comment by webvuls...@gmail.com on 12 Nov 2013 at 10:36