Page Error

4 posts by 2 authors in: Forums > CMS Builder
Last Post: November 2, 2010   (RSS)

Re: [kcmedia] Page Error

By Jason - November 1, 2010

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/

Re: [Jason] Page Error

By KCMedia - November 1, 2010

Hi Jason

still no good still not working.
Thanks



Craig

KC Media Solutions

www.kcmedia.biz

Re: [kcmedia] Page Error

By Jason - November 2, 2010

Hi,

Please fill out a 2nd Level Support Request here:
https://www.interactivetools.com/support/email_support_form.php

and we can take a closer look at what is going on.

Thanks
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/