Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with connection string #17

Open
GoogleCodeExporter opened this issue Aug 1, 2015 · 7 comments
Open

Problem with connection string #17

GoogleCodeExporter opened this issue Aug 1, 2015 · 7 comments

Comments

@GoogleCodeExporter
Copy link

//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
Copy link
Author

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
Copy link
Author

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
Copy link
Author

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
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

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
Copy link
Author

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
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant