Jump to content

Recommended Posts

После ввода пароля и логина для входа в админку долго думает и белый экран в итоге.

Хостеру написали, скинул какие ошибки выдает.

[Tue Jan 09 18:37:36 2018] [error] [client 88.198.16.12] PHP Warning: mysql_select_db() expects parameter 2 to be resource, boolean given in /home/admin/web/***.ru/public_html/system/database/mysql.php on line 10
[Tue Jan 09 18:37:36 2018] [error] [client 88.198.16.12] PHP Warning: mysql_query() expects parameter 2 to be resource, boolean given in /home/admin/web/***.ru/public_html/system/database/mysql.php on line 14
[Tue Jan 09 18:37:36 2018] [error] [client 88.198.16.12] PHP Warning: mysql_query() expects parameter 2 to be resource, boolean given in /home/admin/web/***.ru/public_html/system/database/mysql.php on line 15
[Tue Jan 09 18:37:36 2018] [error] [client 88.198.16.12] PHP Warning: mysql_query() expects parameter 2 to be resource, boolean given in /home/admin/web/***.ru/public_html/system/database/mysql.php on line 16
[Tue Jan 09 18:37:36 2018] [error] [client 88.198.16.12] PHP Warning: mysql_query() expects parameter 2 to be resource, boolean given in /home/admin/web/***.ru/public_html/system/database/mysql.php on line 17
[Tue Jan 09 18:37:36 2018] [error] [client 88.198.16.12] PHP Warning: Invalid argument supplied for foreach() in /home/admin/web/***.ru/public_html/index.php on line 99

Ошибки ссылаются на:

public function __construct($hostname, $username, $password, $database) {
		if (!$this->link = mysql_connect($hostname, $username, $password)) {
      		trigger_error('Error: Could not make a database link using ' . $username . '@' . $hostname);
		}

    	if (!mysql_select_db($database, $this->link)) {
      		trigger_error('Error: Could not connect to database ' . $database);
    	}
		
		mysql_query("SET NAMES 'utf8'", $this->link);
		mysql_query("SET CHARACTER SET utf8", $this->link);
		mysql_query("SET CHARACTER_SET_CONNECTION=utf8", $this->link);
		mysql_query("SET SQL_MODE = ''", $this->link);
  	}

и

public function __construct($hostname, $username, $password, $database) {
        if (!$this->link = mysql_connect($hostname, $username, $password)) {
              trigger_error('Error: Could not make a database link using ' . $username . '@' . $hostname);
        }

Кто может подсказать куда копать в чем ошибках. Я так понимаю в базе что то не то. 

Может кто помочь?

Edited by Leanidas

Share this post


Link to post
Share on other sites

сначала хостеру напишите

Share this post


Link to post
Share on other sites

версию PHP повысили видать

Share this post


Link to post
Share on other sites
26 минут назад, spectre сказал:

сначала хостеру напишите

уже, они сказали у них на сервере все норм.

 

15 минут назад, vise сказал:

версию PHP повысили видать

да вроде такую же оставили

Share this post


Link to post
Share on other sites

Разобрались. Проблема была с автообновлением валюты

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
You are posting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.