Jump to content

Moving Host in effect


Recommended Posts

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

Link to comment
Share on other sites

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 by teraßyte
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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',
);

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

yes the checker reports as attached. Then i get an ips error 500. There are no php errors logged on the server

 

Could contain: White Board, Text, Screen, Electronics

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

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...