22.06.2015, 11:43
In this case, make sure You've got PHP installed(You can check it by executing "php -v", if the command works, it will return the php version, if it doesn't work.. you don't have PHP installed)
When you can transfer the PHP file, that means APACHE isn't configurated to call the PHP interpreter(Other words: You don't have PHP installed), so APACHE will handle the .php file as a file to be downloaded.
No, these warnings only shows if you had already performed any kind of output(this is, content header already sent to the client)
If so, the best thing We can do is the catch the output(ob_start) and at the end of the file release the buffer(ob_end_flush).
This will make sure that every header function called in the php script will be sent before the output itself.
The ram usage will be higher.
When you can transfer the PHP file, that means APACHE isn't configurated to call the PHP interpreter(Other words: You don't have PHP installed), so APACHE will handle the .php file as a file to be downloaded.
Quote:
If you later include more PHP code that modifies header values, you will get nasty warnings about "headers already sent".
|
If so, the best thing We can do is the catch the output(ob_start) and at the end of the file release the buffer(ob_end_flush).
This will make sure that every header function called in the php script will be sent before the output itself.
The ram usage will be higher.