ahero
Forum Replies Created
Viewing 1 replies (of 1 total)
-
Forum: Plugins
In reply to: [ABASE] Stack trace errors with 4.4.2 and PHP 7.0.0Hi Mark,
I have been working in PHP7 and can tell you mysql_ commands all need to be switched over to mysqli_ commands.
To get it to work on my end I had go manually change all the mysql_ commands over to mysqli_ commands in the abase.php file. Here are some of the changes:
1. Text replace “mysql_” with “mysqli_”
2. locate the “$abase_conn” string and replace with the following:line ~613:
$abase_conn = mysqli_connect($sqlHost, $sqlUser, $sqlPass, $sqlDatabase) or die("<font style='color: $error_color; background-color: white;'>".$GLOBALS['bus311mtd_page_shortcodes']."<B>Fatal Error</B> (".__LINE__.") - Couldn't connect to MySQL server on '$sqlHost'. This shortcode uses Database #$db_in. If this is correct, then see the <B>Warning</B> above. One or more of the following settings for Database #$db_in is probably not correct.<OL style='background-color: white;'> <li> Database host: '$sqlHost'.</li> <li> Database user: '$sqlUser'.</li> <li> Database user password: '$sqlPass'.</font>.");3. Text search each “mysqli_” and move the connection string to the beginning of the statement rather than the end:
line ~623:
$sqlTables = mysqli_query($abase_conn,"SELECT * FROM information_schema.TABLES WHERE TABLE_SCHEMA='$sqlDatabase'") or die("<font style='color: $error_color; background-color: white;'>".$GLOBALS['bus311mtd_page_shortcodes'].$lost_table_error."<B>Fatal Error</B> (".__LINE__.") </font><font style='background-color: white;'>" . mysqli_error() . "</font></font>");4. Eliminate or comment out any mysqli_select_db commands
line ~616:
// $db = mysqli_select_db($sqlDatabase, $abase_conn) // or die("<font style='color: $error_color; background-color: white;'>".$GLOBALS['bus311mtd_page_shortcodes']."<B>Fatal Error</B> (".__LINE__.") - Couldn't select database '$sqlDatabase'." . mysqli_error() . "<font style='color: $error_color; background-color: white;'>This shortcode uses Database #$db_in. If this is correct, then one or more of the following settings for Database #$db_in is probably not correct.<OL style='background-color: white;'></li> <li> Database name: '$sqlDatabase'.</li> <li> Database '$sqlDatabase' must be accessible by user '$sqlUser'.</font>");To verify it works I used the following command to just display a typical wordpress table:
[abase sql=”SHOW COLUMNS FROM wp_links”]
Hope this helps!
Viewing 1 replies (of 1 total)