Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Vesta Web Interface
  • Search

Issue Found - Unable To Login! (Fix Included)

Questions regarding the Web Interface
GUI
Post Reply
  • Print view
Advanced search
2 posts • Page 1 of 1
marijuanatech
Posts: 7
Joined: Tue Oct 07, 2014 5:45 am

Issue Found - Unable To Login! (Fix Included)
  • Quote

Post by marijuanatech » Fri Oct 24, 2014 6:16 am

Hey Vesta! Love your product, but this bug I'm having is a little strange!

Login as admin fails - no error message is displayed. However, it says "incorrect password" if I enter the wrong password. I've reset the password through the web interface and through the /usr/local/vesta/bin command.

I check the logs...

FastCGI sent in stderr: "PHP message: PHP Warning: Invalid argument supplied for foreach() in /usr/local/vesta/web/login/index.php on line 33 ...

I checked line 33, and it looks like the issue is with it not being able to json decode the results of the "v-list-sys-config json"

I ran the results of the v-list-sys-config json command through a json validator and compared to the results off another (working) server. The bad bit seems to be a comma after FIREWALL_SYSTEM.

NON WORKING SERVER

Code: Select all

....
                "FIREWALL_SYSTEM": "iptables",

WORKING SERVER

Code: Select all

....
                "FIREWALL_SYSTEM": "iptables"
I was able to fix this issue by changing lines 30-35 to the following: The fix was adding a str_replace before the json_decode.

Code: Select all

// Check system configuration
exec (VESTA_CMD . "v-list-sys-config json", $output, $return_var);
// add in a str_replace to remove the infringing comma from the json output!
$data = json_decode(str_replace('"FIREWALL_SYSTEM": "iptables",', '"FIREWALL_SYSTEM": "iptables"', implode('', $output)), true);
$sys_arr = $data['config'];
foreach ($sys_arr as $key => $value) {
    $_SESSION[$key] = $value;
}
Top

skurudo
VestaCP Team
Posts: 8099
Joined: Fri Dec 26, 2014 2:23 pm
Contact:
Contact skurudo
Website Facebook Google+ Skype
Twitter

Re: Issue Found - Unable To Login! (Fix Included)
  • Quote

Post by skurudo » Wed May 27, 2015 2:34 pm

This error can be from broken sudo:
viewtopic.php?f=10&t=8349&p=27113#p27113
Top


Post Reply
  • Print view

2 posts • Page 1 of 1

Return to “Web Interface”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password