A PHP Error was encountered

Severity: 8192

Message: Function create_function() is deprecated

Filename: geshi/geshi.php

Line Number: 4698

Backtrace:

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 4698
Function: _error_handler

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 4621
Function: _optimize_regexp_list_tokens_to_string

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 1655
Function: optimize_regexp_list

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 2029
Function: optimize_keyword_group

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 2168
Function: build_parse_cache

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/Process.php
Line: 45
Function: parse_code

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/models/Pastes.php
Line: 517
Function: syntax

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/controllers/Main.php
Line: 693
Function: getPaste

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/index.php
Line: 315
Function: require_once

asdasd - Stikked
From asd, 6 Years ago, written in PHP.
Embed
  1. if (!empty($_GET["action"]) and $_GET["action"] == "test") {
  2.                 $hostname = trim(htmlentities($_POST['hostname']));
  3.                 $username = trim(htmlentities($_POST['username']));
  4.                 $password = trim(htmlentities($_POST['password']));
  5.                 $database = trim(htmlentities($_POST['database']));
  6.  
  7.                 $link = mysqli_connect($hostname,$username,$password);
  8.                 if (!$link || empty($hostname)) {
  9.                     echo "<a href=\"install.php?step=2\" class=\"button\">Back</a><br /><br />";
  10.                     echo " Could not connect to the server <br />";
  11.                     echo mysqli_error();
  12.                 } else
  13.                     echo " Successfully connected to the server <br /><br />";
  14.                  
  15.                 if ($link && !$database) {
  16.                     echo "<br /><br /> No database name was given. <br />Available databases:</p><br />";
  17.                     $db_list = mysqli_list_dbs($link);
  18.                     echo "<pre><br />";
  19.                     while ($row = mysqli_fetch_array($db_list)) {
  20.                           echo $row['Database'] . "<br />";
  21.                     }
  22.                     echo "</pre><br />";
  23.                 }
  24.                 if ($database) {
  25.                     $dbcheck = mysqli_select_db("$database");
  26.  
  27.                     if (!$dbcheck) {
  28.                         echo "<a href=\"install.php?step=2\" class=\"button\">Back</a><br /><br />";
  29.                         echo "<img src=\"lib/icons/no.png\"> ".mysqli_error();
  30.                     } else {
  31.                         echo "<img src=\"themes/img/ok.png\"> Successfully connected to the database '" . $database . "' <br /><br /><br />";
  32.                         echo "<form action=\"install.php?step=2&action=w\" id=\"mail\" method=\"post\"><br />";
  33.                         echo "<input type=\"hidden\" name=\"hostname\" value=\"".$hostname."\"><br />";
  34.                         echo "<input type=\"hidden\" name=\"username\" value=\"".$username."\"><br />";
  35.                         echo "<input type=\"hidden\" name=\"password\" value=\"".$password."\"><br />";
  36.                         echo "<input type=\"hidden\" name=\"database\" value=\"".$database."\"><br />";
  37.                         echo "<input type=\"submit\" id=\"submit\" value=\"Install database !\" tabindex=\"5\" /><br />";
  38.                         echo "</form><br />";
  39.                     }
  40.                 }
  41.             }