Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IPv6 issue when env is set to dev #171

Closed
Dzanar opened this issue Sep 20, 2021 · 1 comment
Closed

IPv6 issue when env is set to dev #171

Dzanar opened this issue Sep 20, 2021 · 1 comment

Comments

@Dzanar
Copy link

Dzanar commented Sep 20, 2021

Server configuration

  • Operating System: Ubuntu 20.04 LTS
  • Web Server (+ version): nginx/1.21.3
  • PHP Version: 8.0.10
  • Server name and version (for example: TFS 0.3): TFS 1.3
  • MyAAC Version: 0.86

Client configuration (Your Computer)

  • Browser: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.82 Safari/537.36 Edg/93.0.961.52
  • Operating System: Windows 10 Home 21H1

Description: When the "$config['env'] = 'dev';" in the config.local.php and you have a IPv6 the page not loading.

Steps To Reproduce:

  1. Set $config['env'] = 'dev' in config.local.php.
  2. When you using IPv6 the page was not load and throw exception

`Whoops something went wrong...
SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'ip' at row 1

Backtrace:

#0 /home/otsmanager/www/nelena/system/libs/visitors.php(97): PDO->exec()
#1 /home/otsmanager/www/nelena/system/libs/visitors.php(40): Visitors->addVisitor()
#2 /home/otsmanager/www/nelena/index.php(240): Visitors->__construct()
#3 {main}`

@slawkens
Copy link
Owner

slawkens commented Jun 4, 2022

Thanks for reporting this.

The solution is to resize the ip field in visitors table.

The query:

ALTER TABLE `myaac_visitors` MODIFY `ip` VARCHAR(45) NOT NULL;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants