Welcome Guest, Not a member yet? Register   Sign In
Talking to modules: Works on test server, Doesn't work on prod server
#1

[eluser]Buso[/eluser]
Everything was fine in my test server, but when I uploaded the files to the production server, it kept throwing this error:

Matchbox: Unable to load the requested file: helpers/my_html_helper.php

I always used the same files for both servers, except for those like the database.php and config.php

This is the point where code fails (inside the constructor of the controller):

Code:
// HELPERS
$this->load->helper('html');
$this->load->module_helper('users','MY_html');

Sry for opening a new thread, but its a different problem im sure, since it actually works in the test server.. just can't figure out why it doesn't in the prod server
#2

[eluser]jedd[/eluser]
[quote author="Buso" date="1257912337"]
Matchbox: Unable to load the requested file: helpers/my_html_helper.php
[/quote]

Presumably you have checked permissions at the file system level. (Across the whole directory structure.)

Quote:I always used the same files for both servers, except for those like the database.php and config.php

Oh yes - everyone says that. They're typically lying. Do you think the differences in config.php are worth mentioning or do you think we should just assume they're okay (and that the problem is unrelated (even though you don't know what the problem is))?

Did you diff your .htaccess files yet?

Quote:Sry for opening a new thread, but its a different problem im sure, since it actually works in the test server.. just can't figure out why it doesn't in the prod server

Not quite sure of the sincerity of someone who soundex's 'sorry'.

Did you read the FAQ about moving between sites?

Did you bump up error logging within CI?

If you did these things, be sure to mention them, so that some poor soul doesn't have to spend a few minutes asking if you did these basic trouble-shooting tasks already.
#3

[eluser]Buso[/eluser]
[quote author="jedd" date="1257915061"][quote author="Buso" date="1257912337"]
Matchbox: Unable to load the requested file: helpers/my_html_helper.php
[/quote]

Presumably you have checked permissions at the file system level. (Across the whole directory structure.)[/quote]
I checked the permissions of the my_html_helper.php file just because i didn't know what else to do.. well, i don't know much about permissions, but its permissions were the same as the other helpers, that was enough for me (what other files should I check? Im trying to follow the flow of the application but its a dead end when it calls the helper, dunno what to do)
Quote:
Quote:I always used the same files for both servers, except for those like the database.php and config.php

Oh yes - everyone says that. They're typically lying. Do you think the differences in config.php are worth mentioning or do you think we should just assume they're okay (and that the problem is unrelated (even though you don't know what the problem is))?

Did you diff your .htaccess files yet?
I uploaded the whole site because i didn't know what else to do, then uploaded config and database.php.
What's diff?
here's my .htaccess, but it's the same for both servers and it worked till today..
Code:
RewriteEngine On
RewriteBase /
RewriteRule ^(system|application|cgi-bin) - [F,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php/$0 [PT,L]
anyway as I can see from the error, its correctly routing to the controller, i can't imagine how htaccess could be the problem

Quote:
Quote:Sry for opening a new thread, but its a different problem im sure, since it actually works in the test server.. just can't figure out why it doesn't in the prod server

Not quite sure of the sincerity of someone who soundex's 'sorry'.

Did you read the FAQ about moving between sites?

Did you bump up error logging within CI?

If you did these things, be sure to mention them, so that some poor soul doesn't have to spend a few minutes asking if you did these basic trouble-shooting tasks already.
[/quote]
No and no.. Ok ill check that out.
In the meantime, if something comes up to your mind about this I would appreciate your help =)
Brb
#4

[eluser]jedd[/eluser]
ObDisclaimer - I know nothing about matchbox.

Permissions and diff. What tools are you using to replicate your site? If you are running an SVC of some sort it's easy and convenient to use that to distribute new copies up to the production environment. I suspect you are not, though. (?)

I use [url="http://www.cis.upenn.edu/~bcpierce/unison/"]unison[/url] to synchronise data between machines - cross platform, nice front end. You could use rsync if you like, but more complex to set up. Unison highlights permission differences on each end, which can be handy for identifying potential problems.

You didn't mention what platforms you're working between. I'm guessing a GNU/Linux distro on one end, and a Microsoft Windows Something platform on the other.
Longer term I can recommend you develop on the same platform you're deploying to. Yes, you shouldn't have to - but it's just so much easier, and isn't a huge amount of effort to set up a local environment (virtualisation is $-free these days).

diff is a command line utility that will output the differences between two files. Very handy indeed. kdiff3 is a GUI tool that does much the same, for KDE users. I suspect you're not a CLI kinda person, or that you're using KDE. It'd be handy here because it'd make it very easy and fast to see the changes between your dev and prod config files.

diff is also very useful when you go back to work out what files you changed from the default CI core files - mostly because it gives the clearest insight into what files you (may) have to change when you shift platforms, such as the shift to production. A versioning system would also allow this level of examination, too. This is the point that I plug [url="http://git-scm.com/"]git[/url]. Similarly just making a note in every config file that you change is a good start - I use an ISO8601 date, my name, and a precis of the change (for non-obvious ones). A grep for 'jedd' in my config directory makes this stuff stand out like the proverbial.

.htaccess files are often a problem, because even when they're the same at both ends, they behave differently. I've seen some nasty (to solve) problems where I've moved from /var/www (default doc root for my apache instance) to ~/public_html/ - using a generic .htaccess file.

You may want to experiment with changing this line:
Code:
RewriteRule .* index.php/$0 [PT,L]

... to either of these:
Code:
RewriteRule ^(.*)$ index.php/$1 [L]
RewriteRule ^(.*)$ ./index.php/$1 [L]

You mentioned routes - have you modified your config/routes.php file?
#5

[eluser]Buso[/eluser]
[quote author="jedd" date="1257917222"]ObDisclaimer - I know nothing about matchbox.

Permissions and diff. What tools are you using to replicate your site? If you are running an SVC of some sort it's easy and convenient to use that to distribute new copies up to the production environment. I suspect you are not, though. (?)

I use [url="http://www.cis.upenn.edu/~bcpierce/unison/"]unison[/url] to synchronise data between machines - cross platform, nice front end. You could use rsync if you like, but more complex to set up. Unison highlights permission differences on each end, which can be handy for identifying potential problems.

You didn't mention what platforms you're working between. I'm guessing a GNU/Linux distro on one end, and a Microsoft Windows Something platform on the other.
Longer term I can recommend you develop on the same platform you're deploying to. Yes, you shouldn't have to - but it's just so much easier, and isn't a huge amount of effort to set up a local environment (virtualisation is $-free these days).

diff is a command line utility that will output the differences between two files. Very handy indeed. kdiff3 is a GUI tool that does much the same, for KDE users. I suspect you're not a CLI kinda person, or that you're using KDE. It'd be handy here because it'd make it very easy and fast to see the changes between your dev and prod config files.

diff is also very useful when you go back to work out what files you changed from the default CI core files - mostly because it gives the clearest insight into what files you (may) have to change when you shift platforms, such as the shift to production. A versioning system would also allow this level of examination, too. This is the point that I plug [url="http://git-scm.com/"]git[/url]. Similarly just making a note in every config file that you change is a good start - I use an ISO8601 date, my name, and a precis of the change (for non-obvious ones). A grep for 'jedd' in my config directory makes this stuff stand out like the proverbial.

.htaccess files are often a problem, because even when they're the same at both ends, they behave differently. I've seen some nasty (to solve) problems where I've moved from /var/www (default doc root for my apache instance) to ~/public_html/ - using a generic .htaccess file.

You may want to experiment with changing this line:
Code:
RewriteRule .* index.php/$0 [PT,L]

... to either of these:
Code:
RewriteRule ^(.*)$ index.php/$1 [L]
RewriteRule ^(.*)$ ./index.php/$1 [L]

You mentioned routes - have you modified your config/routes.php file?[/quote]
ill have to bookmark this an read it again tomorrow >_>

routes.. no, I couldnt make my short urls work, so I discarded them (for now). I mentioned them because im using matchbox, and that could be a problem (but i think it isn't)

thanks for your help, i will try that changes in the htaccess and go to sleep..

but dont miss me, ill be spamming here again tomorrow =P
#6

[eluser]Buso[/eluser]
bleh, i think im giving up on this one, i rather changing the name of the helper to "users_helper" and move on =/




Theme © iAndrew 2016 - Forum software by © MyBB