ErrorException [ Fatal Error ]: Method View::__toString() must not throw an exception, caught Error: Call to undefined function mysql_connect()

APPPATH/views/page/home.php [ 0 ]

1 <?php defined('SYSPATH') or die('No direct script access.'); ?>
<?php if ($_GET['vsn']) : ?>

    <?= View::factory('include/vehicle')->bind('stock', $_GET['vsn']); ?>

<?php else : ?>
    <?php $types = array('new', 'New', 'NEW', 'used', 'Used', 'USED'); ?>
    <?php $type = (in_array($_GET['type'], $types)) ? $_GET['type'] : false; ?>
    <?php $make = ($_GET['make']) ? str_replace("_", " ", $_GET['make']) : false; ?>
    <?php $inv = ($type) ? DB::select()->from('trailers')->where('type', '=', $type)->where('sold', '=', 0) : DB::select()->from('trailers')->where('type', 'IN', array('new', 'used'))->where('sold', '=', 0); ?>
    <?php $inv = ($make) ? $inv->where('make', '=', $make) : $inv; ?>
    <?php $inventory = $inv->limit(30)->execute()->as_array(); ?>
    <?php $c = ($type) ? DB::select(array(DB::expr('COUNT("stock")'), 'count_all'))->from('trailers')->where('type', '=', $type) : DB::select(array(DB::expr('COUNT("stock")'), 'count_all'))->from('trailers')->where('type', 'IN', array('new', 'used')); ?>
    <?php $c = ($make) ? $c->where('make', '=', $make) : $c; ?>
    <?php $count = $c->execute()->get("count_all"); ?>
    <?php $currpage = 1; ?>
    <?php $makes = ($type) ? ORM::factory('inventory')->where('type', '=', $type)->order_by('make')->where('sold', '=', 0)->group_by('make')->find_all() : ORM::factory('inventory')->where('type', 'IN', array('new', 'used'))->where('sold', '=', 0)->order_by('make')->group_by('make')->find_all(); ?>
    <?php if ($make) : ?>
        <?php $models = ($type) ? ORM::factory('inventory')->where('make', '=', $make)->where('type', '=', $type)->order_by('model')->group_by('model')->find_all() : ORM::factory('inventory')->where('make', '=', $make)->where('type', 'IN', array('new', 'used'))->order_by('model')->group_by('model')->find_all(); ?>
        <?php $filtertype = 'model'; ?>
        <?php $vals = array(); ?>
        <?php foreach ($models as $m) : ?>
            <?php $vals[$m->model] = 1; ?>
        <?php endforeach; ?>
        <?php $modopts = View::factory('include/filteropts')->bind('vals', $vals)->bind('type', $filtertype); ?>
    <?php endif; ?>
    <div class="row-fluid">

        <!-- CONTROLS -->

        <div class="span3">

            <div class="sidebar-nav">

                <form name="filterinv" method="post" action="/process/inv/filter">

                    <input type="hidden" name="page" value="1" />

                    <input type="hidden" name="current" value="type" />

                    <h1 class="filter-head"><strong>Filter Inventory</strong></h1>         

                    <div id="load-type" class="filters">                       

                        <div class="filter-inner">

                            <h2 class="opt-head"><strong>Type</strong></h2>

                            <div style="width: 50%; float: left">

                                <input class="load-filter" name="type[]" type="checkbox" <?= (!$type || $type == 'new') ? "CHECKED" : ""; ?> value="new" /> New

                            </div>

                            <div style="width: 50%; float: left">

                                <input class="load-filter" name="type[]" type="checkbox" <?= (!$type || $type == 'used') ? "CHECKED" : ""; ?> value="used" /> Used

                            </div>

                            <div class="clearfix"></div>

                        </div>

                    </div>

                    <div id="load-make" class="filters">                       

                        <div class="filter-inner">

                            <h2 class="opt-head">

                                <strong>Make</strong>

                                <i class="icon icon-minus pull-right min" data-toggle="make-opts"></i>

                            </h2>

                            <div id="make-opts">
                                <?php foreach ($makes as $m) : ?>                                 
                                    <div style="width: 50%; float: left">
                                        <input class="load-filter" name="make[]" type="checkbox" <?= ($make && strcasecmp($make, trim($m->make)) == 0) ? "CHECKED" : ""; ?> value="<?= $m->make ?>" /> <?= $m->make ?>
                                    </div>
                                <?php endforeach; ?>

                                <div class="clearfix"></div>

                            </div>

                        </div>

                    </div>

                    <div id="load-model" class="filters">
                        <?= ($modopts) ? $modopts : ''; ?>
                    </div>

                    <!--<div id="load-exteriorcolor" class="filters"></div>

                    <div id="load-interiorcolor" class="filters"></div>

                    <div id="load-body" class="filters"></div>

                    <div id="load-transmission" class="filters"></div>-->

                    <div id="load-year" class="filters"></div>  

                </form>

                <div style="padding: 0px 10px 40px 10px;">

                    <button class="btn btn-warning btn-block" id="run-filter">

                        <strong>Filter Inventory</strong>

                    </button>

                </div>

            </div>

        </div>



        <!-- INVENTORY -->

        <div class="span9" id="inv-list">

            <?php echo View::factory('include/inventory')->bind('inventory', $inventory)->bind('count', $count)->bind('currpage', $currpage); ?>

        </div>

        <!-- END INVENTORY -->



    </div>



<?php endif; ?>
  1. {PHP internal call} » Kohana_Core::shutdown_handler()

Environment