Welcome Guest, Not a member yet? Register   Sign In
Problems publishing a CI site into a Server
#1

[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)!
#2

[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.
#3

[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!
#4

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

InsiteFX
#5

[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
#6

[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. ;-)
#7

[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
#8

[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? ;-)
#9

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

[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!




Theme © iAndrew 2016 - Forum software by © MyBB