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!
Nov 12, 2017 03:51 PM
(This post was last modified: Nov 12, 2017 03:51 PM by 0xDEAD10CC.)
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. ❓
(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:53 AM
(This post was last modified: Nov 13, 2017 11:53 AM by 0xDEAD10CC.)
(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.
Nov 13, 2017 11:54 AM
(This post was last modified: Nov 13, 2017 11:55 AM by fx bg.)
(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
Nov 13, 2017 12:03 PM
(This post was last modified: Nov 13, 2017 12:04 PM by 0xDEAD10CC.)
(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
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.
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 ... :'(
DO NOT DEAL WITH THIS MEMBER
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);
?>
Nov 14, 2017 08:24 AM
(This post was last modified: Nov 14, 2017 08:25 AM by fx bg.)
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);
|