Cannot send headers; headers already sent in /www/janmiklin.cz/www/www_application/default/controllers/ClankyController.php, line 1
File: /www/janmiklin.cz/www/www_library/Zend/Controller/Response/Abstract.php Line: 281
Line 276: public function canSendHeaders($throw = false)
Line 277: {
Line 278: $ok = headers_sent($file, $line);
Line 279: if ($ok && $throw && $this->headersSentThrowsException) {
Line 280: require_once 'Zend/Controller/Response/Exception.php';
Line 281: throw new Zend_Controller_Response_Exception('Cannot send headers; headers already sent ...
Line 282: }
Line 283:
Line 284: return !$ok;
Line 285: }
Response/Abstract.php (147) source ▶ Zend_Controller_Response_Abstract-> canSendHeaders (arguments ▶)
| $throw | bool(true)
|
Line 142: * @param int $code
Line 143: * @return Zend_Controller_Response_Abstract
Line 144: */
Line 145: public function setRedirect($url, $code = 302)
Line 146: {
Line 147: $this->canSendHeaders(true);
Line 148: $this->setHeader('Location', $url, true)
Line 149: ->setHttpResponseCode($code);
Line 150:
Line 151: return $this;
Helper/Redirector.php (200) source ▶ Zend_Controller_Response_Abstract-> setRedirect (arguments ▶)
| $url | string(16) "/chybna-stranka/"
|
| $code | int(302)
|
Line 195: if ((('http' == $proto) && (80 != $port)) || (('https' == $proto) && (443 != $port))) {
Line 196: $uri .= ':' . $port;
Line 197: }
Line 198: $url = $uri . '/' . ltrim($url, '/');
Line 199: }
Line 200: $this->getResponse()->setRedirect($url, $this->getCode());
Line 201: }
Line 202:
Line 203: /**
Line 204: * Retrieve currently set URL for redirect
Helper/Redirector.php (371) source ▶ Zend_Controller_Action_Helper_Redirector-> _redirect (arguments ▶)
| $url | string(16) "/chybna-stranka/"
|
Line 366: // If relative URL, decide if we should prepend base URL
Line 367: if (!preg_match('|^[a-z]+://|', $url)) {
Line 368: $url = $this->_prependBase($url);
Line 369: }
Line 370:
Line 371: $this->_redirect($url);
Line 372: }
Line 373:
Line 374: /**
Line 375: * Perform a redirect to an action/controller/module with params
Helper/Redirector.php (453) source ▶ Zend_Controller_Action_Helper_Redirector-> setGotoUrl (arguments ▶)
| $url | string(16) "/chybna-stranka/"
|
| $options | array(0) {
}
|
Line 448: * @param array $options
Line 449: * @return void
Line 450: */
Line 451: public function gotoUrl($url, array $options = array())
Line 452: {
Line 453: $this->setGotoUrl($url, $options);
Line 454:
Line 455: if ($this->getExit()) {
Line 456: $this->redirectAndExit();
Line 457: }
Controller/Action.php (675) source ▶ Zend_Controller_Action_Helper_Redirector-> gotoUrl (arguments ▶)
| $url | string(16) "/chybna-stranka/"
|
| $options | array(0) {
}
|
Line 670: * @param array $options Options to be used when redirecting
Line 671: * @return void
Line 672: */
Line 673: protected function _redirect($url, array $options = array())
Line 674: {
Line 675: $this->_helper->redirector->gotoUrl($url, $options);
Line 676: }
Line 677: }
controllers/ClankyController.php (29) source ▶ Zend_Controller_Action-> _redirect (arguments ▶)
| $url | string(16) "/chybna-stranka/"
|
Line 24: $this->view->description = $model->zkratText($pole['popis'], 155);
Line 25: $this->view->keywords = 'články,fotografie,eseje,cestopisy,'.$pole['nazev'];
Line 26:
Line 27: if($pole['id']=='')
Line 28: {
Line 29: $this->_redirect('/chybna-stranka/');
Line 30: }
Line 31:
Line 32: $this->view->pole = $pole;
Line 33: $this->view->fotky = $model->select('*', 'clanky_foto', 'id_clanku="'.$this->view->pole['id'...
Controller/Action.php (502) source ▶ ClankyController-> detailAction ()
Line 497: // preDispatch() didn't change the action, so we can continue
Line 498: if ($this->getInvokeArg('useCaseSensitiveActions') || in_array($action, get_class_method...
Line 499: if ($this->getInvokeArg('useCaseSensitiveActions')) {
Line 500: trigger_error('Using case sensitive actions without word separators is deprecate...
Line 501: }
Line 502: $this->$action();
Line 503: } else {
Line 504: $this->__call($action, array());
Line 505: }
Line 506: $this->postDispatch();
Dispatcher/Standard.php (293) source ▶ Zend_Controller_Action-> dispatch (arguments ▶)
| $action | string(12) "detailAction"
|
Line 288: if (empty($disableOb)) {
Line 289: ob_start();
Line 290: }
Line 291:
Line 292: try {
Line 293: $controller->dispatch($action);
Line 294: } catch (Exception $e) {
Line 295: // Clean output buffer on error
Line 296: $curObLevel = ob_get_level();
Line 297: if ($curObLevel > $obLevel) {
Controller/Front.php (914) source ▶ Zend_Controller_Dispatcher_Standard-> dispatch (arguments ▶)
| $request | object(Zend_Controller_Request_Http)#21 (14) { ["_paramSources:protected"] => array(2) { [0] => string(4) "_GET" [1] => string(5) "_POST" } ["_requestUri:protected"] => string(52) "/clanek-vznikne-na-jihu-moravy-nova-chranena-oblast/" ["_baseUrl:protected"] => string(0) "" ["_basePath:protected"] => NULL ["_pathInfo:protected"] => string(0) "" ["_params:protected"] => array(4) { ["url"] => string(43) "vznikne-na-jihu-moravy-nova-chranena-oblast" ["module"] => string(7) "default" ["controller"] => string(6) "clanky" ["action"] => string(6) "detail" } ["_aliases:protected"] => array(0) { } ["_dispatched:protected"] => bool(true) ["_module:protected"] => string(7) "default" ["_moduleKey:protected"] => string(6) "module" ["_controller:protected"] => string(6) "clanky" ["_controllerKey:protected"] => string(10) "controller" ["_action:protected"] => string(6) "detail" ["_actionKey:protected"] => string(6) "action" } |
| $response | object(Zend_Controller_Response_Http)#22 (8) { ["_body:protected"] => array(0) { } ["_exceptions:protected"] => array(0) { } ["_headers:protected"] => array(0) { } ["_headersRaw:protected"] => array(0) { } ["_httpResponseCode:protected"] => int(200) ["_isRedirect:protected"] => bool(false) ["_renderExceptions:protected"] => bool(false) ["headersSentThrowsException"] => bool(true) } |
Line 909:
Line 910: /**
Line 911: * Dispatch request
Line 912: */
Line 913: try {
Line 914: $dispatcher->dispatch($this->_request, $this->_response);
Line 915: } catch (Exception $e) {
Line 916: if ($this->throwExceptions()) {
Line 917: throw $e;
Line 918: }
www/index.php (78) source ▶ Zend_Controller_Front-> dispatch ()
Line 73: */
Line 74:
Line 75: Zend_Layout::startMvc(array('layoutPath'=>'../www_application/scripts/layouts'));
Line 76:
Line 77: // run!
Line 78: $controller->dispatch();
exception 'Zend_Controller_Response_Exception' with message 'Cannot send headers; headers already sent in /www/janmiklin.cz/www/www_application/default/controllers/ClankyController.php, line 1' in /www/janmiklin.cz/www/www_library/Zend/Controller/Response/Abstract.php:281
Stack trace:
#0 /www/janmiklin.cz/www/www_library/Zend/Controller/Response/Abstract.php(147): Zend_Controller_Response_Abstract->canSendHeaders(true)
#1 /www/janmiklin.cz/www/www_library/Zend/Controller/Action/Helper/Redirector.php(200): Zend_Controller_Response_Abstract->setRedirect('/chybna-stranka...', 302)
#2 /www/janmiklin.cz/www/www_library/Zend/Controller/Action/Helper/Redirector.php(371): Zend_Controller_Action_Helper_Redirector->_redirect('/chybna-stranka...')
#3 /www/janmiklin.cz/www/www_library/Zend/Controller/Action/Helper/Redirector.php(453): Zend_Controller_Action_Helper_Redirector->setGotoUrl('/chybna-stranka...', Array)
#4 /www/janmiklin.cz/www/www_library/Zend/Controller/Action.php(675): Zend_Controller_Action_Helper_Redirector->gotoUrl('/chybna-stranka...', Array)
#5 /www/janmiklin.cz/www/www_application/default/controllers/ClankyController.php(29): Zend_Controller_Action->_redirect('/chybna-stranka...')
#6 /www/janmiklin.cz/www/www_library/Zend/Controller/Action.php(502): ClankyController->detailAction()
#7 /www/janmiklin.cz/www/www_library/Zend/Controller/Dispatcher/Standard.php(293): Zend_Controller_Action->dispatch('detailAction')
#8 /www/janmiklin.cz/www/www_library/Zend/Controller/Front.php(914): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#9 /www/janmiklin.cz/www/www/index.php(78): Zend_Controller_Front->dispatch()
#10 {main}
| x-cc-id | ccc02-02 |
| Host | www.janmiklin.cz |
| User-Agent | CCBot/1.0 (+http://www.commoncrawl.org/bot.html) |
| Accept | text/html,application/xhtml+xml,text/xml;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 |
| Accept-Language | en-us,en;q=0.5 |
| Accept-Encoding | gzip |
| Accept-Charset | ISO-8859-1,utf-8;q=0.7,*;q=0.7 |
| Connection | close |
| Cache-Control | no-cache |
| Pragma | no-cache |
empty
empty
empty
| REDIRECT_STATUS | string(3) "200"
|
| HTTP_X_CC_ID | string(8) "ccc02-02"
|
| HTTP_HOST | string(16) "www.janmiklin.cz"
|
| HTTP_USER_AGENT | string(48) "CCBot/1.0 (+http://www.commoncrawl.org/bot.html)"
|
| HTTP_ACCEPT | string(83) "text/html,application/xhtml+xml,text/xml;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5"
|
| HTTP_ACCEPT_LANGUAGE | string(14) "en-us,en;q=0.5"
|
| HTTP_ACCEPT_ENCODING | string(4) "gzip"
|
| HTTP_ACCEPT_CHARSET | string(30) "ISO-8859-1,utf-8;q=0.7,*;q=0.7"
|
| HTTP_CONNECTION | string(5) "close"
|
| HTTP_CACHE_CONTROL | string(8) "no-cache"
|
| HTTP_PRAGMA | string(8) "no-cache"
|
| PATH | string(28) "/usr/local/bin:/usr/bin:/bin"
|
| SERVER_SIGNATURE | string(140) "<address>Apache/2.2.9 (Debian) DAV/2 SVN/1.4.2 PHP/5.2.0-8+etch13 mod_ssl/2.2.9 OpenSSL/0.9.8g Server at www.janmiklin.cz Port 80</address>
"
|
| SERVER_SOFTWARE | string(85) "Apache/2.2.9 (Debian) DAV/2 SVN/1.4.2 PHP/5.2.0-8+etch13 mod_ssl/2.2.9 OpenSSL/0.9.8g"
|
| SERVER_NAME | string(16) "www.janmiklin.cz"
|
| SERVER_ADDR | string(12) "81.91.84.235"
|
| SERVER_PORT | string(2) "80"
|
| REMOTE_ADDR | string(13) "38.107.191.95"
|
| DOCUMENT_ROOT | string(25) "/var/www/localhost/htdocs"
|
| SERVER_ADMIN | string(15) "ivo@rebenda.com"
|
| SCRIPT_FILENAME | string(35) "/www/janmiklin.cz/www/www/index.php"
|
| REMOTE_PORT | string(5) "29174"
|
| REDIRECT_URL | string(52) "/clanek-vznikne-na-jihu-moravy-nova-chranena-oblast/"
|
| GATEWAY_INTERFACE | string(7) "CGI/1.1"
|
| SERVER_PROTOCOL | string(8) "HTTP/1.1"
|
| REQUEST_METHOD | string(3) "GET"
|
| QUERY_STRING | string(0) ""
|
| REQUEST_URI | string(52) "/clanek-vznikne-na-jihu-moravy-nova-chranena-oblast/"
|
| SCRIPT_NAME | string(14) "/www/index.php"
|
| PHP_SELF | string(14) "/www/index.php"
|
| REQUEST_TIME | int(1283512117)
|
| argv | array(0) {
}
|
| argc | int(0)
|
X-Powered-By: PHP/5.2.0-8+etch13
Content-type: text/html