Page 2 of 3

Re: Login and redirect problem

Posted: Tue May 26, 2015 12:33 pm
by skurudo
vestapcps wrote:i tired try changing password, adding new user and same always same this
Restart services ->

Code: Select all

service vesta restart

Re: Login and redirect problem

Posted: Wed May 27, 2015 5:27 am
by vestapcps
patstan wrote:What OS are you running on this server?
Centos 6.4

Re: Login and redirect problem

Posted: Wed May 27, 2015 5:27 am
by vestapcps
skurudo wrote:
vestapcps wrote:i tired try changing password, adding new user and same always same this
Restart services ->

Code: Select all

service vesta restart
i do restart and same

Re: Login and redirect problem

Posted: Wed May 27, 2015 6:34 am
by skurudo
vestapcps wrote:i do restart and same
pm me credentials from your server, let's see, what's going on

Re: Login and redirect problem

Posted: Wed May 27, 2015 2:28 pm
by skurudo
This error can be from broken sudo:

Code: Select all

[error] 16294#0: *29 FastCGI sent in stderr: "PHP message: PHP Warning:  Invalid argument supplied for foreach() in /usr/local/vesta/web/login/index.php on line 33" while reading response header from upstream, client: 0000000000, server: _, request: "POST /login/ HTTP/1.1", upstream: "fastcgi://unix:/var/run/vesta-php.sock:", host: "0000000000:8083", referrer: "https://0000000000:8083/login/"
sudo
sudo: unable to open /etc/sudoers: Permission denied
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin

Way to fix (check owner and rights before!):
mkdir /etc/sudoers.d
/usr/local/vesta/upd/add_sudo.sh
chmod 0440 /etc/sudoers
chown root:root /etc/sudoers
chmod 0440 /etc/sudoers.d/admin
chown root:root /etc/sudoers.d/admin
chown root:root /usr/bin/sudo
chmod 4755 /usr/bin/sudo

Image

Re: Login and redirect problem

Posted: Thu May 28, 2015 7:24 am
by vestapcps
Big thanks for skurudo!
Problem Fixed.

Re: Login and redirect problem

Posted: Wed Oct 14, 2015 2:50 pm
by mbsmi
skurudo wrote:This error can be from broken sudo:
Way to fix (check owner and rights before!):
mkdir /etc/sudoers.d
/usr/local/vesta/upd/add_sudo.sh
chmod 0440 /etc/sudoers
chown root:root /etc/sudoers
chmod 0440 /etc/sudoers.d/admin
chown root:root /etc/sudoers.d/admin
chown root:root /usr/bin/sudo
chmod 4755 /usr/bin/sudo
I have having this same issue however I am unable to solve it using those steps. I am using Ubuntu 14.04.

nginx-error log:

Code: Select all

2015/10/14 10:15:56 [error] 5809#0: *13 FastCGI sent in stderr: "PHP message: PHP Warning:  Invalid argument supplied for foreach() in /usr/local/vesta/web/login/index.php on line 83" while reading response header from upstream, client: 98.95.191.58, server: _, request: "GET /login/ HTTP/1.1", upstream: "fastcgi://unix:/var/run/vesta-php.sock:", host: "accessdrive.net:8083"
2015/10/14 10:16:02 [error] 5809#0: *13 FastCGI sent in stderr: "PHP message: PHP Warning:  Invalid argument supplied for foreach() in /usr/local/vesta/web/login/index.php on line 83" while reading response header from upstream, client: 98.95.191.58, server: _, request: "GET /login/ HTTP/1.1", upstream: "fastcgi://unix:/var/run/vesta-php.sock:", host: "accessdrive.net:8083", referrer: "https://accessdrive.net:8083/login/"
2015/10/14 10:16:07 [error] 5809#0: *13 FastCGI sent in stderr: "PHP message: PHP Warning:  Invalid argument supplied for foreach() in /usr/local/vesta/web/login/index.php on line 83" while reading response header from upstream, client: 98.95.191.58, server: _, request: "POST /login/ HTTP/1.1", upstream: "fastcgi://unix:/var/run/vesta-php.sock:", host: "accessdrive.net:8083", referrer: "https://accessdrive.net:8083/login/"
2015/10/14 10:19:29 [error] 7010#0: *2 FastCGI sent in stderr: "PHP message: PHP Warning:  Invalid argument supplied for foreach() in /usr/local/vesta/web/login/index.php on line 83" while reading response header from upstream, client: 98.95.191.58, server: _, request: "GET /login/ HTTP/1.1", upstream: "fastcgi://unix:/var/run/vesta-php.sock:", host: "accessdrive.net:8083", referrer: "https://accessdrive.net:8083/login/"

Re: Login and redirect problem

Posted: Wed Nov 04, 2015 4:46 am
by mbsmi
bump...

Still having the same issue, anyone have any idea of the cause and fix?

Re: Login and redirect problem

Posted: Wed Nov 04, 2015 8:39 am
by tjebbeke
mbsmi wrote:bump...

Still having the same issue, anyone have any idea of the cause and fix?
Hi mbsmi,

You have some problem with this code:

Code: Select all

// Check system configuration
exec (VESTA_CMD . "v-list-sys-config json", $output, $return_var);
$data = json_decode(implode('', $output), true);
$sys_arr = $data['config'];
foreach ($sys_arr as $key => $value) {
    $_SESSION[$key] = $value;
}
Can you execute v-list-sys-config json on you server and show us the result?

Re: Login and redirect problem

Posted: Wed Nov 04, 2015 2:12 pm
by mbsmi
tjebbeke wrote: Can you execute v-list-sys-config json on you server and show us the result?
Sure this is the result I get:

Code: Select all

{
        "config": {
                "WEB_SYSTEM": "apache2",
                "WEB_RGROUPS": "www-data",
                "WEB_PORT": "8080",
                "WEB_SSL": "mod_ssl",
                "WEB_SSL_PORT": "8443",
                "PROXY_SYSTEM": "nginx",
                "PROXY_PORT": "80",
                "PROXY_SSL_PORT": "443",
                "FTP_SYSTEM": "vsftpd",
                "MAIL_SYSTEM": "",
                "IMAP_SYSTEM": "dovecot",
                "ANTIVIRUS_SYSTEM": "",
                "ANTISPAM_SYSTEM": "",
                "DB_SYSTEM": "mysql",
                "DNS_SYSTEM": "bind9",
                "STATS_SYSTEM": "webalizer,awstats",
                "BACKUP_SYSTEM": "local",
                "CRON_SYSTEM": "cron",
                "DISK_QUOTA": "no",
                "FIREWALL_SYSTEM": "iptables",
                "FIREWALL_EXTENSION": "fail2ban",
                "REPOSITORY": "cmmnt",
                "VERSION": "0.9.8"
                "LANGUAGE": "en"
        }
}