My index.php is not displaying the dashboard.php after succe

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
girish.k
Forum Newbie
Posts: 5
Joined: Mon Jan 18, 2016 12:54 am

My index.php is not displaying the dashboard.php after succe

Post by girish.k »

Hi Folks,

I Installed wamp server 2.5 in my windows 7
Apache/2.4.9 (Win64) PHP/5.5.12.
MySQL Version : 5.6.17
After making necessary changes in config.php. I am able to create the mysql database.
I tried to login in index.php screen, even though it's successfully logged in, dashboard.php is not displaying.
can anyone please help in this regard?

Thanks in advance.

Girish.K
User avatar
Celauran
Moderator
Posts: 6425
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: My index.php is not displaying the dashboard.php after s

Post by Celauran »

Hard to guess at much of anything without seeing the code in question. Are any errors being displayed? Is error reporting even turned on?
girish.k
Forum Newbie
Posts: 5
Joined: Mon Jan 18, 2016 12:54 am

Re: My index.php is not displaying the dashboard.php after s

Post by girish.k »

No errors displaying. The url shows the redirected dashboard.php but screen remains in login page.

PHP error log file shows like this
Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.5.12/ext/php_ldap.dll' - The specified module could not be found.
in Unknown on line 0
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: My index.php is not displaying the dashboard.php after s

Post by requinix »

If your dashboard has some sort of "if the user is not logged in then show the login page" stuff then it means you didn't get logged in.

Regardless, post code.
girish.k
Forum Newbie
Posts: 5
Joined: Mon Jan 18, 2016 12:54 am

Re: My index.php is not displaying the dashboard.php after s

Post by girish.k »

Login.php

Code: Select all

require_once(ROOT_DIR . 'Pages/Page.php');
require_once(ROOT_DIR . 'lib/Application/Authentication/namespace.php');

interface ILoginPage extends IPage
{
	/**
	 * @return string
	 */
	public function GetEmailAddress();

	/**
	 * @return string
	 */
	public function GetPassword();

	/**
	 * @return bool
	 */
	public function GetPersistLogin();

	public function GetShowRegisterLink();

	public function SetShowRegisterLink($value);

	public function SetShowScheduleLink($value);

	/**
	 * @return string
	 */
	public function GetSelectedLanguage();

	/**
	 * @return string
	 */
	public function GetRequestedLanguage();

	public function SetUseLogonName($value);

	public function SetResumeUrl($value);

	/**
	 * @return string
	 */
	public function GetResumeUrl();

	public function SetShowLoginError();

	/**
	 * @param $languageCode string
	 */
	public function SetSelectedLanguage($languageCode);

	/**
	 * @param $shouldShow bool
	 */
	public function ShowUsernamePrompt($shouldShow);

	/**
	 * @param $shouldShow bool
	 */
	public function ShowPasswordPrompt($shouldShow);

	/**
	 * @param $shouldShow bool
	 */
	public function ShowPersistLoginPrompt($shouldShow);

	/**
	 * @param $shouldShow bool
	 */
	public function ShowForgotPasswordPrompt($shouldShow);

	/**
	 * @param $url string
	 */
	public function SetRegistrationUrl($url);

	/**
	 * @param $url string
	 */
	public function SetPasswordResetUrl($url);
}

class LoginPage extends Page implements ILoginPage
{
	protected $presenter = null;

	public function __construct()
	{
		parent::__construct('LogIn'); // parent Page class

		$this->presenter = new LoginPresenter($this); // $this pseudo variable of class object is Page object
		$resumeUrl = $this->server->GetQuerystring(QueryStringKeys::REDIRECT);
		$resumeUrl = str_replace('&&', '&', $resumeUrl);
		$this->Set('ResumeUrl', $resumeUrl);
		$this->Set('ShowLoginError', false);
		$this->Set('Languages', Resources::GetInstance()->AvailableLanguages);
	}

	public function PageLoad()
	{
		$this->presenter->PageLoad();
		$this->Display('login.tpl');
	}

	public function GetEmailAddress()
	{
		return $this->GetForm(FormKeys::EMAIL);
	}

	public function GetPassword()
	{
		return $this->GetRawForm(FormKeys::PASSWORD);
	}

	public function GetPersistLogin()
	{
		return $this->GetForm(FormKeys::PERSIST_LOGIN);
	}

	public function GetShowRegisterLink()
	{
		return $this->GetVar('ShowRegisterLink');
	}

	public function SetShowRegisterLink($value)
	{
		$this->Set('ShowRegisterLink', $value);
	}

	public function GetSelectedLanguage()
	{
		return $this->GetForm(FormKeys::LANGUAGE);
	}

	public function SetUseLogonName($value)
	{
		$this->Set('UseLogonName', $value);
	}

	public function SetResumeUrl($value)
	{
		$this->Set('ResumeUrl', $value);
	}

	public function GetResumeUrl()
	{
		return $this->GetForm(FormKeys::RESUME);
	}

	public function DisplayWelcome()
	{
		return false;
	}

	/**
	 * @return bool
	 */
	public function LoggingIn()
	{
		$loggingIn = $this->GetForm(Actions::LOGIN);
		return !empty($loggingIn);
	}

	/**
	 * @return bool
	 */
	public function ChangingLanguage()
	{
		$lang = $this->GetRequestedLanguage();
		return !empty($lang);
	}

	public function Login()
	{
		$this->presenter->Login();
	}

	public function ChangeLanguage()
	{
		$this->presenter->ChangeLanguage();
	}

	public function SetShowLoginError()
	{
		$this->Set('ShowLoginError', true);
	}

	public function GetRequestedLanguage()
	{
		return $this->GetQuerystring(QueryStringKeys::LANGUAGE);
	}

	public function SetSelectedLanguage($languageCode)
	{
		$this->Set('SelectedLanguage', $languageCode);
	}

	protected function GetShouldAutoLogout()
	{
		return false;
	}

	public function ShowUsernamePrompt($shouldShow)
	{
		$this->Set('ShowUsernamePrompt', $shouldShow);
	}

	public function ShowPasswordPrompt($shouldShow)
	{
		$this->Set('ShowPasswordPrompt', $shouldShow);
	}

	public function ShowPersistLoginPrompt($shouldShow)
	{
		$this->Set('ShowPersistLoginPrompt', $shouldShow);
	}

	public function ShowForgotPasswordPrompt($shouldShow)
	{
		$this->Set('ShowForgotPasswordPrompt', $shouldShow);
	}

	public function SetShowScheduleLink($shouldShow)
	{
		$this->Set('ShowScheduleLink', $shouldShow);
	}

	public function SetPasswordResetUrl($url)
	{
		$this->Set('ForgotPasswordUrl', empty($url) ? Pages::FORGOT_PASSWORD : $url);
		if (BookedStringHelper::StartsWith($url, 'http'))
		{
			$this->Set('ForgotPasswordUrlNew', "target='_new'");
		}
	}

	public function SetRegistrationUrl($url)
	{
		$this->Set('RegisterUrl', empty($url) ? Pages::REGISTRATION : $url);
		if (BookedStringHelper::StartsWith($url, 'http'))
		{
			$this->Set('RegisterUrlNew', "target='_new'");
		}
	}
}
Last edited by requinix on Tue Jan 19, 2016 1:17 am, edited 1 time in total.
Reason: please use [syntax=php] tags when posting PHP code
girish.k
Forum Newbie
Posts: 5
Joined: Mon Jan 18, 2016 12:54 am

Re: My index.php is not displaying the dashboard.php after s

Post by girish.k »

I found it and corrected on my own.
Thank you all
Post Reply