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

  • Home
  • SEARCH
  • 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 4015306
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T09:36:11+00:00 2026-05-20T09:36:11+00:00

Background: I’m new to CakePHP. I have a small test site (mostly composted of

  • 0

Background: I’m new to CakePHP. I have a small test site (mostly composted of static views and a contact form at the moment) to play with while I learn. Everything worked fine on localhost (Apache on Ubuntu) so I deployed it to a shared hosting account (provided by Lunarpages). I moved the /cake folder out of the normal directory structure (so I could use it for multiple apps) and I reconfigured my webroot’s index.php paths accordingly.

Problems:

  1. setFlash messages do not get displayed. Even making a simple view that does nothing other than $this->Session->setFlash('message');. I don’t get any error message, the flash just doesn’t get displayed

  2. Redirects don’t work. For instance, after the contact form is completed I want to $this->redirect( array( 'action' => 'success' ), null, true); but the server throws an error:

    Warning (2): Cannot modify header information – headers already sent by (output started at /routetoapp/config/routes.php:40) [CORE/cake/libs/controller/controller.php, line 742]

Everything else seems to work just as it did on localhost – URL rewriting, component loading, model validation. I don’t know if my problems are related or separate issues

Troubleshooting so far:

  1. I’ve tried both ‘cake’ and ‘php’ for Configure::write('Session.save', 'val'); but neither made a difference.
  2. My app/tmp folder is writeable.
  3. My layout template has the correct code for displaying flash messages. (The exact same M, V, C, and Layout objects display the expected flash on localhost)

I assume I’m missing something simple, but I’m new to this framework so I’m not sure where else to look.

  • 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-05-20T09:36:12+00:00Added an answer on May 20, 2026 at 9:36 am

    See Matt Huggins answer for your flash problem. That’s correct

    As for your redirect issue,

    you might have an extra space or something in your routes.php file. Make sure there are no spaces before the starting <?php tag and remove the closing ?>

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

Sidebar

Related Questions

Background I have a massive db for a SharePoint site collection. It is 130GB
Background: I have a little video playing app with a UI inspired by the
Background I am trying to create a copy of a business object I have
Background I have been asked by a client to create a picture of the
Background We have a Windows .NET application used by our field employees who travel
Background : I currently have a Web Forms, ASP.NET 3.5/C# application which I'm interested
Background I have a web app that will create an image from user input.
background-position: -200px 0; one site says it crops an image from the bottom and
Background: I have a MainTest class that has many buttons, each of which instantiate
Background I have a secured folder containing secret report files (in pdf format). Each

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.