Welcome Guest, Not a member yet? Register   Sign In
difference between localhost and real server
#1

[eluser]Maks Baum[/eluser]
The problem is: When I copy all project to production server I can't inherit from MyController class, It even seems not to load file with this class... however during develop on localhost everytnig works just fine :/
I use in this project newewst version of CI, during previosus projects I used oldest version sth. like 1.5.4 and there was no difference between localhost and real server.
Any ideas? Wink (I tried to change file name with MyController class - smallcaps, delete '_') I use php 4:/
#2

[eluser]ejangi[/eluser]
Are you running the same version of PHP on your localhost and live?

I'm guessing that you have a "my_controller.php" file in the libraries folder and you have this in your config.php file:
Code:
// This is the default setting:
$config['subclass_prefix'] = 'MY_';

in which case your class should be:
Code:
class MY_Controller extends Controller {
    // ...
}

What are the exact errors you are getting? Can you post the error itself and the code on the line that it is having an exception on?
#3

[eluser]LightAlloy[/eluser]
I have the same problem..
It works on a local host (Windows), but when i move it to virtual hosting class can't inherit from MY_controller
it gets error: "Fatal error: Class 'ForAdmin' not found in /www_host/hosts/testcms.ex6.ru/system/application/controllers/admin/admin.php on line 3"
in /application/libraries/MY_controller.php I have:
Code:
<?php  if (!defined('BASEPATH')) exit('No direct script access allowed');
class ForAdmin extends Controller{

    function __construct()
    {
        parent::Controller();
    }
/*some_other_code*/
?>
and in
/controllers/admin/admin.php
Code:
<?php

class Admin extends ForAdmin{

    function __construct()
    {
        parent::__construct();    
    }
/*some_other_code*/
?>
#4

[eluser]Majd Taby[/eluser]
capitalization of file names is just a problem waiting to happen, minimize everything (the url and the filename, see if it fixes it)
#5

[eluser]John_Betong[/eluser]
[quote author="Maks Baum" date="1204611394"]The problem is: When I copy all project to production server I can't inherit from MyController class, It even seems not to load file with this class... however during develop on localhost everytnig works just fine :/
I use in this project newewst version of CI, during previosus projects I used oldest version sth. like 1.5.4 and there was no difference between localhost and real server.
Any ideas? Wink (I tried to change file name with MyController class - smallcaps, delete '_') I use php 4:/[/quote]
 
 
Checkout this reported bug
 
 
#6

[eluser]LightAlloy[/eluser]
hm.. my error was that I called file MY_conroller?, not MY_Controller




Theme © iAndrew 2016 - Forum software by © MyBB