CodeIgniter Forums

Full Version: Problems publishing a CI site into a Server
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2

El Forum

[eluser]Marcelo Reborn[/eluser]
Hi,

I'm developing a site in my localhost, and everything was correct.

When I transfered the files to my server, I had some problems.
CI isn't recogniting my classes.

All files are here:
http://marcelodeassis.com.br/projetos/aquarelaFilmes/ (index.php, system/)

If I open that url, it takes me to my default controler, Login, which takes me to a login interface. But, when I try log in, it says "The page you requested was not found.".
http://marcelodeassis.com.br/projetos/aq...gin/access

But it works normally in my localhost and I have set my base url to "http://marcelodeassis.com.br/projetos/aquarelaFilmes/".


What this can be?
Thanks (and sorry my bad english)!

El Forum

[eluser]grisha[/eluser]
Sounds like you're developing it under Windows and hosting on UNIX.
UNIX is more restrictive when it comes to case-sensitivity. Check if you follow the CI naming rules (first class name letter must be a upper-case). If you extend core classes with MY_ they must be named with MY_, not My_ my_ etc. The same rule applies to file names. Try to avoid hungarian notation while playing with CI.

El Forum

[eluser]Marcelo Reborn[/eluser]
You're correct!

My class's files weren't capitalized. Now, after 3+ hours trying to solve, everything is working fine.

Thanks, Grisha!

El Forum

[eluser]InsiteFX[/eluser]
If you read the CodeIgniter User Guide on Libraries you
would have known this...

InsiteFX

El Forum

[eluser]SPeed_FANat1c[/eluser]
[quote author="InsiteFX" date="1293616115"]If you read the CodeIgniter User Guide on Libraries you
would have known this...

InsiteFX[/quote]

But the reality is - if it works then why do I need to read Big Grin

El Forum

[eluser]Marcelo Reborn[/eluser]
[quote author="InsiteFX" date="1293616115"]If you read the CodeIgniter User Guide on Libraries you
would have known this...

InsiteFX[/quote]

I read it when I began with CI, but I'm a human, and humans forget things. ;-)

El Forum

[eluser]InsiteFX[/eluser]
@SPeed_FANat1c

This is why!

From CodeIgniter User Guide - Creating Libraries:

Naming Conventions

File names must be capitalized. For example: Myclass.php
Class declarations must be capitalized. For example: class Myclass
Class names and file names must match.

InsiteFX

El Forum

[eluser]Marcelo Reborn[/eluser]
Something interesting:


At config/routes.php

Code:
| There are two reserved routes:
|
|    $route['default_controller'] = 'welcome';
|
| This route indicates which controller class should be loaded if the
| URI contains no data. In the above example, the "welcome" class
| would be loaded.
|
|    $route['scaffolding_trigger'] = 'scaffolding';

Controller names aren't capitalized on CI comments, why? ;-)

El Forum

[eluser]Marcelo Reborn[/eluser]
[Moved a new problem posted here to a new topic]

El Forum

[eluser]Marcelo Reborn[/eluser]
[quote author="InsiteFX" date="1293651679"]@SPeed_FANat1c

This is why!

From CodeIgniter User Guide - Creating Libraries:

Naming Conventions

File names must be capitalized. For example: Myclass.php
Class declarations must be capitalized. For example: class Myclass
Class names and file names must match.

InsiteFX[/quote]

What you wrote is just about creating Libraries, not normal controllers!
Pages: 1 2