Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
Security_Installer Posted July 8, 2022 Posted July 8, 2022 Im trying to move to an upgraded server (self hosted my own hardware) Having an issue after moving all folders and the db. Once moved I get a 500 error and all i can find in the logs that i deem relevant (note i deem it may not be etc xD) is this PHP Fatal error: Uncaught TypeError: mysqli::real_connect(): Argument #5 ($port) must be of type ?int, string given in /tsi/html/community/system/Db/Db.php:256 Stack trace: #0 /tsi/html/community/system/Db/Db.php(256): mysqli->real_connect() #1 /tsi/html/community/system/Db/Db.php(356): IPS\_Db->_establishConnection() #2 /tsi/html/community/system/Db/Db.php(996): IPS\_Db->checkConnection() #3 /tsi/html/community/system/Db/Db.php(2366): IPS\_Db->real_escape_string() #4 /tsi/html/community/system/Data/Store/Database.php(92): IPS\_Db->in() #5 /community/system/Data/Store/Database.php(108): IPS\Data\Store\_Database->loadIntoMemory() #6 /html/community/system/Data/Store/Database.php(162): IPS\Data\Store\_Database->get() #7 /html/community/system/Data/AbstractData.php(126): IPS\Data\Store\_Database->exists() #8 /tsi/html/community/system/Data/Store.php(303): IPS\Data\_AbstractData->__isset() #9 /tsi/html/community/system/Settings/Settings.php(166): IPS\Data\_Store->__isset() #10 /tsi/html/community/system/Settings/Settings.php(122): IPS\_Settings->loadFromDb() #11 /tsi/html/community/system/Http/Url/Friendly.php(671): IPS\_Settings->__get() #12 /tsi/html/community/system/Http/Url/Friendly.php(90): IPS\Http\Url\_Friendly::furlDefinition() #13 /tsi/html/community/system/Http/Url.php(269): IPS\Http\Url\_Friendly::createFriendlyUrlFromComponents() #14 /tsi/html/community/system/Request/Request.php(276): IPS\Http\_Url::createFromString() #15 /tsi/html/community/system/Log/Log.php(106): IPS\_Request->url() #16 /tsi/html/community/init.php(1029): IPS\_Log::log() #17 [internal function]: IPS\IPS::exceptionHandler() #18 {main} thrown in /tsi/html/community/system/Db/Db.php on line 256 No I assume this is beacuse the db connection info is 'sql_driver' => 'mysql', 'sql_host' => '127.0.0.1:3309', etc Im running mysql 57 on port 3309 (same on the current working server) but wonder if i should be entering it differently into the config? Many thanks
teraßyte Posted July 8, 2022 Posted July 8, 2022 (edited) Update your conf_global.php file with: 'sql_host' => '127.0.0.1', 'sql_port' => 3309, In case you also need to specify a socket the variable is: 'sql_socket' => '/path/to/socket', And you can remove the sql_driver row. IPS in the past supported MSSQL but it doesn't anymore so that's an unnecessary variable. It can only use mysqli right now. Edited July 8, 2022 by teraßyte
Security_Installer Posted July 8, 2022 Author Posted July 8, 2022 many thanks I now get the ipb error 500 page rather than the webserver one maybe something else shouldnt be here (ive had ipb since v2) <?php $INFO = array ( 'sql_host' => '127.0.0.1', 'sql_port' => '3309', 'sql_database' => 'abcdefg', 'sql_user' => 'abcdefg', 'sql_pass' => '12345678', 'sql_tbl_prefix' => 'ddrr_', 'sql_debug' => '1', 'board_start' => '1131793624', 'installed' => '1', 'php_ext' => 'php', 'safe_mode' => '1', 'board_url' => 'https://www.thesecurityinstaller.co.uk/community/', 'admin_group' => '4', 'guest_group' => '2', 'member_group' => '3', 'auth_group' => '1', 'mysql_tbl_type' => 'MyISAM', 'top_site_list_integrate' => '1', 'top_site_list_url' => '', 'top_site_list_prefix' => 'tsl_', 'banned_group' => '5', 'use_friendly_urls' => '1', 'sql_charset' => 'utf8', 'sql_utf8mb4' => true, ); thanks
teraßyte Posted July 8, 2022 Posted July 8, 2022 Try using the sql_port value as a number rather than a string. And, if you want to clean up your conf_global.php file, these are the values you'd have to keep comparing it to a fresh 4.x install (not sure if about your 3 top_site_list rows, some really old mod perhaps?): <?php $INFO = array ( 'sql_host' => '127.0.0.1', 'sql_database' => 'abcdefg', 'sql_user' => 'abcdefg', 'sql_pass' => '12345678', 'sql_port' => 3309, 'sql_tbl_prefix' => 'ddrr_', 'sql_utf8mb4' => true, 'board_start' => '1131793624', 'installed' => true, 'base_url' => 'https://www.thesecurityinstaller.co.uk/community/', 'admin_group' => '4', 'guest_group' => '2', 'member_group' => '3', ); Randy Calvert 1
Marc Posted July 8, 2022 Posted July 8, 2022 Using a fresh one as above would always be a good start. I would say here, have you checked to ensure your new hosting meets minimum requirements before you start? Moving really shouldnt be that difficult from one host to another.
Security_Installer Posted July 8, 2022 Author Posted July 8, 2022 yes the checker reports as attached. Then i get an ips error 500. There are no php errors logged on the server 1 hour ago, Marc Stridgen said: Using a fresh one as above would always be a good start. I would say here, have you checked to ensure your new hosting meets minimum requirements before you start? Moving really shouldnt be that difficult from one host to another. I will change that, i will also change to a default .htaccess
Marc Posted July 8, 2022 Posted July 8, 2022 Please let us know once you have changed that and if that resolves your issue
Recommended Posts