Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Call to Undefined Function phpob_start()

Tags:

php

undefined

I am working in codeigniter and i receive a strange error suddenly. The following file was working perfectly but suddenly it has stopped executing the php code. When i went to check the error log this is the error it has.

[09-Jun-2014 14:36:58 America/Denver] PHP Fatal error: Call to undefined function phpob_start() in /*/views/mobile_views/templates/header.php on line 1

Looks like somehow it is combining the first two lines. when I tried to remove the ob_start() statement it started giving error for the next line.

Any ideas what happened suddenly? I have copied and pasted the whole file code as follows.

Thanks.

<?php
ob_start();
$user_name = $this->session->userdata('interactin_username');

$name = '';
if (isset($user_name) && $user_name != '') {
    $name = $user_name;
} else {
    $name = 'Guest';
}

$header_link = "frontend_individual";
if ($this->session->userdata('interactin_user_type') == "3") {
    $header_link = "frontend_business";
}
?>

<!DOCTYPE html>

<html lang="en">

    <head>

        <meta charset="utf-8">

        <title><?php echo $title; ?></title>

        <meta name="viewport" content="width=device-width, initial-scale=1.0">

        <meta name="description" content="<?php if(isset($first_para)&&$first_para!=""){ echo $first_para; } ?>" />

        <meta name="author" content="">



        <!--        <link href='http://fonts.googleapis.com/css?family=Oswald:400,700&subset=latin,latin-ext' rel='stylesheet' type='text/css'>-->

        <!--        <link href='<?php echo base_url(); ?>assets/fonts/googlefonts.css' rel='stylesheet' type='text/css'>-->

        <!--        <link href="<?php echo base_url(); ?>assets/css/style-new.css" rel="stylesheet" />-->

        <link href="<?php echo base_url(); ?>assets/mobile_css/style.css" rel="stylesheet">

        <!--<link href="<?php echo base_url(); ?>assets/css/main.css" rel="stylesheet">-->

        <link href="<?php echo base_url(); ?>assets/mobile_css/business.css" rel="stylesheet" type="text/css" />

        <link href="<?php echo base_url(); ?>assets/mobile_css/user.css" rel="stylesheet" media="all" />



        <!-- Le styles -->

        <link href="<?php echo base_url() ?>assets/mobile_css/bootstrap.css" rel="stylesheet">

        <link href="<?php echo base_url() ?>assets/mobile_css/bootstrap-responsive.css" rel="stylesheet">











        <link rel="stylesheet" href="<?php echo base_url(); ?>assets/mobile_css/jquery-ui.css" />



        <link rel="stylesheet" href="<?php echo base_url(); ?>assets/mobile_css/jquery.mCustomScrollbar.css" />



        <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->

        <!--[if lt IE 9]>

          <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>

        <![endif]-->



        <!-- Le fav and touch icons -->

        <link rel="shortcut icon" href="<?php echo base_url() ?>assets/ico/favicon.ico">

        <link rel="apple-touch-icon-precomposed" sizes="144x144" href="<?php echo base_url() ?>assets/ico/apple-touch-icon-144-precomposed.png">

        <link rel="apple-touch-icon-precomposed" sizes="114x114" href="<?php echo base_url() ?>assets/ico/apple-touch-icon-114-precomposed.png">

        <link rel="apple-touch-icon-precomposed" sizes="72x72" href="<?php echo base_url() ?>assets/ico/apple-touch-icon-72-precomposed.png">

        <link rel="apple-touch-icon-precomposed" href="<?php echo base_url() ?>assets/ico/apple-touch-icon-57-precomposed.png">







        <!-- jQuery -->

<!--        <script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>-->

<!--        <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>-->

<!--        <script src="<?php echo base_url() ?>assets/js/jquery_1.8.2.js"></script>-->

        <script src="<?php echo base_url() ?>assets/js/jquery.js"></script>

        <script src="<?php echo base_url() ?>assets/js/jquery-ui.js"></script>

        <script src="<?php echo base_url() ?>assets/js/site.js"></script>

        <script src="<?php echo base_url() ?>assets/js/ajaxfileupload.js"></script>

<!--        <script src="http://js.nicedit.com/nicEdit-latest.js" type="text/javascript"></script>

<script type="text/javascript">bkLib.onDomLoaded(nicEditors.allTextAreas);</script>-->





        <script src="<?php echo base_url() ?>assets/js/modernizr.js"></script>



        <script src="<?php echo base_url() ?>assets/js/ddaccordion.js"></script>



        <!-- FlexSlider -->

        <link rel="stylesheet" href="<?php echo base_url() ?>assets/mobile_css/flexslider.css" type="text/css" media="screen" />

        <script defer src="<?php echo base_url() ?>assets/js/jquery.flexslider.js"></script>

        <script defer src="<?php echo base_url() ?>assets/js/edit_resume.js"></script>

        <script defer src="<?php echo base_url() ?>assets/js/edit_resume_zulqurnan.js"></script>

        <script defer src="<?php echo base_url() ?>assets/js/interest_list_filteration.js"></script>

        <script defer src="<?php echo base_url() ?>assets/js/add_event.js"></script>

        <script defer src="<?php echo base_url() ?>assets/js/applications_list_filteration.js"></script>

        <script defer src="<?php echo base_url() ?>assets/js/front_end_jobs_filtered.js"></script>

        <script defer src="<?php echo base_url() ?>assets/js/product.js"></script>

        <script defer src="<?php echo base_url() ?>assets/js/search_individual.js"></script>

        <script defer src="<?php echo base_url() ?>assets/js/search_company.js"></script>

        <script defer src="<?php echo base_url() ?>assets/js/comments.js"></script>

        <script defer src="<?php echo base_url() ?>assets/js/placeholders.min.js"></script>



        <script type="text/javascript">

            /*$(function(){

                SyntaxHighlighter.all();

            });*/

            $(window).load(function(){

                $('.flexslider').flexslider({

                    animation: "slide",

                    start: function(slider){

                        $('body').removeClass('loading');

                    }

                });

            });

        </script>

        <script type="text/javascript">

            ddaccordion.init({

                headerclass: "submenuheader", //Shared CSS class name of headers group

                contentclass: "submenu", //Shared CSS class name of contents group

                revealtype: "click", //Reveal content when user clicks or onmouseover the header? Valid value: "click", "clickgo", or "mouseover"

                mouseoverdelay: 200, //if revealtype="mouseover", set delay in milliseconds before header expands onMouseover

                collapseprev: true, //Collapse previous content (so only one open at any time)? true/false 

                defaultexpanded: [], //index of content(s) open by default [index1, index2, etc] [] denotes no content

                onemustopen: false, //Specify whether at least one header should be open always (so never all headers closed)

                animatedefault: false, //Should contents open by default be animated into view?

                persiststate: true, //persist state of opened contents within browser session?

                toggleclass: ["unselected", "selected"], //Two CSS classes to be applied to the header when it's collapsed and expanded, respectively ["class1", "class2"]

                togglehtml: ["suffix", "<span class='statusicon' />", "<span class='statusicon' />"], //Additional HTML added to the header when it's collapsed and expanded, respectively  ["position", "html1", "html2"] (see docs)

                animatespeed: "fast", //speed of animation: integer in milliseconds (ie: 200), or keywords "fast", "normal", or "slow"

                oninit:function(headers, expandedindices){ //custom code to run when headers have initalized

                    //do nothing

                },

                onopenclose:function(header, index, state, isuseractivated){ //custom code to run whenever a header is opened or closed

                    //do nothing

                }

            })



            $(document).ready(function() {



                if($('.submenuheader').hasClass("unselected")) {

                    $('.unselected').parent().removeClass('open');

                }

                else {



                    $('.selected').parent().addClass('open');

                }



                $(".submenuheader").click(function(){

                    if($('.submenuheader').hasClass("unselected")) {

                        $('.unselected').parent().removeClass('open');

                    }

                    else {



                        $('.selected').parent().addClass('open');

                    }

                });





            });





        </script>

        <script src="<?php echo base_url() ?>assets/js/date_time.js"></script>

        <style>

            .cmenu {margin: 0; padding: 0.3em; list-style-type: none;

                    background-color: white;}

            .cmenu li:hover {}

            .cmenu hr {border: 0; border-bottom: 1px solid grey;

                       margin: 3px 0px 3px 0px; width: 10em;}

            .cmenu a {border: 0 !important;}

            .cmenu a:hover {text-decoration: underline !important;}

            .cmenu .topSep {font-size: 90%; border-top: 1px solid gray;

                            margin-top: 0.3em; padding-top: 0.3em;}

            </style>



            <!-- JCrop, FancyBox and Uploadify scripts           -->

            <link href="<?php echo base_url() ?>assets/uploadify/uploadify.css" rel="stylesheet" type="text/css">

            <link href="<?php echo base_url() ?>assets/jcrop/css/jquery.Jcrop.css" rel="stylesheet" type="text/css">

            <link href="<?php echo base_url() ?>assets/fancybox/jquery.fancybox-1.3.1.css" rel="stylesheet" type="text/css">

            <?php

            if ($this->uri->segment(2) == 'pricingsss') {

                ?>

                <script type="text/javascript" src="<?php echo base_url() . "assets/pricing_assets/js/jquery.js" ?>"></script>



                <script type="text/javascript" src="<?php echo base_url() . "assets/pricing_assets/js/scripts.js" ?>"></script>

                <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">

                <link href='http://fonts.googleapis.com/css?family=Signika:600,400,300' rel='stylesheet' type='text/css'>

                <link href="<?php echo base_url() . "assets/pricing_assets/style.css" ?>" rel="stylesheet" type="text/css" media="screen">

                <link href="<?php echo base_url() . "assets/pricing_assets/style-headers.css" ?>" rel="stylesheet" type="text/css" media="screen">

                <!--[if lt IE 9]>

                        <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>

                        <link href="style-ie.css" rel="stylesheet" type="text/css" media="screen">

                <![endif]-->



                <?php

            }

            ?>



