Advertisement:

Author Topic: Database Error  (Read 2777 times)

Offline devl1

  • Newbie
  • *
  • Posts: 2
Database Error
« on: December 15, 2016, 07:44:30 AM »
I'm using my local server "WAMP". After installing SMF and done all steps I went to localserver and opened my local forum. However after attempting to press "Home" button I'm having database error. From this point I can't press anything because it pops up this error.

Database Error

Incorrect string value: '''' for function inet_aton
File: C:\wamp64\www\Sources\Subs.php
Line: 2653

Line is(from 2643 to 2660, line 2653 is bolded):

   $smcFunc['db_query']('', '
         UPDATE {db_prefix}log_online
         SET log_time = {int:log_time}, ip = IFNULL(INET_ATON({string:ip}), 0), url = {string:url}
         WHERE session = {string:session}',
         array(
            'log_time' => time(),
            'ip' => $user_info['ip'],
            'url' => $serialized,
            'session' => $session_id,
         )
      );

      // Guess it got deleted.
      if ($smcFunc['db_affected_rows']() == 0)
         $_SESSION['log_time'] = 0;
   }
   else
      $_SESSION['log_time'] = 0;


« Last Edit: December 15, 2016, 08:05:52 AM by devl1 »

Offline Illori

  • Project Manager
  • SMF Master
  • *
  • Posts: 49,952
Re: Database Error
« Reply #1 on: December 15, 2016, 07:53:32 AM »
it is related to IPv6 setup inside the WAMP itself. open your httpd.conf then find this and comment out;
Code: [Select]
Listen [::0]:80

Offline devl1

  • Newbie
  • *
  • Posts: 2
Re: Database Error
« Reply #2 on: December 15, 2016, 08:04:51 AM »
it is related to IPv6 setup inside the WAMP itself. open your httpd.conf then find this and comment out;
Code: [Select]
Listen [::0]:80

Thank you!
If someone having same trouble:

Step by step:

Left click on wamp server icon
Move your mouse to APACHE
press on httpd.conf
it will open txt file
press cltr+f and type "0"
Keep pressing find next till you find that line "Listen [::0]:80"
and put # before "Listen [::0]:80" it should look like this "#Listen [::0]:80"
Save the file - restart wamp server