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
13
votes
4 answers

Processing large amounts of data in PHP without a browser timeout

I have array of mobile numbers, around 50,000. I'm trying to process and send bulk SMS to these numbers using third-party API, but the browser will freeze for some minutes. I'm looking for a better option. Processing of the data involves checking…
elf1984
  • 301
  • 1
  • 4
  • 12
13
votes
8 answers

Cannot redefine class on 'require_once'

UPDATE: I've abandoned CodeIgniter, and the desire to build a web interface around my database application from PHP, as there was no way of getting rid of this bug... The Exception I get this exception: Fatal error: require_once(): Cannot…
wen
  • 3,782
  • 9
  • 34
  • 54
13
votes
5 answers

Heroku PHP app crash bash: vendor/bin/heroku-php-apache2: No such file or directory

I'm not very good with Heroku setup I'm trying to put online an app in PHP (with Code Igniter) but it doesn't work well. Here is the error : Heroku PHP app crash bash: vendor/bin/heroku-php-apache2: No such file or directory index.php is in root…
Max
  • 143
  • 1
  • 2
  • 7
13
votes
5 answers

Update Database Field Error CodeIgniter

I am getting the following error message in CodeIgniter 2.1: A PHP Error was encountered Severity: Notice Message: Array to string conversion Filename: database/DB_active_rec.php Line Number: 1407 I'm trying to update fields in my database. I…
Charmie
  • 2,468
  • 7
  • 33
  • 47
13
votes
4 answers

setting cookies with HTTPOnly flags in codeigniter

I'd like to know how to set cookies as HTTPOnly in Codeigniter. I reviewed the documentation and didn't see how to set this flag. I was also looking to set the secure flag for cookies and found it in the config.php file: $config['cookie_secure'] =…
chowwy
  • 1,126
  • 8
  • 26
  • 45
12
votes
4 answers

Codeigniter application getting hacked, code injected in index.php

I have a codeigniter 2.0.2 project that keeps getting hacked. There are two main issues: Malicious code is being added to the start of the index.php file Rogue files are added to the server According to the host there are no FTP logs to indicate…
xylar
  • 7,433
  • 17
  • 55
  • 100
11
votes
5 answers

Only variables should be assigned by reference with function

I use old version of Codeigniter framework. With new version of php I am gettings this error: Only variables should be assigned by reference I am wondering if this is safe bugfix: Changing: $this->_base_classes =& is_loaded(); to $assign =…
user1324762
  • 765
  • 4
  • 7
  • 24
11
votes
5 answers

How to use 'DISTINCT' in Codeigniter Active Records?

I have a query using active records. $this->db->select('reg.users_id,reg.registration_id,reg.device_type'); $this->db->join('users as usr','usr.users_id =…
Saswat
  • 12,320
  • 16
  • 77
  • 156
11
votes
1 answer

update nestet set tree with php and nestable.js jquery plugin

EDIT: After great answer the @vadim-ashikhman. The end of the question. Resources I'm using: PHP Framework Codeigniter Nested set Library : https://github.com/olimortimer/ci-nested-sets/ jQuery library: http://dbushell.github.io/Nestable/ I…
jcarlosweb
  • 846
  • 1
  • 14
  • 30
11
votes
2 answers

Is there a difference between the method of helper and library are called upon in code igniter?

I am getting little bit confused, the way the methods of library and helper are used in code igniter. I am still learning code igniter. CONTROLLER function index(){ $this->load->helper('text'); $this->load->library('auth'); //custom…
Nirmalz Thapaz
  • 925
  • 4
  • 13
  • 28
11
votes
1 answer

Should i develop in codeigniter now on?

Their official site says they are willing to sell this framework, just wondering what will be the future of CI, or I should simply switch framework ?
ktm
  • 6,025
  • 24
  • 69
  • 95
11
votes
1 answer

Check number of affected rows in CodeIgniter

I am trying to check in my model method if there was affected any rows if so return true else return false, but I don't know how to get it?: class User_model extends CI_Model { function __construct() { parent::__construct(); } …
Michal
  • 3,584
  • 9
  • 47
  • 74
10
votes
5 answers

codeigniter form validation set_value works only for the fields which have rules

Suppose if I have two fields in my form viz first_name and last_name I have set the validation rule only for first_name. set_value should work for both the fields regardless of rule ? right ? For me it works only for the fields which have rules with…
Ess
  • 243
  • 1
  • 2
  • 7
10
votes
5 answers

Codeigniter 2 on IIS with web.config file

I have a codeigniter app working fine locally with WAMP. However, I am having trouble getting it to work on an IIS server. Please note that I do not want to enable query strings. Here is what I currently have in my web.config file:
stevetronix
  • 1,231
  • 2
  • 16
  • 32
10
votes
3 answers

PhpStorm CodeIgniter class not found

Can you help me on this one. I'm new in CodeIgniter and PhpStorm, I'm having a problem. The PhpStorm IDE is showing an error, even though the code works fine (the Persons(controller) class can't find the Person(model)…
Echusen
  • 321
  • 3
  • 10