Questions tagged [codeigniter-2]

CodeIgniter 2.x is an old and no longer supported version of the popular PHP framework. Please refer to the [codeigniter] tag for more information.

Codeigniter 2.x is an old and no longer supported version of the popular PHP framework.

The last 2.x version (2.2.6) was released on October 31st, 2015, which is also the date when security maintenance support for the 2.x version tree was officially ended.

For more up-to-date information on the Codeigniter framework, please refer to the tag.

Links:

3146 questions
5
votes
3 answers

Very high latency in first HTTP request on CodeIgniter project

A friend and I just started working in a project which other people stopped developing a couple of years ago, and we're trying to resurrect it. We've already solved most of the setup-related issues, but there's a really annoying one that we can't…
seiseises
  • 450
  • 2
  • 12
5
votes
2 answers

How to create triggers in Codeigniter's migration library

Triggers creation are just not working, I tried everything I can think of, for instance, like that: $this->db->query("DELIMITER //\r\n CREATE TRIGGER `delete_post` BEFORE DELETE ON `posts`\r\n FOR EACH ROW BEGIN\r\n DELETE FROM page_content WHERE…
NaturalBornCamper
  • 3,675
  • 5
  • 39
  • 58
5
votes
2 answers

How to retrieve the third uri segment in a codeigniter hook

I'm writing a custom post_controller hook. As we know, codeigniter uri structure is like this: example.com/class/function/id/ and my code: function hook_acl() { global $RTR; global $CI; $controller = $RTR->class; // the class part in…
Darren20
  • 90
  • 1
  • 7
5
votes
1 answer

PHP Version 5.4.13 Bug? CodeIgniter Bug? Or, Explanation?

So... I pushed some code live the other day (that worked 100% fine on my local machine) but killed the server - no Codeigniter Logs, no Apache Logs, die('msg') and exit() did not work - I have never experienced this before in 5+ years of PHP…
Tyler Wall
  • 3,747
  • 7
  • 37
  • 52
5
votes
2 answers

ALTER TABLE tbl AUTO_INCREMENT = 123 as codeigniter active records query?

How to execute ALTER TABLE tblname AUTO_INCREMENT = 123 as codeigniter active records query? There is something called dbforge->modify_column() in codeigniter , do i have to use that, if so how?
Learner_Programmer
  • 1,259
  • 1
  • 13
  • 38
5
votes
3 answers

CodeIgniter Active Record For Joining The Tables

I've following tables. apartments id name slug created modified apartment_amenities id name slug apartment_id created modified apartment_activities id name slug apartment_id created modified In the view I…
user1275378
5
votes
1 answer

Should we have different API's for mobile and WEB or same API to achieve one single task?

I have already built REST based API's in codeigniter framework for one of the app. The app lists all the businesses registered with the company ABC. Now I am developing website for the same company ABC. I need to show the businesses registered with…
Deep
  • 347
  • 3
  • 7
  • 22
5
votes
2 answers

Routes in Codeigniter - 404 Page Not Found

Can someone tell me, where the issue is ?? This is my controller class Support extends CI_Controller { public function __construct() { parent::__construct(); $this->load->model('support_model'); $urlarray =…
Satish Ravipati
  • 1,431
  • 7
  • 25
  • 40
5
votes
1 answer

CodeIgniter Multiple database use without changing existing code for first database

I have successfully configured a second database with codeigniter and was able to create a table. The problem is now that every previously existing lines of code that was using $this->db now uses the second database so naturally it pops an error.…
Bobs
  • 141
  • 1
  • 6
5
votes
4 answers

Fatal error: Class 'Model' not found in CodeIgniter

My CI version is CI2.3. I'm running this php code in my local host. I followed all the steps given there but I'm getting this error don't know why? and I changed Controller to CI_Controller. Hello world Program worked finely. This link code is not…
Suheal Pasha
  • 49
  • 1
  • 2
  • 7
5
votes
1 answer

how to switch database in codeigniter

i'm new to CI and i just wanna know is there a way to switch databases in CI,Eg: In login Page, there's a dropdown list that you can specify which database you wanna connect with, view look like this