Welcome, Guest
You have to register before you can post on our site.



Search Forums

(Advanced Search)

Forum Statistics
» Members: 8,461
» Latest member: Ridhuwan
» Forum threads: 65,892
» Forum posts: 413,954

Full Statistics

Latest Threads
Session Problem
Forum: General Help
2 hours ago
» Replies: 3   » Views: 92
git mess
Forum: General Help
4 hours ago
» Replies: 0   » Views: 38
Expire Session When Not A...
Forum: General Help
5 hours ago
» Replies: 6   » Views: 192
Controller / View Relatio...
Forum: Best Practices
5 hours ago
» Replies: 7   » Views: 288
Which browser do you guys...
Forum: Lounge
6 hours ago
» Replies: 14   » Views: 443
AthenaEMR - a open EMR pl...
Forum: Spotlight
Today, 06:07 AM
» Replies: 2   » Views: 608
How to integrate simogeo/...
Forum: Addins
Today, 05:38 AM
» Replies: 2   » Views: 93
Pagination , Routing 404...
Forum: Libraries & Helpers
Today, 05:25 AM
» Replies: 2   » Views: 93
How to integrate already ...
Forum: General Help
Today, 05:15 AM
» Replies: 3   » Views: 174
allow query string (?p=) ...
Forum: General Help
Yesterday, 05:37 PM
» Replies: 2   » Views: 113

  git mess
Posted by: Tpojka - 4 hours ago - Forum: General Help - No Replies

Ok, so I wanted to synchronise forked repository that wasn't maintained for about year with main CI repository and while trying to follow this and this something went wrong and seems I pushed request for changes of main branch. I know it can't be broken automatically but my apology though.

  How to integrate simogeo/Filemanager in CI 3?
Posted by: SirTom - Today, 05:07 AM - Forum: Addins - Replies (2)

I have problems to integrate simogeo/Filemanager into Codeigniter 3.1.4.

I have integrated the filemanager library into the assets folder and set a Link from the view to open the filemanager.

Then I Just copy the content of "/scripts/filemanager.config.default.json" into "/scripts/filemanager.config.json" .

Now I can open the filemanager, but nothing will happen.

[Image: 5ff7abe0c43c4fef8f8c38632e57da8b.png]

Thanks for your help!!!
[Image: f26d0x]

  Session Problem
Posted by: Attiq - Today, 04:55 AM - Forum: General Help - Replies (3)

I develop an application in code igniter. I have problem with sessions. When my application user log into their account, it shows the other user session name. I am using bluehost hosting and this problem holds only with bluehost hosting, because the same application hosted on godaddy hosting works properly. kindly tell me what is the problem exactly? is it hosting problem or something else ...

Attached Files Thumbnail(s)

  Pagination , Routing 404 - Newbie
Posted by: anoopd - Yesterday, 11:57 PM - Forum: Libraries & Helpers - Replies (2)

Learning CI3  ..... building a simple cms  . Added ' pagination' to the libraries array and tried the code below 

In the posts controller index function i am showing all my posts ( Total of 7 posts of which i try to show 5)  . When i try to use pagination it is showing 404 error 

 ie;  http://localhost/CI3/posts  - shows all 7 posts with pagination links in bottom , clicking '2' takes to http://localhost/CI3/posts/5  which is giving a 404 page not found . 


PHP Code:
$route['posts/create'] = 'posts/create';
$route['posts/update'] = 'posts/update';
$route['posts/success'] = 'posts/success';
$route['posts'] = 'posts/index';
$route['posts/(:any)'] = 'posts/view/$1';

$route['default_controller'] = 'pages/view';

$route['categories'] = 'categories/index';
$route['categories/create'] = 'categories/create';
$route['categories/posts/(:any)'] = 'categories/posts/$1';

$route['(:any)'] = 'pages/view/$1';
$route['404_override'] = '';
$route['translate_uri_dashes'] = FALSE


