---
title: "Discussion on \"Why session_start() Fails After HTML — and Where Your Cookie Actually Goes\" | Hashnode"
description: "Discussion on \"Why session_start() Fails After HTML — and Where Your Cookie Actually Goes\". You put session_start() in the middle of your page, right where the login box is. The page loads, the session never starts, and PHP prints:\nWarning: Cannot modify header information - headers already"
url: "https://hashnode.com/posts/why-session-start-fails-after-html-and-where-your-cookie-actually-goes/6b027a0399861ae62738325b"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Why session\_start() Fails After HTML — and Where Your Cookie Actually Goes](https://rajadevsolutions.hashnode.dev/why-session-start-fails-after-html-and-where-your-cookie-actually-goes?utm_source=hashnode&utm_medium=feed)

You put session\_start() in the middle of your page, right where the login box is. The page loads, the session never starts, and PHP prints: Warning: Cannot modify header information - headers already

1d ago · 3 min read · rajadevsolutions.hashnode.dev  
Read the article

-   [#php](https://hashnode.com/tag/php)
-   [#sessions](https://hashnode.com/tag/sessions)
-   [#debugging](https://hashnode.com/tag/debugging)
-   [#web-development](https://hashnode.com/tag/web-development)

## Written by

[Raja Hunain](https://hashnode.com/@rajadevsolutions)

@rajadevsolutions

  
[View profile](https://hashnode.com/@rajadevsolutions)

Full Stack Developer — PHP, Laravel, MySQL, JavaScript. I write practical coding solutions at rajadevsolutions.online

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
