-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
SQL is not Initiated #11
Comments
Hey pythonmaster41, I would recommend you to use the new generation installer, which is docker. |
Thanks Adithya. i will try and let you know if that solved the issue |
I have the same issue :( |
I found some extension were deprecated in PHP 5.5.0, example of "sql_connect()" ,and some were removed in PHP 7.0.0.Must I using it under PHP 5.5.0? |
NEED HELP. Does anyone know what's wrong with this? |
SETTING UP THE DATABASE SCHEMA AND POPULATING DATA IN TABLES: \n";} else {echo "[*]...................Error purging database: " . mysql_error(); echo " \n";} //Creating new database security $sql="CREATE database \n";} else {echo "[*]...................Error creating database: " . mysql_error();echo " \n";} //creating table users $sql="CREATE TABLE security.users (id int(3) NOT NULL AUTO_INCREMENT, username varchar(20) NOT NULL, password varchar(20) NOT NULL, PRIMARY KEY (id))"; if (mysql_query($sql)) {echo "[*]...................Creating New Table 'USERS' successfully";echo " \n";} else {echo "[*]...................Error creating Table: " . mysql_error();echo " \n";} //creating table emails $sql="CREATE TABLE security.emails ( id int(3)NOT NULL AUTO_INCREMENT, email_id varchar(30) NOT NULL, PRIMARY KEY (id) )"; if (mysql_query($sql)) {echo "[*]...................Creating New Table 'EMAILS' successfully"; echo " \n";} else {echo "[*]...................Error creating Table: " . mysql_error();echo " \n";} //creating table uagents $sql="CREATE TABLE security.uagents ( id int(3)NOT NULL AUTO_INCREMENT, uagent varchar(256) NOT NULL, ip_address varchar(35) NOT NULL, username varchar(20) NOT NULL, PRIMARY KEY (id) )"; if (mysql_query($sql)) {echo "[*]...................Creating New Table 'UAGENTS' successfully";echo " \n";} else {echo "[*]...................Error creating Table: " . mysql_error();echo " \n";} //creating table referers $sql="CREATE TABLE security.referers ( id int(3)NOT NULL AUTO_INCREMENT, referer varchar(256) NOT NULL, ip_address varchar(35) NOT NULL, PRIMARY KEY (id) )"; if (mysql_query($sql)) {echo "[*]...................Creating New Table 'REFERERS' successfully";echo " \n";} else {echo "[*]...................Error creating Table: " . mysql_error();echo " \n";} //inserting data $sql="INSERT INTO security.users (id, username, password) VALUES ('1', 'Dumb', 'Dumb'), ('2', 'Angelina', 'I-kill-you'), ('3', 'Dummy', 'p@ssword'), ('4', 'secure', 'crappy'), ('5', 'stupid', 'stupidity'), ('6', 'superman', 'genious'), ('7', 'batman', 'mob!le'), ('8', 'admin', 'admin'), ('9', 'admin1', 'admin1'), ('10', 'admin2', 'admin2'), ('11', 'admin3', 'admin3'), ('12', 'dhakkan', 'dumbo'), ('14', 'admin4', 'admin4')"; if (mysql_query($sql)) {echo "[*]...................Inserted data correctly into table 'USERS'";echo " |
Hi Audi team , After setting up project ,Clicik on "Setup/reset Database for labs" I am getting below error Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /var/www/html/sqli-labs-master/sql-connections/setup-db.php:29 Stack trace: #0 {main} thrown in /var/www/html/sqli-labs-master/sql-connections/setup-db.php on line 29 my php version |
Hi, MySQL functions were removed in PHP 7, but we can use MySQLi functions instead. |
Hi, |
@M3chD09 |
Hi Cukuyo , |
OK , M3chD09 .
|
Hi Cukuyo , |
@M3chD09 |
Hello guys, i'm kinda new to this sort of stuff. I've recently installed the lab as per the instructed steps. Currently, i'm facing the issue of 'not getting the localhost/sqli-labs loaded up on my browser'. ISSUE : Not Found The requested URL /sqli-labs was not found on this server. |
@Cukuyo |
same issue here: no errors such as "your sql syntax has an error... etc" |
@Torreira
|
@Cukuyo |
Mysql ones . Must also be an account with administrator privileges (just use root one) , for creating database . |
Give a password to your mysql installation, I think it may not work with a blank password, then set the same user and password in db-creds.inc |
not sure of the difference but I have no time to check. |
@halfluke |
@Cukuyo I have cloned the above repo now. But, was'nt quite successful with the 'installation of mysql-server'.Also, should i use this(apt-get install mariadb-server) as an alternative to mysql ?Here's the error screen that i'm getting. |
yes, mariadb-server should be the one |
so now you have an issue that I think I had in the past and I can't remember how I solved it. |
@halfluke |
@halfluke I'm able to see the Databases via terminal but currently unable to play around with the excercises/tasks. |
Come on mate, it's /?id=1, not /id=1 |
Hii, anyone got any solution for this dB. Whenever I clicked setup/reset Database for labs it just redirect and nothing happens.. I'm using backbox which is based on Ubuntu 16.04 php-7.. I made few changes.. all works.. except these.. |
Hi, |
Try to run in docker. To avoid these kind of issues
…On Tue, 27 Aug, 2019, 6:50 PM stuxn8t, ***@***.***> wrote:
hello guys. i installed all. but when i click setup/rest database, but
cant use challenges database.. someone help me please..
[image: w]
<https://user-images.githubusercontent.com/41459301/63774721-d0bdab80-c918-11e9-93db-926ff4d638a0.jpg>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#11?email_source=notifications&email_token=AHC4YOEOQLIMXMXMO4V6CE3QGUSZJA5CNFSM4DPDQCMKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5HWPKI#issuecomment-525297577>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHC4YOFYNZPIZZDQOD5DLITQGUSZJANCNFSM4DPDQCMA>
.
|
I think you have to check the password which you have given to the mysql and in the sqli-labs folder under db creds file |
Hi @PrashanthBanapur I resolved this issue |
Hi Audi team , After setting up project ,Clicik on "Setup/reset Database for labs" I am getting below error Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /var/www/html/sqli-labs-master/sql-connections/setup-db.php:29 Stack trace: #0 {main} thrown in /var/www/html/sqli-labs-master/sql-connections/setup-db.php on line 29 |
Just use this and forget the issues: |
Thanks man it is working |
Hi Guyz, I found a solution for this error which you all getting and we all saw the solution but we didn't get this so finally you can use this original sqli-lab let's see how you can solve this error. after successfully moving files to /var/www/ or /var/www/html. When you'll able to open the http://localhost/sqli-labs You all are facing these issues Solve this issue by creating a user in MySQL Follow these steps
After following these steps restart your 2 services
WOOOOAAHHH!!! Finally, you fixed your error by yourself :) Why you are facing this issue - your mysql user was not able to login with regular user and because of this your connection was not able to authenticate to mysql database and for fixing this issue we created a user and granted all the permission to that user and that user was able to authenticate that's how we resolved this issue. If you're getting this issue after following these steps so comment here I'll resolve your issue. |
Thanks man. That worked! |
Hello @scriptyvijay I implemented your solution above but still getting the empty page under the Creating database message... Solution:-
Will still see if I can resolve the original code because its gonna be alot of work to change all this in the code but if I can't find any solution to the original code as is then I will proceed with this. Thanks |
Hi there, please re-install and follow the upper method your problem will be resolve. |
Hi, erm... which approach did you take ? |
Hello @Sobitan , I had followed these (https://github.com/Audi-1/sqli-labs) installation process, and I had also changed some parts of code like converting sql to sqli in the sqlconnections directory. |
Hey @VivekKamisetty, I think the application is best for a lower version of php and mysql (am not yet sure the exact versions but the higher ones have errors e.g that fact that mysql_connect has been deprecated in higher versions etc (https://www.google.com/search?channel=fs&client=ubuntu&q=mysql_connect+has+been+deprecated)). I hope some one who has it successfully working may share the versions used. Also had to make some changes for Less-17 and above Changed function check_input($value) to function check_input($con,$value) Changed $value = "'" . mysql_real_escape_string($value) . "'"; to $value = "'" . mysqli_real_escape_string($con,$value) . "'"; Changed $uname=check_input($_POST['uname']); to $uname=check_input($con, $_POST['uname']); |
thank you @Sobitan I had modified everything in the sqlconnections dir but I hadn’t modified in the less-'s and yes it runs successfully :) |
https://www.youtube.com/watch?v=-lmUtYWfTWU hope this video helps u... it worked for me |
I had a similar issue, just go to the database config file and change the password to blank again. Or just check once again if the server is set to localhost or whatever port you are using. Lmk if it works (: |
Fixed all issues. Thanks ! |
You may need to follow @VivekKamisetty approach in the comments above you. The errors look to be the same. Try the changes he did to see if they work for you. Good luck.On Sep 29, 2023, at 11:13 PM, Sunita Majhi ***@***.***> wrote:
I'm getting this issue after completing the installation process. Please help me out.
input- ?id=1 Output shows nothing.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Hi Audi,
I am trying to install this using git clone and when I try to initiate the DB Reset I am not getting anything. And apache logs are giving me below
::1 - - [13/Jun/2017:14:18:13 -0400] "GET /sqli-labs/sql-connections/setup-db.php HTTP/1.1" 500 848 "http://localhost/sqli-labs/" "Mozilla/5.0 (X11; Linux i686; rv:45.0) Gecko/20100101 Firefox/45.0"
I tried everything and seems not working. Any hints on solving this ? Thanks
The text was updated successfully, but these errors were encountered: