0

I am trying to set up a website that uses outdated php constructs.

I am trying to set up ShoutIRC bot to run a web request web page. They use outdated php codes because it is an old script. I have tried using xampp to set it up and have also tried to set it up on HostGator. The only way I could get it to work was to downgrade php. I would really like to get it to run on the current php. I have tried changing the mysql to mysqli but all I get are errors. I am not sure what else to do.

print "Step 4 - Final testing and set up...

\n"; print "Attempting to connect to MySQL: "; if (@mysql_pconnect($_SESSION['db_host'].":".$_SESSION['db_port'], $_SESSION['db_user'], $_SESSION['db_pass']) === FALSE) { print "Error connecting to MySQL server! Error Number: ".mysql_errno()." -> ".mysql_error()."
"; print "Please check your settings and try again..."; break; } else { print "OK
"; }

        print "Attempting to set database '".$_SESSION['db_database']."' active: ";
        if (!@mysql_select_db($_SESSION['db_database'])) {
            print "ERROR! Number: ".mysql_errno()." -> ".mysql_error()."<br />";
            print "Attempting to create database '".$_SESSION['db_database']."'...<br />";
            @mysql_query("CREATE DATABASE IF NOT EXISTS ".$_SESSION['db_database']);
            print "Attempting to set database '".$_SESSION['db_database']."' active: ";
            if (!@mysql_select_db($_SESSION['db_database'])) {
                print "ERROR! Number: ".mysql_errno()." -> ".mysql_error()."<br />";
                print "Please check your settings and try again...";
                break;
            } else {
                print "OK<br />";
            }
        } else {
            print "OK<br />";
        }

when I change the .mysql_errno() to .mysqli_errno() and .mysql_error() to .mysqli_error() I get this error: Warning: mysqli_errno() expects exactly 1 parameter, 0 given in C:\xampp\htdocs\radiobot\install.php on line 434

0 Answers0