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 6054467
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T08:09:23+00:00 2026-05-23T08:09:23+00:00

Possible Duplicate: Headers already sent by PHP I am new to zend.I tried to

  • 0

Possible Duplicate:
Headers already sent by PHP

I am new to zend.I tried to create simple form having two fields using zend. When i click submit button got the following error,

Fatal error: Uncaught exception 'Zend_Controller_Response_Exception' with message 'Cannot send headers; headers already sent in D:\xampp\htdocs\study\quickstart\application\controllers\EmployeeController.php, line 35' in D:\xampp\php\PEAR\Zend\Controller\Response\Abstract.php:282 Stack trace: #0 D:\xampp\php\PEAR\Zend\Controller\Response\Abstract.php(300): Zend_Controller_Response_Abstract->canSendHeaders(true) #1 D:\xampp\php\PEAR\Zend\Controller\Response\Abstract.php(727): Zend_Controller_Response_Abstract->sendHeaders() #2 D:\xampp\php\PEAR\Zend\Controller\Front.php(984): Zend_Controller_Response_Abstract->sendResponse() #3 D:\xampp\php\PEAR\Zend\Application\Bootstrap\Bootstrap.php(77): Zend_Controller_Front->dispatch() #4 D:\xampp\php\PEAR\Zend\Application.php(358): Zend_Application_Bootstrap_Bootstrap->run() #5 D:\xampp\htdocs\study\quickstart\public\index.php(25): Zend_Application->run() #6 {main} thrown in D:\xampp\php\PEAR\Zend\Controller\Response\Abstract.php  on line 282

I checked the following link,
zend header already send problem

I removed white spaces and gave close tag in all files, But still i am getting same error.

How to fix this error ?

Following shows EmployeeController.php:

<?php 
class EmployeeController extends Zend_Controller_Action
{
    public function init()
    {

    }
    public function indexAction()
    {

      $form = new Default_Form_Empdetails();
       $this->view->form = $form;
        $request = $this->getRequest();
          $formData = $request->getPost();
        if ($request->isPost()) {
            if ($form->isValid($request->getPost())) {  
                $empName = $form->getValue('empName');
                $empAddress = $form->getValue('empAddress');
                $emp = new Default_Model_DBTable_Employee();
                $emp->addAlbum($empName, $empAddress);
              $this->_helper->redirector('index');
            } else {
                $form->populate($formData);
            }
        }

    }
}
?>

Kindly help me

  • 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-23T08:09:23+00:00Added an answer on May 23, 2026 at 8:09 am

    It may be because of extra white spaces after php closing tag (?>) in some file.

    Also read this Post:

    PHP development: why redirects don’t work (headers already sent)

    • Any HTML output, including the DOCTYPE declaration or any HTML tag,
      including the head of the page
    • Extra whitespace before the opening PHP tag of the page, or outside the
      PHP tags of an include file
    • Using print() or echo before calling header() or session_start()
    • Using virtual() to include files
    • Using the byte-order mark (BOM) at the beginning of a page

    For example:

    enter image description here

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

Sidebar

Related Questions

Possible Duplicate: php headers already sent error I have attached my code which am
Possible Duplicate: PHP error: Cannot modify header information – headers already sent I've built
Possible Duplicate: Headers already sent by PHP My problem is that I have a
Possible Duplicate: PHP headers already sent So I just joined Hostgator.com, and was wondering,
Possible Duplicate: PHP error: Cannot modify header information – headers already sent Hi I
Possible Duplicate: PHP error: Cannot modify header information – headers already sent I have
Possible Duplicates: PHP headers already sent PHP session_start() error? What does this error mean?
Possible Duplicate: “Warning: Cannot modify header information - headers already sent by” error In
Possible Duplicate: How to resize an image using PHP? Here's what I've tried: $image
Possible Duplicate: HTML table with fixed headers? Looking for a solution to create a

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.