Welcome Guest, Not a member yet? Register   Sign In
[SOLVED] Big help needed - Deploying an application
#1

[eluser]richzilla[/eluser]
Hi all, im having trouble trying to deploy an application onto our webserver. It works absolutely fine on the testing server, but is doing some very odd things on the production one. My problems quite hard to explain but ill give it a shot anyway, even if someone can point me in the right direction to debug it, id be hugely greatful. I have a controller named issues:

Code:
class Issues extends Controller{
        
        function __construct()
        {
            parent::Controller();
            if((!$this->session->userdata('logged_in')) || (!$this->user_model->is_admin($this->session->userdata('userid')) == 1))
            {
                redirect('start');
            }
        }
        
        function index($flag = 1)
        {
            $data['issues'] = $this->issue_model->get_all_issues($flag);
            $data['status_list'] = $this->status_model->get_status_array();
            $data['priority'] = $this->priority_model->get_priorities_array();
            $data['users'] = $this->user_model->get_users_array();
            if($flag == 1)
            {
                $data['showing'] = 'Open';
            }
            else
            {
                $data['showing'] = 'All';
            }
            $this->load->view('global/header');
            $this->load->view('admin/issues',$data);
            $this->load->view('global/footer');
        }
        
        function view()
        {
                        echo '<h2>View has been called</h2>';
            /*$issue_id = $this->uri->segment(4);
            
            $data['users'] = $this->user_model->get_users_array_admin();
            $data['issue'] = $this->issue_model->get_issue($issue_id);
            $data['comments'] = $this->comment_model->get_comments_for_issue($issue_id);
            $data['assignment'] = $this->assignment_model->is_assigned($issue_id);
            $data['status_list'] = $this->status_model->get_status_array();
            
            $this->load->view('global/header');
            $this->load->view('admin/view_issue',$data);
            $this->load->view('global/footer');*/
        }

and a bit further down issues:

Code:
function raise()
        {
            
            $data['status_list'] = $this->status_model->get_status_array();
            $data['priority'] = $this->priority_model->get_priorities_array();
            $data['users'] = $this->user_model->get_users_array();
            $this->load->view('global/header');
            $this->load->view('admin/raise',$data);
            $this->load->view('global/footer');
        }

when ever the raise() function is called, for some reason its calling the view function 3 times (its echoing the line 'view has been called' i cant work out why at all, as far as i can see, there is no reason to be called. The only difference between the two servers is that the testing server is php5 and the production php4. if thats any help?

Once again any help would be hugely appreciated, as i have a deadline to meet today.

Thanks
#2

[eluser]richzilla[/eluser]
Oh yea, i can include the whole of the issues controller if you need, its just that its 300 lines.
#3

[eluser]rogierb[/eluser]
'view' is a reserved word when using php4. (see user guide)
My guess is that by using the method view, you extend the original view method.

So rename your method to something else or upgrade the live server to php5 (recommended:-))
#4

[eluser]richzilla[/eluser]
Now it all makes sense, just didnt think that it might be reserved, thanks a lot. Believe me i am desperate to use php5, but the client is on shared hosting and doesnt want to move Sad




Theme © iAndrew 2016 - Forum software by © MyBB