Welcome Guest, Not a member yet? Register   Sign In
A page displays ok on local server, and blank on live server - Please help


I have a web site where a page I am calling displays ok on my local server but on the live server I get a blank page.
View page source shows me the digit 1 on top and that's it.

Please, can someone help?

The url:

The routes file:
$route['orderonline/([a-z]+)'] = 'order/orderonline/$1';
$route['orderonline'] = 'order/orderonline';

The function I am calling on the controller:
function viewUserOrders()
   $userId = $this->session->userdata('user_id');
   $data['orders'] = $this->orderonline_model->getUserOrders($userId);
   $data['title'] = 'My Orders';
   $data['view'] = 'order/userorders';
   $this->load->view('index_view', $data);

The view file:
&lt;!--<h1 class="pageTitle">My Orders</h1>--&gt;
   <table cellpadding="0" cellspacing="0" border="0" class="cart_table">
         <th>Order No</th>
          <th>Order Date</th>
          <th>Invoice No</th>
          <th>Tracking No</th>
   foreach($orders as $key):
    $orderId = $key['orderId'];
    $date = $key['date'];
    $invoiceNo = $key['invoice'];
    $paid = $key['paid'];
    if($paid == 1) $paid = 'Paid'; else $paid = 'Awaiting Payment';
    $trackingNo = $key['tracking'];
    echo "
         <td colspan=\"6\">
          <table class=\"cart_table innerTable\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" 650px;\">
               <tr class=\"cart_item\" id=\"cartItem$orderId\" pointer;\">
             <td 60px;\"><div class=\"dArrow\"></div>$orderId</td>\n
             <td 90px;\">$date</td>\n
             <td 90px;\">$invoiceNo</td>\n
             <td 150px;\">$paid</td>\n
             <td 100px;\"><a >$trackingNo</a></td>\n
        if($paid == 'Awaiting Payment'): ?&gt;
                <a href="&lt;?php echo base_url(); ?&gt;order/orderonline/cancelOrder" class="cancel" id="&lt;?php echo $orderId; ?&gt;">Cancel Order</a>
                &lt;?php else: ?&gt;
        echo "</td>\n
       <tr class=\"cart_spacer\"><td colspan=\"6\"></td></tr>
           <tbody none;\">
           <tr class=\"subHeader\">\n
            <td colspan=\"2\">Product</td>\n
           foreach($key['dets'] as $k):
            $product = $k['product'];
            $weight = $k['weight'];
            $grind = $k['grind'];
            $roast = $k['roast'];
            $qty = $k['qty'];
            <tr class=\"tblContent\">\n
             <td colspan=\"2\">$product</td>\n

       echo "  
   echo '</table>';
   echo "You have no orders.";
<div id="dialog" title="Confirm Order Cancel">
  Are you sure you want to cancel this order?

      modal: true,
      width: 400,
      height: 150,
      autoOpen: false

$(".cancel").click(function(e) {
  var theHREF = $(this).attr("href");
var orderId = $(this).attr('id');

  $("#dialog").dialog('option', 'buttons', {
   "Confirm" : function() {
      type: 'POST',
      url: '&lt;?php echo base_url(); ?&gt;order/orderonline/cancelOrder',
      data: {orderId: orderId},
      success: function(data) { console.log(data);
      $('#cartItem' + orderId).css({'text-decoration':'line-through',"color":"red"});
      $('#cartItem' + orderId).children().css('color', 'grey');
    "Cancel" : function() { $(this).dialog("close"); }



var a = $("table.innerTable:first").find("tr:first");
a.parents('table.innerTable') .children('tbody') .toggle();

$('table.innerTable tr') .click(
function() {
  $(this) .parents('table.innerTable') .children('tbody') .toggle();

Did you have using gzip? try disable it.

I'm sorry, what do you mean? Using gzip where?

In application/config/config.php, $config['compress_output'] set to FALSE

Yes, it is set to FALSE

sometimes this happens when some "fatal error" occurs ( library/class/function missing, syntax problem, file not completely uploaded, etc ) and doesn't show errors. Add this code to index.php to debug.

error_reporting( E_ALL ^ E_NOTICE ) ; //


Thank you vitoco !!!!

That helped !!!

If anybody wants to know, I have added a function to the date_helper file and the model could not find it.

So I've created my own helper and that solved everything.


Theme © iAndrew 2016 - Forum software by © MyBB