<!--            <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>-->

            <script type="text/javascript" src="<?php echo base_url() ?>assets/uploadify/swfobject.js"></script>

            <script type="text/javascript" src="<?php echo base_url() ?>assets/jcrop/js/jquery.Jcrop.min.js"/></script>

        <script type="text/javascript" src="<?php echo base_url() ?>assets/fancybox/jquery.fancybox-1.3.1.js"/></script>

    <script type="text/javascript" src="<?php echo base_url() ?>assets/uploadify/jquery.uploadify.v2.1.4.min.js"/></script>

<script src="<?php echo base_url() . 'assets/js/jquery.lightbox_me.js' ?>" type="text/javascript" charset="utf-8"></script>





<!-- Latest FancyBox scripts-->

<!-- Add mousewheel plugin (this is optional) -->

<!--                <script type="text/javascript" src="<?php echo base_url() ?>assets/fancybox-latest/lib/jquery.mousewheel-3.0.6.pack.js"></script>-->

<!-- Add fancyBox -->

<!--                <link rel="stylesheet" href="<?php echo base_url() ?>assets/fancybox-latest/source/jquery.fancybox.css?v=2.1.3" type="text/css" media="screen" />-->

<!--                <script type="text/javascript" src="<?php echo base_url() ?>assets/fancybox-latest/source/jquery.fancybox.pack.js?v=2.1.3"></script>-->

