Welcome Guest, Not a member yet? Register   Sign In
Unable to load the requested file: helpers/my_url_helper.php
#1

[eluser]italoc[/eluser]
i have tried to use URI languge identifier following the wiki in this site.

works fine in localhost but in production server (i have try this in 2 server) don't work

i obtain this error:

Code:
Unable to load the requested file: helpers/my_url_helper.php

someone can help me?
#2

[eluser]bretticus[/eluser]
If you're trying to "extend" (using the MY_ prefix emulates extending a class in CI for example) url_helper, you probably need to name your file MY_url_helper.php with an uppercase MY (check your config.php file for $config['subclass_prefix'].) Windows will forgive case insenstivity but *nix will not.

Another thought is perhaps you are referencing your helper like:

Code:
<?php
$this->load->helper('my_url');
?>

which would be wrong, as you'd just need to use:

Code:
<?php
$this->load->helper('url');
?>

That will reference your your MY_url_helper.php file and replace any functions by the same name with your "extended" functions.

How are you referencing it?
#3

[eluser]TheFuzzy0ne[/eluser]
Exactly so. Use the MY_ prefix to extend an existing file, and load it as you would normally load it:
Code:
$this->load->helper('url');

CodeIgniter checks for a file named MY_url_helper.php, and loads it if it exists, and then loads the core version of the file. When the core file is loaded, if a particular function is already defined (i.e you defined it in your custom helper), the function from the core file will be ignored.

Hope this helps.
#4

[eluser]Shiro[/eluser]
I think CI have change the string to be lower case, as you can see the CI warning:
Code:
Unable to load the requested file: helpers/my_url_helper.php

I also having the same problem today.
but not append CI helper, i create my own helper file call my_function_helper.php
the file name is MY_function_helper.php
but when I upload to production server, it show the error message
Code:
Unable to load the requested file: helpers/my_function_helper.php
what I have done is rename the file name to lower letter my_function_helper.php then it works.

I am using CI 1.72, not sure this is a bug or not.
#5

[eluser]TheFuzzy0ne[/eluser]
How are you loading the helper?
#6

[eluser]Shiro[/eluser]
from autoload.php in the helper array I added $autoload['helper'] = array('MY_function');

but as you can see the CI shows the error is small cap for the error

Code:
Unable to load the requested file: helpers/my_function_helper.php

I just keep the file name with small cap, then the problem solve.
#7

[eluser]LoganPHP[/eluser]
yes i also faced the following same problem...

so this is codeigniter bug or anything?


I think CI have change the string to be lower case, as you can see the CI warning:
Code:
Unable to load the requested file: helpers/my_url_helper.php

I also having the same problem today.
but not append CI helper, i create my own helper file call my_function_helper.php
the file name is MY_function_helper.php
but when I upload to production server, it show the error message
Code:
Unable to load the requested file: helpers/my_function_helper.php

what I have done is rename the file name to lower letter my_function_helper.php then it works.

I am using CI 1.72, not sure this is a bug or not.
#8

[eluser]Elegant Rao[/eluser]
if i tell you, you might laugh , but i was facing that same problem , i resolved it this way:

my helper name was form_validator.php. it was giving me the same error. it was also telling me what to do.

Unable to load the requested file: helpers/form_validator_helper.php

find anything ..???? yes it is that "helper".
then i renamed my file by form_validator_helper.php and than..... woala... yes this is how it was resolved.




Theme © iAndrew 2016 - Forum software by © MyBB