Hi Craig,
What is happening here is that the first line of your .xml.php file is sending header information and then outputting to the screen:
<?php header('Content-type: text/xml'); ?>
<?php echo '<?xml version="1.0" encoding="UTF-8"?>'; ?>
After that, you're adding viewer_functions.php which will attempt to start a new session. This cannot be done because header information has already been sent.
Try rearranging the code on your .xml.php page like this:
<?php
// load viewer library
$libraryPath = 'cmsAdmin/lib/viewer_functions.php';
$dirsToCheck = array('/home/afft/domains/afft.com.au/public_html/','','../','../../','../../../');
foreach ($dirsToCheck as $dir) { if (@include_once("$dir$libraryPath")) { break; }}
if (!function_exists('getRecords')) { die("Couldn't load viewer library, check filepath in sourcecode."); }
// load records
list($home_page_imagesRecords, $home_page_imagesMetaData) = getRecords(array(
'tableName' => 'home_page_images',
));
?>
<?php header('Content-type: text/xml'); ?>
<?php echo '<?xml version="1.0" encoding="UTF-8"?>'; ?>
Also make sure that there are no empty lines or spaces between the top of the page at the first <?php tag.
Hope this helps.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/