Author Topic: moved from xamp localhost to domain and getting error  (Read 2964 times)

Offline Sam_78

  • Sr. Member
  • ****
  • Posts: 270
  • Karma: +42/-1
    • View Profile
moved from xamp localhost to domain and getting error
« on: August 04, 2017, 09:16:51 AM »
Hello,
I moved my website to domain and it is throwing error "AbanteCart core v.1.2.10 syntax error, unexpected '}', expecting ',' or ')' in <b>/home/newucb/public_html/core/database/apdomysql.php</b> on line <b>20</b>"
which is :
try{
         $this->connection = new PDO("mysql:host=" . $hostname . ";port=" . $port . ";dbname=" . $database,
               $username, $password, array (PDO::ATTR_PERSISTENT => true));
      } catch (AException $e){
         $err = new AError('Cannot establish database connection to ' . $database . ' using ' . $username . '@' . $hostname);
         $err->toLog();

Can you help me how to get rid of this error. it is working fine on localhost.. I understand some files gets changed/doesn't work on server but how to resolve this??

Offline Sam_78

  • Sr. Member
  • ****
  • Posts: 270
  • Karma: +42/-1
    • View Profile
Re: moved from xamp localhost to domain and getting error
« Reply #1 on: August 04, 2017, 09:24:59 AM »
Solved.. I Went to https://github.com/abantecart/abantecart-src/blob/master/public_html/core/database/apdomysql.php and copy-pasted the code and it worked.. Thanks

Offline eCommerce Core

  • Administrator
  • Hero Member
  • *****
  • Posts: 1602
  • Karma: +93/-1
    • View Profile
Re: moved from xamp localhost to domain and getting error
« Reply #2 on: August 06, 2017, 10:29:47 PM »
Looks like you unintentionally modified your file. It is always a good practice to refresh your file(s) from repo.
“If you’re in the luckiest one per cent of humanity, you owe it to the rest of humanity to think about the other 99 per cent.”
― Warren Buffett

 

Powered by SMFPacks Social Login Mod