<!-- Optionally add helpers - button, thumbnail and/or media -->

<!--                <link rel="stylesheet" href="<?php echo base_url() ?>assets/fancybox-latest/source/helpers/jquery.fancybox-buttons.css?v=1.0.5" type="text/css" media="screen" />-->

<!--                <script type="text/javascript" src="<?php echo base_url() ?>assets/fancybox-latest/source/helpers/jquery.fancybox-buttons.js?v=1.0.5"></script>-->

<!--                <script type="text/javascript" src="<?php echo base_url() ?>assets/fancybox-latest/source/helpers/jquery.fancybox-media.js?v=1.0.5"></script>-->

<!--                <link rel="stylesheet" href="<?php echo base_url() ?>assets/fancybox-latest/source/helpers/jquery.fancybox-thumbs.css?v=1.0.7" type="text/css" media="screen" />-->

<!--                <script type="text/javascript" src="<?php echo base_url() ?>assets/fancybox-latest/source/helpers/jquery.fancybox-thumbs.js?v=1.0.7"></script>-->



<!-- Custom ScrollBar Plugin -->

<script defer src="<?php echo base_url() ?>assets/js/jquery.mousewheel.min.js"></script>

<script defer src="<?php echo base_url() ?>assets/js/jquery.mCustomScrollbar.concat.min.js"></script>



<style type="text/css">

#sign_up

{

    display:none;

}

</style>



</head>



