NorbertH Posted April 20, 2022 Share Posted April 20, 2022 Hi all , I get a "Headers already sent" when i call PW from the commandline. If i start output before including PW. I know that is an Issue if doing output in a webbrowser before starting the actual session but i did not expect this in a CLI call. Here is the script: <?php namespace ProcessWire; $path = "../../index.php"; $path = realpath($path); echo ("\nPath: " .$path. "\n"); include $path; Here is the Error: Path: /usr/local/www/apache24/noexec/mein-kaffe.de/processwire/index.php PHP Warning: session_set_save_handler(): Cannot change save handler when headers already sent in /usr/local/www/apache24/noexec/mein-kaffe.de/processwire/wire/core/WireSessionHandler.php on line 57 Warning: session_set_save_handler(): Cannot change save handler when headers already sent in /usr/local/www/apache24/noexec/mein-kaffe.de/processwire/wire/core/WireSessionHandler.php on line 57 PHP Warning: session_name(): Cannot change session name when headers already sent in /usr/local/www/apache24/noexec/mein-kaffe.de/processwire/wire/core/Session.php on line 286 Warning: session_name(): Cannot change session name when headers already sent in /usr/local/www/apache24/noexec/mein-kaffe.de/processwire/wire/core/Session.php on line 286 PHP Warning: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time in /usr/local/www/apache24/noexec/mein-kaffe.de/processwire/wire/core/Session.php on line 289 Warning: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time in /usr/local/www/apache24/noexec/mein-kaffe.de/processwire/wire/core/Session.php on line 289 PHP Warning: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time in /usr/local/www/apache24/noexec/mein-kaffe.de/processwire/wire/core/Session.php on line 290 Warning: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time in /usr/local/www/apache24/noexec/mein-kaffe.de/processwire/wire/core/Session.php on line 290 PHP Warning: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time in /usr/local/www/apache24/noexec/mein-kaffe.de/processwire/wire/core/Session.php on line 291 Warning: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time in /usr/local/www/apache24/noexec/mein-kaffe.de/processwire/wire/core/Session.php on line 291 PHP Warning: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time in /usr/local/www/apache24/noexec/mein-kaffe.de/processwire/wire/core/Session.php on line 292 Warning: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time in /usr/local/www/apache24/noexec/mein-kaffe.de/processwire/wire/core/Session.php on line 292 PHP Warning: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time in /usr/local/www/apache24/noexec/mein-kaffe.de/processwire/wire/core/Session.php on line 304 Warning: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time in /usr/local/www/apache24/noexec/mein-kaffe.de/processwire/wire/core/Session.php on line 304 I am not sure but shouldn't the session be started when running from CLI ? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now