• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CI3 form validation error on 1and1

#1
Hello,

I use CI3 with HMVC module from https://bitbucket.org/wiredesignz/codeig...sions-hmvc

All things works fine on localhost with Wamp 2.5 and php5.5

But this morning, I transfer my website on shared hosting on 1and1, and I have this message when I want use Controler in a module who use form_validation


Code:
A PHP Error was encountered

Severity: Error
Message: Cannot access protected property CI_Form_validation::$CI
Filename: controllers/Prospects.php
Line Number: 11
Backtrace:

I made all modifications, add library : My_Form_validation.php


Code:
class MY_Form_validation extends CI_Form_validation

{
    public $CI;
}

And add in the module controler :


Code:
class Myclass extends MX_Controller {

    
     function __construct()
    {
        parent::__construct();

        $this->load->library('form_validation'); // THIS IS THE LINE 11
        $this->form_validation->CI =& $this;
    }

It does't work on 1and1.

I don't understand why, could you help me?

Thank's

Patrice
Reply

#2
It's not that it doesn't work on 1and1. It only works on Windows and some OSX configurations, because that's when you have case-insensitive filenames.

The file must be named 'MY_Form_validation.php', not 'My_Form_validation.php'.
Reply

#3
Ok, thank's for the answer, you are right, for the case, I made mistake !

But I renamed the file as 'MY_Form_validation.php'.

I verified all the case, but I get the same error.

Code:
A PHP Error was encountered

Severity: Error

Message: Cannot access protected property MY_Form_validation::$CI

Filename: controllers/Prospects.php

Line Number: 11

Backtrace:
Reply

#4
Hello,

After further testing, I realized that it was the file that was corrupted MY_Form_validation although readable.

After I recreated another file with the same code (first post), no problem!

Thanks for your help
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.