1

I have a Codeigniter framework setup that I move cross multiple domain setups as a default starting point. However when I was going to apply it for the first time to a one.com domain I got an error.

An Error Was Encountered
Unable to load the requested class: Form

So far I have tried with checking the source for this. I went into the autoload.php and first tried to change from "form" to "Form" as I found out on another site because of Linux being sensitive to capital letters, but to no use.

I then removed the form all together and then I got the same error, but from the helper "url". I removed that and it went up to libraries and started printing same error for the first in that array.

$autoload['libraries'] = array('Database', 'Session', 'User_agent', 'Upload');
$autoload['drivers'] = array('Form', 'Url');

If there is anything more I can add to shine light on this or make the question better please tell me and I will add it. I am not sure at all where the fault might lie so therefore the information is a bit pale.

moiamserru
  • 71
  • 8
  • concerning your update: I'd suggest to leave this question as it was before the update. Please ask a new one, explaining with more details of what leads to mkdir() invalid path and the Session_files_driver issue. I think it should be a different Question/Answer pair – Vickel Feb 05 '19 at 21:35
  • Reverted back to original question. – moiamserru Feb 05 '19 at 21:40
  • Thanks, I hope you see why this is important: if a question is followed by another update(new question) and another update (new question) then it will be of no use for other programmers to find out about an issue, as they are covered up in updates. Please ask the new answer, I'll try to help... – Vickel Feb 05 '19 at 21:43
  • I do see the point! Thanks for making me notice it! I have made a new question for the new error here: https://stackoverflow.com/questions/54543583/applying-codeigniter-3-to-a-new-domain-host-gives-mkdir-error-for-session-file – moiamserru Feb 05 '19 at 21:50

1 Answers1

1

You are trying to load a CI helper as a driver ! So the framework looks for a driver Form.php file, which doesn't exist (not in the standard CI installation).

| These classes are located in system/libraries/ or in your

| application/libraries/ directory, but are also placed inside their

| own subdirectory and they extend the CI_Driver_Library class

What you want to do is to load the "form" helper (and the others). A helper is loaded like: $this->load->helper('form'); or autoloaded.

CI - helper

CI - autoload

CI - driver

Community
  • 1
  • 1
Vickel
  • 7,879
  • 6
  • 35
  • 56