# CakePHP 3 Basic Auth - Not working once deployed

**URL:** <https://discourse.cakephp.org/t/cakephp-3-basic-auth-not-working-once-deployed/1644>\
**Category:** Need Help\
**Created:** [November 30, 2016, 3:14pm UTC](https://discourse.cakephp.org/t/cakephp-3-basic-auth-not-working-once-deployed/1644 "2016-11-30T15:14:59Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dannyackers](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/dannyackers/32/463_2.png) [@dannyackers](https://discourse.cakephp.org/u/dannyackers)\
**Post date:** [November 30, 2016, 3:14pm UTC](https://discourse.cakephp.org/t/cakephp-3-basic-auth-not-working-once-deployed/1644/1 "2016-11-30T15:14:59Z")

</div>

Hey guys,

I’ve got a Cake3 app that’s using the built in Basic Auth for a JSON API we’re building.

It’s working fine locally (MAMP), and on Jolt hosting, but as soon as I deploy it to Heart Internet it won’t authenticate. Almost as if it’s forgetting, filtering, or rejecting the Basic Auth dialogue/header input.

Are there any specific dependencies or mods that I need to enable on the server? Heart’s tech support are at a loss.

Any ideas where I can look for a solution? It simply keeps re-prompting for the auth, and the password is correct as I can log in to the web UI with it.

Server’s a VPS running a standard CentOS6 server with cPanel. Usual LAMP stack.

Thanks in advance for any guidance.

---

<div class="post-metadata">

**Author:** ![rrd](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/rrd/32/113_2.png) [@rrd](https://discourse.cakephp.org/u/rrd)\
**Post date:** [November 30, 2016, 4:04pm UTC](https://discourse.cakephp.org/t/cakephp-3-basic-auth-not-working-once-deployed/1644/2 "2016-11-30T16:04:02Z")

</div>

Do you have any error messages in the log files? Try to insert a few log entries into your code. It can help debugging the problem.

---

<div class="post-metadata">

**Author:** ![dannyackers](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/dannyackers/32/463_2.png) [@dannyackers](https://discourse.cakephp.org/u/dannyackers)\
**Post date:** [December 1, 2016, 10:13am UTC](https://discourse.cakephp.org/t/cakephp-3-basic-auth-not-working-once-deployed/1644/3 "2016-12-01T10:13:32Z")

</div>

Hey there, I’m getting no errors at all. I’ve debugged at all points through my code, and through the core (naughty), it’s just as if the response from the dialogue or the headers aren’t getting to the App. It’s weird. Any more ideas?

---

<div class="post-metadata">

**Author:** ![rrd](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/rrd/32/113_2.png) [@rrd](https://discourse.cakephp.org/u/rrd)\
**Post date:** [December 1, 2016, 10:29am UTC](https://discourse.cakephp.org/t/cakephp-3-basic-auth-not-working-once-deployed/1644/4 "2016-12-01T10:29:58Z")

</div>

Sorry. Without error messages I can not say anything, just “good luck”…

---

<div class="post-metadata">

**Author:** ![dannyackers](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/dannyackers/32/463_2.png) [@dannyackers](https://discourse.cakephp.org/u/dannyackers)\
**Post date:** [December 5, 2016, 12:10pm UTC](https://discourse.cakephp.org/t/cakephp-3-basic-auth-not-working-once-deployed/1644/5 "2016-12-05T12:10:20Z")

</div>

I thought as much, I’m in the same boat ☹ … thanks for your time anyways!
