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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T23:55:58+00:00 2026-05-13T23:55:58+00:00

I get this error when trying to load a Zend Framework application: Fatal error:

  • 0

I get this error when trying to load a Zend Framework application:

Fatal error: Uncaught exception
‘Zend_Session_Exception’ with message
‘session has already been started by
session.auto-start or session_start()’
in
/www/htdocs/w00a1ed7/autospin/redaktion/library/Zend/Session.php:462

Stack trace:

#0 /www/htdocs/w00a1ed7/autospin/redaktion/library/Zend/Session/Namespace.php(143):
Zend_Session::start(true)

#1 /www/htdocs/w00a1ed7/autospin/redaktion/library/Zend/Auth/Storage/Session.php(87):
Zend_Session_Namespace->__construct(‘Zend_Auth’)

#2 /www/htdocs/w00a1ed7/autospin/redaktion/library/Zend/Auth.php(91):
Zend_Auth_Storage_Session->__construct()

#3 /www/htdocs/w00a1ed7/autospin/redaktion/library/Zend/Auth.php(141):
Zend_Auth->getStorage()

#4 /www/htdocs/w00a1ed7/autospin/redaktion/application/layouts/scripts/layout.phtml(31):
Zend_Auth->hasIdentity()

#5 /www/htdocs/w00a1ed7/autospin/redaktion/library/Zend/View.php(108):
include(‘/www/htdocs/w00…’)

#6 /www/htdocs/w00a1ed7/autospin/redaktion/library/Zend/View/Abstract.php(831):
Zend_View->_run(‘/www/htdocs/w00…’)

#7 /www/htdocs/w00a1ed in /www/htdocs/w00a1ed7/autospin/redaktion/library/Zend/Session.php
on line 462

I Use Zend_Auth and on my local server and it works well, but on a production server I get the preceding error, but not every time.

I have checked that session.autostart is set to 0 in the .htaccess file.

How do I fix this error?


Thank you for your Answer, but I do not user session_start() anywhere. Work only with ZF.

I Have this Problem only on shared server, on my local server script works perfectly.

I Use INIT Function with this code:

protected $user;

public function init()
{   
    if(!Zend_Auth::getInstance()->hasIdentity())
    {
        $this->_redirect('auth/login');
    }else
    {
        $this->user = Zend_Auth::getInstance()->getIdentity();
    }
}

I allready try to set tis code only in indexAction, so that other actions do not have to chack the Auth… but still have problems.

Ist there a way to set in an Action to do not check about session or somethink like this?

Beste regards

  • 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-13T23:55:58+00:00Added an answer on May 13, 2026 at 11:55 pm

    It’s what it says it is. Zend_Auth tries to start a new session, since Zend_Session::start() has not yet been called.

    The problem is that Zend_Session::start() has to be called before a session is started. But, since session.autostart is 0 (btw this is in php.ini not .htaccess), you have probably written session_start(); somewhere. You’re not allowed to do that, since ZF wishes to have full control over sessions, i.e. you shouldn’t access the global session variable directly.

    To solve it, search your code files for session_start() and either

    1. remove all occurences but one. To notice if it’s already been started, set error_reporting(E_ALL|E_STRICT);
    2. replace it with Zend_Session::start(); at all places

    If you can’t find all occurrences, find the one session_start(); that bothers your Zend_Auth::getInstance()->hasIdentity() and solve the problem quick n’ dirty with the following snippet

    try {
        Zend_Session::start();
    } catch(Zend_Session_Exception $e) {
        session_start();
    }
    

    If you’re using ZF in your whole application, I would go with 2)

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

Sidebar

Ask A Question

Stats

  • Questions 370k
  • Answers 370k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Two more tables will do the magic (below). Hacks like… May 14, 2026 at 6:36 pm
  • Editorial Team
    Editorial Team added an answer You can start by adjusting your CSS rules and using… May 14, 2026 at 6:36 pm
  • Editorial Team
    Editorial Team added an answer Just login a user for each test. The best way… May 14, 2026 at 6:36 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.