Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

.NET 

Login System VB PHP

Hello !

i was using this login system for vb.net last year but its broken now on
ubuntu 16.04 & 14.04 i tried mysqli,mysql,pdo & i installed php5.5,5.6,7.0,7.1 & nothing happened still
getting the same error die("3"); :'( help me guys it was working fine
https:/ /hackforums . net / showthread.php?tid=1845536

thank you!
Have you bothered looking at the method it's using:
Code
mysql_connect($dbhost, $dbuser, $dbpass)or die("3");

mysqli is deprecated in PHP 5.5.0, and it was removed in PHP 7.0.0.

Do you think it'll work on any PHP version past 7?... Read the docs. ❓
Getting Started: C/C++
[C/C++/.NET/x86 ASM - Automation Programmer]
(Nov 12, 2017 03:51 PM)0xDEAD10CC Wrote:  Have you bothered looking at the method it's using:
Code
mysql_connect($dbhost, $dbuser, $dbpass)or die("3");

mysqli is deprecated in PHP 5.5.0, and it was removed in PHP 7.0.0.

Do you think it'll work on any PHP version past 7?... Read the docs. ❓

Okay thanks !
1 more question only: Can i remove php7 & install php5.5 in ubuntu 16.04 !!
cuz i tried many times to install it but its not found ... so i tried to get the deb. packages
& i did apt-get update ... still the same sh*t when i try install the oldest version of php packages ;(
(Nov 12, 2017 04:23 PM)fick Wrote:  Okay thanks !
1 more question only: Can i remove php7 & install php5.5 in ubuntu 16.04 !!
cuz i tried many times to install it but its not found ... so i tried to get the deb. packages
& i did apt-get update ... still the same sh*t when i try install the oldest version of php packages ;(

Maybe there is just problem on how you set it up.
(Nov 13, 2017 08:14 AM)Rigg Wrote:  Maybe there is just problem on how you set it up.

May u help me?
you could try printing the actual error its spitting out with php.net/manual/en/mysqli.error.php
(Nov 13, 2017 11:39 AM)fx bg Wrote:  you could try printing the actual error its spitting out with php.net/manual/en/mysqli.error.php

No because he isn't using MySQLi in his code. He's using all the old MySQL functions.

mysqli_error is not the same as the mysql_error function. The first step would be to move over to MySQLi and using all prepared statements or PDO.
Getting Started: C/C++
[C/C++/.NET/x86 ASM - Automation Programmer]
(Nov 13, 2017 11:53 AM)0xDEAD10CC Wrote:  No because he isn't using MySQLi in his code. He's using all the old MySQL functions.

mysqli_error is not the same as the mysql_error function.

I assumed he already replaced it with mysqli, but apparently he isnt a programmer now that im reading his previous post about downgrading php lmao

but since he didnt upgrade to using mysqli, he could also just die the old way

Code
die(mysql_error())
(Nov 13, 2017 11:54 AM)fx bg Wrote:  I assumed he already replaced it with mysqli, but apparently he isnt a programmer now that im reading his previous post about downgrading php lmao

but since he didnt upgrade to using mysqli, he could also just die the old way

Code
die(mysql_error())

You can still do that with mysqli_error(), it still returns a string just like the mysql method. The new functions are supposed to work nearly identical for usage. MySQLi just has object oriented usage in addition to procedural.

Either way - yes he needs to look at error codes.
Getting Started: C/C++
[C/C++/.NET/x86 ASM - Automation Programmer]
Oh didn't know that still worked with mysqli, neat, figured it would have been stored somewhere else, good to know, however I still prefer try catch ;)
its not only the MySQL problem even if you replace it with MySQLi connection you have to change allllllll your queries !!!
(Nov 14, 2017 01:32 AM)EagleEye Wrote:  its not only the MySQL problem even if you replace it with MySQLi connection you have to change allllllll your queries !!!

Could you re-write it for me :'( ?
I'm noob on PHP & Sh*t ... :'(
Why not opt for ASP.NET Web API?
Any help !!!

<?php
$username = $_GET['fname'];
$password = $_GET['fpass'];
$con=mysqli_connect("localhost","root","rektde","x-man@");
// Check connection
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
$qz = "SELECT * FROM login WHERE username='".$user."'" ;
$qz = str_replace("\'","",$qz);
$result = mysqli_query($con,$qz);
while($row = mysqli_fetch_array($result))
{
echo $row['id'];
}
mysqli_close($con);
?>
try dumping the query result if your not getting an error
Code
die(var_dump($result));

or maybe you have error reporting turned off? try turning ti back on by putt this at the top of your script:
Code
error_reporting(E_ALL);


Possibly Related Threads...
Thread / Author Replies Views Last Post
[.NET] by CacheIsAFagOct 17, 2017 05:15 AM 20 1,193 Oct 17, 2017 05:15 AM
Last Post: CacheIsAFag
[.NET] by +HazeAug 28, 2015 07:43 AM 52 5,851 Aug 28, 2015 07:43 AM
Last Post: Odus
[.NET] by +HazeDec 30, 2014 11:59 AM 42 2,256 Dec 30, 2014 11:59 AM
Last Post: +Haze