Helo,
I have certain script that is download link for my customers to download pricelist in XML form.
Script it self works, or to be precise... it was working. But problem is that my host upgraded PHP on servers from 5.2.xx to 5.3.xx and now i have problem.
This is the script:
<?php
$langHr = 7;
include(dirname(__FILE__).'/config/config.inc.php');
require_once(dirname(__FILE__).'/init.php');
error_reporting(0);
$p=Product::getProducts(7, 0, 0, 'id_product', 'desc', false);
$products=Product::getProductsProperties(7, $p);
header("Content-Type: text/xml\n\n");
echo'<?xml version="1.0" encoding="utf-8"?>
<Katalog>';
foreach ($products as $row) {
if ($row['active'] == 1){
$img=Product::getCover($row['id_product']);
if ($row['quantity'] >= 5)
{
$row['quantity'] = "5";
}
echo'
<proizvodi>
<slika>http://www.myshop/'.$shopUrl.'img/p/'.$row['id_product'].'-'.$img['id_image'].'.jpg</slika>
<sifra>'.str_replace("&", "&", $row['id_product']).'</sifra>
<naziv>'.str_replace("&", "&", $row['name']).'</naziv>
<opis>'.str_replace("&", "and", strip_tags($row['description_short'])).'</opis>
<cijena>'.($row['price']*1).'</cijena>
<kolicina>'.str_replace("&", "&", $row['quantity']).'</kolicina>
<kategorija>'.str_replace("&", "&", $row['category']).'</kategorija>
<link>'.$row['link'].'</link>
</proizvodi>';
}
}
echo'</Katalog>';
?>
So there i have 8 requests... ID, name, description, price, quantity, category, link and image.
Problem is that script now works only if i remove one request... wichever, it doesnt mather... as long as theres only 7 or less of them?
Can anybody tell me what causes this? ...what to change on server to make it work, or how to adjust the script to work properly again?
Thank you!