CodeIgniter Forums

Full Version: Edit Page Issue
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8

El Forum

[eluser]jzmwebdevelopement[/eluser]
in my browser I am getting:

HTTP Error 500 (Internal Server Error): An unexpected condition was encountered while the server was attempting to fulfill the request.

I have to go into the apache php log to get [code] Call to a member function getCMSPage() on a non-object in/code]

El Forum

[eluser]toopay[/eluser]
show your .htaccess

El Forum

[eluser]jzmwebdevelopement[/eluser]
Code:
# Customized error messages.
ErrorDocument 404 /index.php

# Set the default handler.
DirectoryIndex index.php

# Various rewrite rules.
<IfModule mod_rewrite.c>
  RewriteEngine on
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond $1 !^(index\.php|css|js|images|files|scripts|robots\.txt)
  RewriteRule ^(.*)$ index.php/$1 [L,QSA]
</IfModule>

El Forum

[eluser]toopay[/eluser]
try modify into
Code:
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) index.php?/$1

El Forum

[eluser]jzmwebdevelopement[/eluser]
Hey,

I have done this but I am still getting the error.

J

El Forum

[eluser]toopay[/eluser]
You dont said anything about 500 Internal server error in the first place. Thats error means something wrong, either in php.ini or access permission (ussually related with .htaccess).

Is it generates 500 error only in controller which load the model or in every page? Are your server meet with CI Server requirement criteria (both PHP version and MySQL version)?

El Forum

[eluser]jzmwebdevelopement[/eluser]
I am working on a MAMP local sever and when I get a 500 error most of the time it means its a php error, hence getting the fatal from the php_error.log

El Forum

[eluser]toopay[/eluser]
1. Is it generates 500 error only in controller which load the model or in every page?
2. Are your server meet with CI Server requirement criteria (both PHP version and MySQL version)?

El Forum

[eluser]jzmwebdevelopement[/eluser]
Only this one page,

My other pages have the same line and work fine but it is fed via $data['cms_pages'] to load the "pages" that I am trying to edit into a sub drop down menu.

I am running PHP 5.2.1.3 and SQL 5.1.44

El Forum

[eluser]toopay[/eluser]
What happens if you do this
Code:
public function index(){
        $CI =& get_instance();
        $CI->load->model('navigation_model');
        var_dump($this->navigation_model->getCMSPages());
        exit;
        /* Temporary disable this block
        if($this->session->userdata('logged_in')) redirect('admin/dashboard');
        // set data
        $this->load->model('navigation_model');
        $data['title'] = 'Login';
        $data['sales_pages'] = NULL;
        $data['get_images'] = NULL;
        $data['cms_pages'] = $this->navigation_model->getCMSPages();

        // load partial view - EAMPLE
        // view path,  data to pass in ( NULL, array or object ), TRUE returns as a varialble, else echo's.
        $data['content'] = $this->load->view('admin/admin_login', NULL, TRUE);
        // THEN load view.
        $this->load->view('template', $data);
        */
    }
Pages: 1 2 3 4 5 6 7 8