⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

Help! Works on Local but not on Server (500 internal error)?



Codefingers
  • profile picture
  • Member

Posted 01 March 2015 - 16:34 PM

Hey guys, 

 

I have this issue where I cannot update/insert etc, I am able to view the tables, press cancel and what not however I get this error when I try to update/add.

 

I have put the code below along with the error I am getting.

 

I am using GoDaddy Hosting server, I do not have a hta access at the moment.

 

I am able to edit and add etc on local host, so I am not entirely sure how to solve this problem or even find the root of the problem. 

 

Any suggestions would be great!

 

 

 

error.png


<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
   session_start(); 

class Reviews extends CI_Controller {
 
    function __construct()
    {
        parent::__construct();
 
        /* Standard Libraries of codeigniter are required */
        $this->load->database();
        $this->load->helper('url');
        /* ------------------ */ 
 
        $this->load->library('grocery_CRUD');
    }
 
 /*---------------Review Stuff-----------------*/
    public function reviews_data()
    {

    $crud = new grocery_CRUD();
 
    $crud->set_theme('datatables');
    $crud->set_table('******_reviews');
 
    $crud->set_field_upload('Image','assets/uploads/files');
 
    $output = $crud->render();
 
    $this->_example_output($output);    		
    }
		
 
    function _example_output($output = null) 
    {
        $this->load->view('our_template.php',$output);    
    }
/*------------------End-------------------------*/


/*-------------Pages Data CMS-------------------*/
	public function pages_data()
	{
	$this->grocery_crud->set_table('pagedata');
	$this->grocery_crud->set_theme('datatables');
    
        $output = $this->grocery_crud->render();
 
        $this->_example_output2($output);
		
	}
	
	 function _example_output2($output = null) 
    {
       $this->load->view('our_template2.php',$output); 
   }
/*---------------End-------------------------*/	
   
    function logout()
 {
   $this->session->unset_userdata('logged_in');
   session_destroy();
   redirect('home', 'refresh');
 }
	
	
}

 
EDIT: if this helps, it seems that GoDaddy is moving a file or something? Image shown below.
 
[URL=http://s824.photobucket.com/user/gambit667/media/error2_1.png.html]error2_1.png[/URL]

 

 


Amit Shah
  • profile picture
  • Member

Posted 02 March 2015 - 12:08 PM

check it on firebug.. check the response generated..

or best .. check in the error log.. that should give you solution on the same.


Codefingers
  • profile picture
  • Member

Posted 12 March 2015 - 13:17 PM

Hey, sorry for the late reply,

 

This is what the response generates in firebug, 

 

500 internal server error, and the same error I posted in the original post

 

So this is an error on Godaddys site? Or maybe a clash of plugins or something?


Amit Shah
  • profile picture
  • Member

Posted 16 March 2015 - 01:41 AM

well.. checkout the htaccess settings for godaddy - it have some different configuration for its deployments


j-gun
  • profile picture
  • Member

Posted 07 April 2015 - 05:39 AM

i bet the htaccess problems dude.


Higor Câmara Vaz da Costa
  • profile picture
  • Member

Posted 02 June 2015 - 19:39 PM

Same here, localhost on Windows/Wamp all work well.

When put on linux only CI works, when try GC examples get 404 Page Not Found


Freddy Sidauruk
  • profile picture
  • Member

Posted 29 August 2015 - 02:55 AM

You didn't load model which acsses database ?


blendedbinah
  • profile picture
  • Member

Posted 11 July 2017 - 13:44 PM

I got same problem and do you have any idea on how to fix it?

Thanks


Amit Shah
  • profile picture
  • Member

Posted 13 July 2017 - 04:51 AM

Well did anyone try to check the output in Firebug Console? 

Well am not sure what is being looked up for here but if it is in context with the image scree shared above, there are a certain warning messages being flashed on with the Ajax call response. That is where the issue is and error comes in. If that is the case, there is a simple solution - turn the environment mode from development to production and it should solve your problem / issues.

If there are any other issues, do share in here.. i will try to get the solutions on the same.