Page Error

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

By KCMedia - October 30, 2010

Hi

I have been using this flash app for a long time now with CMS builder and a config.xml.php file and it has been working but now since this new site is using the most current version i am having issues using it and i dont know why.

When i try and load the [/url]http://www.afft.com.au/newsite/CU3ER-config.xml.php[url] it give me an error all the time and the flash app just wont load because of this.

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/afft/domains/afft.com.au/public_html/newsite/CU3ER-config.xml.php:1) in /home/afft/domains/afft.com.au/public_html/cmsAdmin/lib/init.php on line 325 0 images fonts 0xffffff 1 true true true false /cmsAdmin/uploads/img6.jpg /cmsAdmin/uploads/img5.jpg /cmsAdmin/uploads/img4.jpg /cmsAdmin/uploads/img3.jpg /cmsAdmin/uploads/img2.jpg /cmsAdmin/uploads/img1.jpg

I have used this on about 5 sites now and each time no issues just now.

i have attached the xml.php file and the index.php page also.

thanks

Craig
Thanks



Craig

KC Media Solutions

www.kcmedia.biz

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