kotakommalang Posted October 4, 2013 Share Posted October 4, 2013 (edited) Recently i moving to new domain. all configuration for new domain is already done. but i get 500 internal server error. and i got this message Warning: Invalid argument supplied for foreach() in /home/kotakomm/public_html/classes/Language.php on line 606 Bad SubDomain SQL query. and this is my line 606 foreach ($result AS $row) this is my line 602-608 public static function loadLanguages() { self::$_LANGUAGES = array(); $result = Db::getInstance()->ExecuteS('SELECT * FROM `'._DB_PREFIX_.'lang`'); foreach ($result AS $row) self::$_LANGUAGES[(int)$row['id_lang']] = $row; } so anyone knew how to fix this? i am really-really need help and new at this so please help me. sorry if my english bad. thanks im using 1.4.8.2 ver Edited October 4, 2013 by kotakommalang (see edit history) Link to comment Share on other sites More sharing options...
kotakommalang Posted October 4, 2013 Author Share Posted October 4, 2013 i change the line 602-608 to this public static function loadLanguages() { self::$_LANGUAGES = array(); $result = Db::getInstance()->ExecuteS('SELECT * FROM `'._DB_PREFIX_.'lang`'); if(is_array($result)) { foreach ($result AS $row) self::$_LANGUAGES[(int)$row['id_lang']] = $row; } } the error message gone but "Bad SubDomain SQL query." still come out. so any idea? Link to comment Share on other sites More sharing options...
vekia Posted October 5, 2013 Share Posted October 5, 2013 have you got an access to some database manager like phpmyadmin? if so, can you try to run query from this function? Link to comment Share on other sites More sharing options...
tuk66 Posted October 9, 2013 Share Posted October 9, 2013 Check if all tables are moved to the new database. This error is caused by no records returned by this query: SELECT `name` FROM `ps_subdomain` You need at least one record in this table. Link to comment Share on other sites More sharing options...
Recommended Posts