# CLI SAPI/PHP Changes

- Thread: https://externals.io/message/34889
- Original archive: https://news-web.php.net/php.internals/34889
- Started by Andrew Rose on 2008-01-23T18:41:24+00:00
- Messages: 3
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · RFCs at https://externals.io/rfc.md · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #34889 — Andrew Rose — 2008-01-23T18:41:24+00:00

URL: https://externals.io/message/34889#34889

Hi

I'm looking into making a few changes to the PHP session code in
respect to the CLI SAPI.  But before I did, I wanted to see if the
changes (patch) would be excepted (I really hate wasting my time).
The changes are as such:

1. Update the session code to suppress "headers already sent" warnings
when running via the CLI SAPI.
2. Update the `session_set_save_handler()` functionality to persist past
 `session_destroy()` ready for another `session_start()`.  Maybe via a
flag?

From what I have gathered, the CLI SAPI silently ignores headers, so
the fact is throws warnings seems superfluous.  The session handler
persisting past a `session_destroy()` I'm just not sure about, so would
appreciate any heads up / advice.

Both points have workarounds, but it would be nice to not have to
workaround them.

Anyway, would these changes likely be accepted?

cheers
Andrew Rose

---

## #34918 — Brian Zablocky — 2008-01-24T06:05:55+00:00

URL: https://externals.io/message/34889#34918 · In reply to: #34889

Andrew Rose wrote:
> Hi
> 
> I'm looking into making a few changes to the PHP session code in
> respect to the CLI SAPI.  But before I did, I wanted to see if the
> changes (patch) would be excepted (I really hate wasting my time).
> The changes are as such:
> 
> 1. Update the session code to suppress "headers already sent" warnings
> when running via the CLI SAPI.
> 2. Update the `session_set_save_handler()` functionality to persist past
> `session_destroy()` ready for another `session_start()`.  Maybe via a
> flag?
> 
> From what I have gathered, the CLI SAPI silently ignores headers, so
> the fact is throws warnings seems superfluous.  The session handler
> persisting past a `session_destroy()` I'm just not sure about, so would
> appreciate any heads up / advice.
> 
> Both points have workarounds, but it would be nice to not have to
> workaround them.
> 
> Anyway, would these changes likely be accepted?
> 
> cheers
> Andrew Rose


I obviously can't speak for the php team, but I have personally experienced 
item 1 and have had to code around it.

I have no experience with item 2.


--Brian Z

---

## #34919 — Brian Zablocky — 2008-01-24T06:06:41+00:00

URL: https://externals.io/message/34889#34919 · In reply to: #34889

Andrew Rose wrote:
> Hi
> 
> I'm looking into making a few changes to the PHP session code in
> respect to the CLI SAPI.  But before I did, I wanted to see if the
> changes (patch) would be excepted (I really hate wasting my time).
> The changes are as such:
> 
> 1. Update the session code to suppress "headers already sent" warnings
> when running via the CLI SAPI.
> 2. Update the `session_set_save_handler()` functionality to persist past
> `session_destroy()` ready for another `session_start()`.  Maybe via a
> flag?
> 
> From what I have gathered, the CLI SAPI silently ignores headers, so
> the fact is throws warnings seems superfluous.  The session handler
> persisting past a `session_destroy()` I'm just not sure about, so would
> appreciate any heads up / advice.
> 
> Both points have workarounds, but it would be nice to not have to
> workaround them.
> 
> Anyway, would these changes likely be accepted?
> 
> cheers
> Andrew Rose


I obviously can't speak for the php team, but I have personally experienced 
item 1 and have had to code around it.

I have no experience with item 2.


--Brian Z
