Here is my simple PHP program:
<HTML>
<HEAD>
<TITLE>Lookout World!</TITLE>
</HEAD>
<BODY>
<?php
session_start();
echo "Hello, world!";
?>
</BODY>
</HTML>
When I run this PHP program through Apache 2.4 web server, it throws these errors:
Warning: session_start(): Cannot send session cookie - headers already sent by (output started at C:\Apache24\htdocs\Hello.php:6) in C:\Apache24\htdocs\Hello.php on line 8
Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at C:\Apache24\htdocs\Hello.php:6) in C:\Apache24\htdocs\Hello.php on line 8 Hello, world!
The weird thing is, is that if you just have this:
<?php
session_start();
echo "Hello, world!";
?>
... The program works just fine then, and there are no errors. But, for the software I am working on, we need to have the PHP embedded into HTML files. (For a school project that is). So, how do I fix these and get rid of these errors. Because in our school project, it gives these errors too, and we cannot log into our school project's PHP program.