Вы мне написали, что: Очевидно же, что PHP тут не при чём. У вас DNS не работает.
ping localhost-а работает.
mysql на localhost-е, другие сайты на этом же компе работают нормально.
Пользователь добавил сообщение 17 Января 2017, 17:47:58:
Переписка с разработчиком сайта:
Hello. After update to php 7.1 sourceban breaks:
`Warning: mysqli_real_connect(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /www/sban/includes/adodb/drivers/adodb-mysqli.inc.php on line 124
Warning: mysqli_real_connect(): (HY000/2002): php_network_getaddresses: getaddrinfo failed: Name or service not known in /www/sban/includes/adodb/drivers/adodb-mysqli.inc.php on line 124
Fatal error: mysqli error: [2002: php_network_getaddresses: getaddrinfo failed: Name or service not known] in CONNECT(sbanuser, '', '', ) in /www/sban/includes/adodb/adodb-errorhandler.inc.php on line 79`
Whats wrong, help please...
PS: Ubuntu 16.04
[b]@galexrt[/b]
What address are you using to connect to the database server?
The issue is that the hostname you are using is invalid and can't be resolved to an IP address.
[b]hznovich[/b]
Localhost. I tried 127.0.0.1 and etc, doesn't work. Other websites work at the same system normally now.
[b]galexrt[/b]
Run the following command on the webserver and post the output:
cat /etc/hosts
[b]hznovich[/b]
127.0.0.1 localhost
127.0.1.1 gs-vlv-02
[b]galexrt[/b]
Do the "other websites" also use PHP 7.1?
[b]hznovich[/b]
yes. Now i remove php7.1 and all modules, but doesn't work (((
$ php -v
PHP 7.0.14-2+deb.sury.org~xenial+1 (cli) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
with the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured) v6.0.6, Copyright (c) 2002-2016, by ionCube Ltd.
with Zend OPcache v7.0.14-2+deb.sury.org~xenial+1, Copyright (c) 1999-2016, by Zend Technologies
[b]galexrt[/b]
Post the content of the /etc/resolv.conf.
[b]hznovich[/b]
nameserver 95.154.113.10
nameserver 95.154.112.75
nameserver 172.17.0.79
search inetvl.ru vladlink.ru
[b]galexrt[/b]
Please post your sourceBans config (without password).
[b]hznovich[/b]
<?php
/**
* config.php
*
* This file contains all of the configuration for the db
* that will
* @author SteamFriends Development Team
* @version 1.0.0
* @copyright SteamFriends (www.SteamFriends.com)
* @package SourceBans
*/
if(!defined('IN_SB')){echo 'You should not be here. Only follow links!';die();}
define('DB_HOST', 'localhost'); // The host/ip to your SQL server
define('DB_USER', 'sbanuser'); // The username to connect with
define('DB_PASS', ''); // The password
define('DB_NAME', 'sbans'); // Database name
define('DB_PREFIX', 'sb'); // The table prefix for SourceBans
define('DB_PORT','3306'); // The SQL port (Default: 3306)
define('SB_WP_URL','http://sban.example.com');
//define('DEVELOPER_MODE', true); // Use if you want to show debugmessages
define('SB_MEM', '128M'); // Override php memory limit, if isn't enough (Banlist is just a blank page)
?>
[b]galexrt[/b]
Add this to the config.php. before the ?>, go to your sourcebans page and post the output:
print_r('mysqli://'.DB_USER.':'.DB_PASS.'@'.DB_HOST.':'.DB_PORT.'/'.DB_NAME);
Replace your password with the word PASSWORD in the output.
[b]hznovich[/b]
mysqli://sbanuser:PASSWORD@localhost:3306/sbans
[b]galexrt[/b]
Are the following commands working on the webserver?
ping -c 2 localhost
ping -c 2 127.0.0.1
[b]hznovich[/b]
$ ping -c 2 localhost
PING localhost (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.011 ms
64 bytes from localhost (127.0.0.1): icmp_seq=2 ttl=64 time=0.014 ms
[b]galexrt[/b]
Can you reinstall SourceBans++ and check if the issue continues to exist?
(Please note: This is not an issue of SourceBans or SourceBans++! This seems to an issue on with your server configuration.)