Closed metallurgical closed 8 years ago
@metallurgical: Does not make any sense!! You should name the file as it is. Its not about case sensitivity if you try to access the file with same case. It may be about access permission. Can you share what error you are getting. and with which version of CI you are using?
Like said, library does't work at all. After renaming the file, it works. Stable version 2.2.1.
Ok, I'll look into it. Thanks for reporting.
I'll close it after i investigate. Let the issue open till then.
I've just tested the library on Linux with CI version 2.2.1. And its working.Now I'm guessing there may be problem with your library directory name. The directory name should be ezRbac
if you have configured the hook with the code in documentation. Otherwise you need to give the correct path in hook.
For example if you have put the library into easy-rbac-master-Lib
directory. you need to configure your hook option like:
<?php
$hook['post_controller_constructor'] = array(
'class' => 'ezRbacHook',
'function' => 'AccessCheck',
'filename' => 'ezRbacHook.php',
'filepath' => 'third_party/easy-rbac-master-Lib'
);
If that was the problem. please close the issue with comments. Otherwise can you put some more details!!
I'm configured the hook with the code in documentation, and the path is not a problem in my case. After renaming the folder name, it works correctly. Otherwise it won't. Hook option also same with yours except this path 'filepath' => 'third_party/easy-rbac-master-Lib'
. The original form is 'filepath' => 'third_party/ezRbac'
i have that equal with my folder name ezRbac
. But this does't work. After renaming the file path and folder name into third_party/ezrbac
and ezrback
respectively, it works. If that case, i will try to investigate again in my production site
As I can see, codeigniter does not change the case of the configuration values https://github.com/bcit-ci/CodeIgniter/blob/develop/system/core/Hooks.php#L196-L206
What you are saying is logically impossible, unless you did something different!. Its obvious the problem is in the configuration and the directory name. can you send me the zip archived of the third_party directory (That did not worked).
i changed file name in small letter & updated 'filepath' => 'third_party/ezrbac', still same .
waoooo, problem is solved ......thank you so much , there is spelling mismatch under hook : 'filename' => 'EzRbacHook.php', and file name was under third_part : 'ezRbacHook.php
so i just changed 'filename' => 'ezRbacHook.php', and its working ..!!
Shared hosting(linux) to be precised because of case sensitivity , can't read your file and folder started with capital letter or having a capital letter. Will make the library does't work at all.