For on of my pages that are separate from phpVMS I want to use data from phpVMS and put it into a table. I have put in this code in the <head> part:
<?php
require_once("VatsimPHPgenerator.php");
$VatsimPHP=new VatsimPHP;
include 'core/codon.config.php';
?>
And I get this error:
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at F:\XAMPP\xampp\htdocs\deparr.php:14) in F:\XAMPP\xampp\htdocs\core\codon.config.php on line 40
There are a couple of threads on inplementing the phpvms classes outside of the core install, but your “cannot send headers” error is usually an issue of having white space, sometimes not noticeable, right before or right after a opening or closing php tag.
This is a common PHP error which is usually caused by:
White spaces before or after the PHP start “<?php” or end “?>” tags;
Various problems with the header() statement. Check carefully the code before and at the line of this statement.
This error might be hard to troubleshoot in cases where different files are included and all of them have to be carefully expected. An easy workaround is to place a php.ini file containing the following directive:
output_buffering = On
This php.ini file has to be placed in the directory where the error occurs.
IMO, it is much easier to include outside scripts and classes within phpvms then the other way around if phpvms is your base application.
The vatsim generator script has been implemented within phpvms in the past with success, although I have found that there has to be a few modifications to it if your server is running php 5.3.x, unless the script has been updated recently.