• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
unexpected error: Unable to load the requested file: helpers/login_helper.php

#1
[eluser]wagnered[/eluser]
Attempting to get familiar with CI and the C-V-M approach, I tried the form validation example from the documentation.

I entered the code for the controller, the form and the success page, verbatim. The URL I gave was http://127.0.0.1:8080/index.php/form as suggested by the example. When I did, I got the error "Unable to load the requested file: helpers/login_helper.php". I did not add the request for the helper to the code.

I did a grep and find of the directory tree for the phrase "login_helper" and login_helper.php and found nothing: no references or no file by that name. I was checking to see if it might have been included indirectly somehow.

I'm using lighttpd and php 5.5.17 on a Linux machine.

Does anyone have an idea how that helper is being requested if it's not in my code or referenced in any file on the system?


Thanks....

#2
[eluser]Tim Brownlaw[/eluser]
Have you got a link to this "Example" you are trying?

#3
[eluser]wagnered[/eluser]
file://.../.../user-guide.toc.html.

Wherever you installed your version of the codeigniter user_guide folder. In the table of contents, select "Form Validation class" and you will see the code.

Well I recopied/pasted the code into their respective files and could not reproduce the error listed in the title. Must have been a bad character that got inserted somewhere.

But, now, the web page is blank.

I wonder if the form and url helper or the form_validation library is not getting loaded.

Ernie D

#4
[eluser]wagnered[/eluser]
I downloaded CodeIgniter-3.0 and tried the same example and the "Form Validation example" worked.

So I copied the files from that version to 2.2.0 and as long as I entered the url with the controller part exactly the same as the controller file name, it worked: if the controller file name is "Form.php" I had to use that in the url. In 3.0 I could use either first letter upper or lower case.

So 3.0 seems a little more forgiving in referring to the controller at various places in the code.

I'm familiar with PHP and even C++ as to the letter case of variables, etc. The quirks of CodeIgniter add another layer to get familiar with as to understanding how the different parts (M-V-C) operate together.

Regards,

Ernie D



Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
2 Guest(s)


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