<body>

<div id="fb-root"></div>

<script>(function(d, s, id) {

var js, fjs = d.getElementsByTagName(s)[0];

if (d.getElementById(id)) return;

js = d.createElement(s); js.id = id;

js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=711713635546066"; // appId must be valid

fjs.parentNode.insertBefore(js, fjs);

}(document, 'script', 'facebook-jssdk'));</script>

<div  class="main">

    <div id="pageslide">



    </div>

    <div class="navbar navbar-fixed-top">

        <div class="navbar-inner">

            <div class="container">



                <a class="brand" href="<?php echo base_url() ?>">

                    <img src="<?php echo base_url() ?>assets/img/CompanyLogo.png" alt="logo"/>

                </a>





                <div class="btn-login">

                    <div class="btn-group">



                        <a target="_blank" href="<?php echo base_url() . $this->session->userdata('interactin_username'); ?>" class="btn btn-primary">

                            <?php if (isset($user_name) && $user_name != '') { ?>

                                <i><img style="width: 14px;height: 14px;line-height: 14px;vertical-align: text-top;background-position: -168px 0px;background-repeat: no-repeat;margin: 0px;padding: 0px;" src="<?php echo base_url() ?>assets/uploads/<?php echo $this->session->userdata('interactin_username') ?>/profile_image/<?php echo $this->session->userdata('interactin_profile_image_thumb') ?>" /></i>

                                View Your Profile

                            <?php } else { ?>

                            Welcome <?php echo $name; ?>   

                            <?php } ?>

                             </a>







                    </div>

                </div>



                <a class="btn btn-navbar" data-toggle="collapse" data-target="#navcollapse">

                    <span class="icon-bar"></span>

                    <span class="icon-bar"></span>

                    <span class="icon-bar"></span>

                </a>

                <a class="sidebar-icon left btn-navbar" href="#nav" style="margin-top:5px;"><span class="icon-white icon-cog" ></span></a>

                <div class="nav-collapse" id="navcollapse">

                    <ul class="nav">

<!--                        <li class="active"><a href="<?php echo base_url() ?>">Home</a></li>-->

                        <li><a href="<?php echo base_url() . 'jobs'; ?>">Job Search</a></li>

                        <!--                            <li><a href="#">About</a></li>-->

                        <!--                            <li><a href="#">Why us?</a></li>-->



<!--                        <li><a href="<?php echo base_url() ?>pages/jobs">Jobs</a></li>-->

<!--                        <li><a href="<?php echo base_url() ?>pages/events">Events</a></li>-->

                        <?php

                        if ($this->session->userdata('interactin_username') != '') {

                            ?>

<!--                        <li><a href="<?php echo base_url() ?>pricing">Pricing</a></li>-->



                            <li><a href="<?php echo base_url() . $header_link; ?>/dashboard">My Dashboard</a></li>

                            <li><a href="<?php echo base_url(); ?>pages/logout">Logout</a></li>



                            <?php

                        } else {

                            ?>

                            <li><a href="<?php echo base_url(); ?>login">Login</a></li>

                            <li><a href="<?php echo base_url() . 'register'; ?>">Signup</a></li>

<!--                            <li><a href="<?php echo base_url() . 'search/search_load'; ?>">Job Search</a></li>-->

                            <?php

                        }

                        ?>

<!--                        <li><a href="<?php echo base_url() ?>pages/contact_interactin">Contact us</a></li>-->

                    </ul>

                    <input type="hidden" name="base_url" id="base_url" value="<?php echo base_url(); ?>" />

                    <input type="hidden" name="path_info" id="path_info" value="<?php

                        $url = "http://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];

                        echo $url;

                        ?>" />

                           <?php //echo $_SERVER['REQUEST_URI'];  ?>

                           <?php //echo base_url(); echo "     "; $url="http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];echo $url;  ?>

                </div><!--/.nav-collapse -->



            </div>

        </div>

    </div>
like image 763
Omicans Avatar asked Nov 11 '22 06:11

Omicans


1 Answers

Try deleting the line with <?php entirely (to ensure any special characters are gone), then add it back with an extra line break before ob_start(); so that you have:

<?php

ob_start();
$user_name = $this->session->userdata('interactin_username');

$name = '';
like image 110
groovenectar Avatar answered Nov 15 '22 11:11

groovenectar