PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Tue Aug 22, 2017 2:06 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: Mon Jan 18, 2016 2:44 am 
Offline
Forum Newbie

Joined: Mon Jan 18, 2016 1:54 am
Posts: 5
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


Top
 Profile  
 
PostPosted: Mon Jan 18, 2016 7:28 am 
Offline
Moderator
User avatar

Joined: Tue Nov 09, 2010 3:39 pm
Posts: 6268
Location: Montreal, Canada
Hard to guess at much of anything without seeing the code in question. Are any errors being displayed? Is error reporting even turned on?

_________________
Supported PHP versions No longer supported versions


Top
 Profile  
 
PostPosted: Mon Jan 18, 2016 9:56 am 
Offline
Forum Newbie

Joined: Mon Jan 18, 2016 1:54 am
Posts: 5
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


Top
 Profile  
 
PostPosted: Mon Jan 18, 2016 5:12 pm 
Offline
Spammer :|
User avatar

Joined: Wed Oct 15, 2008 2:35 am
Posts: 6493
Location: WA, USA
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.


Top
 Profile  
 
PostPosted: Tue Jan 19, 2016 1:39 am 
Offline
Forum Newbie

Joined: Mon Jan 18, 2016 1:54 am
Posts: 5
Login.php

Syntax: [ Download ] [ Hide ]
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 2:17 am, edited 1 time in total.
please use [syntax=php] tags when posting PHP code


Top
 Profile  
 
PostPosted: Tue Jan 19, 2016 4:24 am 
Offline
Forum Newbie

Joined: Mon Jan 18, 2016 1:54 am
Posts: 5
I found it and corrected on my own.
Thank you all


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group