PHP Code:
Class Posts extends CI_Controller {

    public function index() {

        $data['title'] = 'Latest Posts';

        $config['base_url'] = site_url().'/posts';
        $config['total_rows'] = $this->post_model->count();
        $config['per_page'] = 5;
        //$config['page_query_string'] = TRUE;
        $config['uri_segment'] = 4;


        $data['pagination_links'] = $this->pagination->create_links();

        $data['posts'] = $this->post_model->get_posts();



Can somebody help with what went wrong  ..

  allow query string (?p=) to one directory only
Posted by: dbrooke - Yesterday, 04:34 PM - Forum: General Help - Replies (2)

Hello CI'ers,
I'm trying to embed a forum app into a codeigniter page. The problem I am running into is that the app is producing tradition query string calls which CI is not allowing.. ie. I get a 404.

When I (globally) allow traditional query strings in config.php:

$config['enable_query_strings'] = TRUE;

The site doesn't work.

I then tried overriding the config in just the forum controller itself:

$this->config->set_item('enable_query_strings', TRUE);

That did not work.

Any ideas?

Tongue Expire Session When Not Active
Posted by: arisroyo - Yesterday, 05:50 AM - Forum: General Help - Replies (6)


I would like to ask on how to automatically expired user session when it's not active?
I find out that CI never expire it's session and when I tried to make $config['sess_time_to_update'] lower than $config['sess_expiration']
it expired even if the user is actively using the web application.

Thanks in advance.

  Username required in Community Auth
Posted by: annx10 - Yesterday, 05:20 AM - Forum: Addins - Replies (4)


For my application I need have username like required.
Can I modify table "users" changing field username for not admitance nulls?
If I modify it, that affects something that I must consider?


  Controller / View Relationship
Posted by: simon - Yesterday, 04:59 AM - Forum: Best Practices - Replies (7)

1 to 1 or 1 to many, is the question in short.

I'm coming from an ASP.NET C# Web Forms environment where forms/pages that are related to a business function are kept in the same folder. Web Forms has good security based on folders and only allowing users belonging to the permitted roles to access the pages in that folder. Much of the code is held in classes so the code behind the forms themselves can be quite light. We end up a structure that like:

example.com/ (public interface and many, many pages)
example.com/accounts (Accounts Department 'home' page and menu, accessed by Accounts and Managers)
... plus 100 more.
example.com/manager (Managerial section 'home' page, only Managers allowed)
... plus another 50 more.
etc, etc.

For my CodeIgniter project, I'd assumed that I would have one controller per functional area (accounts, manager, etc), each with their many views. Each function within the controller would load the model for it's view. As with our ASP.NET folders, only users in the permitted roles would be able to access the views controlled by this controller and that it would pretty much mirror the above from the user's point of view. I want to leave aside the advanced opportunities presented by routing at this stage. The users are happy with the structure above.

My concern is that my controllers may get too big. For example, the 'accounts' role needs to access around 100 different views. They need to be able to access and update information on customer, invoices, suppliers, inventory and many, many more. The other few roles have fewer forms, but the same concept.

However, if you go for a 1 to 1 relationship between controller and view, it seems a bit of an abstraction to me. You might as well just have the model code in classes and mix what happens in the controller in with the HTML in a plain old PHP page. Which is what happens now in the Webforms system.

Is it best practice to have one controller per role and allow it to manage dozens of views or should I go the Apple way and have one controller for every view. Something in between maybe?

Thanks for any opinions.

  updating on database with form validation
Posted by: saifabid123 - 04-27-2017, 01:32 PM - Forum: General Help - No Replies

I have a form filled with inputs , wich i form validate them , i have a problem with two of them , 'matricule' and 'email' , in my callback function i set that if when of those tow exists in the table, it won't be no insert or update , so my problem is when i want to update other fields without changing these two , an error will be shown saying that the allready exists. Can u tell me please how to solve this problem
here is some code :
My controller function :

        public function unique_matricule($matricule) 


$old_matricule = $this->etudiant_model->get_matricule($this->input->post('m'));

$all_matricules = $this->etudiant_model->get_all_matricules();

echo json_encode($old_matricule);

foreach ($all_matricules as $key) {

if ($key->matricule == $old_matricule) {




}echo json_encode($all_matricules);

foreach ($all_matricules as $key) {

if($key->matricule == $matricule)


$verif = false ;




if($matricule == $old_matricule || $verif==true)


return true;




return false;

after doing this , an error is shown wich tells me this "Illegal offset type in unset".

my $all_matricules array is this :[{"matricule":"123123"},{"matricule":"140273"},{"matricule":"231564"}]

So when i select the row that i want to modify , i want my code to delete its matricule from this array with unset function, can u tell me please what i have done wrong ?

Thank you!

  SVG Library for Codeigniter
Posted by: Andryshok - 04-27-2017, 12:44 PM - Forum: Libraries & Helpers - Replies (1)

Hello. Whether knows who library for converting of the text (string) in svg code on the fly.
It is necessary to display the text as svg image in html code.

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