Database Error

Started by devl1, December 15, 2016, 07:44:30 AM

Previous topic - Next topic

devl1

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;



Illori

Quote from: Antes on December 07, 2016, 12:02:37 PM
it is related to IPv6 setup inside the WAMP itself. open your httpd.conf then find this and comment out;
Listen [::0]:80

devl1

Quote from: Illori on December 15, 2016, 07:53:32 AM
Quote from: Antes on December 07, 2016, 12:02:37 PM
it is related to IPv6 setup inside the WAMP itself. open your httpd.conf then find this and comment out;
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

Advertisement: