Welcome Guest, Not a member yet? Register   Sign In
Default permitted_uri_chars msg not showing up, instead showing exception error msg
#1

I have a project made using CodeIgniter v 3.1.10. In the Config.php i have the default setting:


Code:
$config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-';
[font=Arial,]Now, when I manually modify the url for e.g. as xyz.com/cat/'. Please note the apostrophe at the end of the URL, then I'm expecting the default error message like -[/font]

Code:
An Error Was Encountered
The URI you submitted has disallowed characters.
[font=Arial,][font=Arial,]But instead of the above error message I'm getting an uncaught exception error message[/font][/font]
[font=Arial,][font=Arial,][Image: YLoPu.jpg][/font][/font]
[font=Arial,][font=Arial,][font=Arial,]Can anyone please tell me what and where I need to change/Check. Thanks[/font][/font][/font]
Reply
#2

Have you tried a clean version of CI? I just tried it will 3.1.10 and 3.1.11, and it worked as expected.

Tried it with the default controller.
/welcome/'

If it works with the default controller, you have an error in your cat controller.
Reply
#3

Make sure that your controller class name and filename both have the first character uppercase also.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#4

(10-19-2019, 02:50 AM)jreklund Wrote: Have you tried a clean version of CI? I just tried it will 3.1.10 and 3.1.11, and it worked as expected.

Tried it with the default controller.
/welcome/'

If it works with the default controller, you have an error in your cat controller.
Thanks for the reply.No, I haven't tried with a clean version of CI, because the current website is quite a big one and replicating each and every functionality in the new one would be quite a task. As a last resort, i may try this one.
Reply
#5

(10-19-2019, 11:17 AM)InsiteFX Wrote: Make sure that your controller class name and filename both have the first character uppercase also.
Thanks for the reply. Yes, i have checked and both the class name as well as the filename start with uppercase.
Reply
#6

(This post was last modified: 10-20-2019, 01:04 AM by John_Betong.)

Quote:@gomesh
Thanks for the reply.No, I haven't tried with a clean version of CI, because the current website is quite a big one and replicating each and every functionality in the new one would be quite a task. As a last resort, i may try this one.

I upload the complete CodeIgniter folder from my localhost to Online and have a ci4-app-test.php which calls the original CodeIgniter4/app.

File: ci4-app-test.php
require '/var/www/CodeIgniter4/public/index.php';

BEWARE:
The writable folder must be writable which it is not by default.
Reply
#7

(10-19-2019, 11:55 PM)gomesh Wrote: Thanks for the reply.No, I haven't tried with a clean version of CI, because the current website is quite a big one and replicating each and every functionality in the new one would be quite a task. As a last resort, i may try this one.

You don't need to redo all your functionality. It's just a test to see if it's a server configuration or PHP version related. If that one works it's not the CI version itself but a combination of your code and CI.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB