Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8248255
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T23:08:00+00:00 2026-06-07T23:08:00+00:00

We have a site that we’re moving to a new server. Everything worked fine

  • 0

We have a site that we’re moving to a new server. Everything worked fine on the old server. It’s just the start of a site, so it’s pretty bare-bones.

When moving to our new server, trying to log-in no longer works. BUT – according to debugKit, the query generated by $this->Auth->login():

SELECT `User`.`id`, `User`.`name`, `User`.`email`, `User`.`username`, `User`.`password`, `User`.`role`, `User`.`created`, `User`.`modified` 
FROM `shopping_main`.`users` AS `User` 
WHERE `User`.`username` = 'another' 
AND `User`.`password` = '3813dd3a5eeb39c857d56f9ae58ec7f8237e5eb3' 
LIMIT 1

IS returning 1 row – yet this if block fails:

if ($this->Auth->login()) {
    $this->Session->setFlash(__('You are now logged in.'));
} else {
    $this->Session->setFlash(__('Invalid username or password, try again'));
}

PDO is installed on both (same version) – not sure if that matters, but we’ve had weird issues before w/ that.

When doing a fresh install of CakePHP 2.2 stable, everything lights up green (database connection, modrewrite…etc etc.)

I would have thought there was something wrong with our data, or code…etc, but – it’s the same data, the same code, and that’s verified by the fact that it DOES return 1 row.

Below is my most recent $components array in the AppController:

public $components = array(
    'DebugKit.Toolbar',
    'Session',
    'Cookie',
    'Auth' => array(
        'loginRedirect' => array('controller' => 'dashboard', 'action' => 'index', 'admin'=>true),
        'logoutRedirect' => array('controller' => 'users', 'action' => 'login', 'admin'=>true)
    )
);

UPDATE:

According to our server guy, the server we’re having the issue on is the only one with PECL intalled – when he removed it, the login worked. (We need it on the server for other things – why/what would cause that to keep our login from working?)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T23:08:01+00:00Added an answer on June 7, 2026 at 11:08 pm

    Answer by Original Poster (me):

    According to our server guy, “There are two ways to load PDO. The first is by using easyapache to install the PDO php extension. The second is by installing the PDO via PECL. It appears that the modules in question are different.”

    Apparently, this server had PECL on it instead of the normal easyapache PDO. When he removed that, and restarted/reset it with the easyapache PDO, everything worked great.

    So – sounds like CakePHP requires the “normal” PDO.

    Mystery solved.


    If you have PECL instead, you can use this workaround:

    1. Create a file “HpMysql.php” in your Datasource folder and add this code/class: https://github.com/lorenzo/HipHop/blob/master/Model/Datasource/Database/HpMysql.php

    2. Change your database.php ‘datasource’ to ‘HpMysql’

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a site that the other week was sending email just fine. All
I have a site that has been running fine for awhile. Ran an SVN
We have a site that's always been deployed on a windows server with no
I have a site that is running on a Windows Server 2008 machine with
I have site that works fine but when i put it through Google translate
I have a site that uses JS and jQuery and works fine on all
I have a site that i want to redirect all requests accept for 1
I have a site that allows download or streaming of mp3 files. All the
I have a site that can be accessed both through http (http://mysite.com) and https
I have a site that has an Rss feed, and this feed is consumed

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.