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

CodeIgniter : Run a script from command line if the controller is inside a folder?

As stated here : http://codeigniter.com/user_guide/general/cli.html A page like : http://www.example.com/myController/myFunc/myParam can be run on the command line as : php index.php myController myFunc myParam My codeignitor set up has some…
DhruvPathak
  • 42,059
  • 16
  • 116
  • 175
5
votes
2 answers

Is there a better (lightweight) solution for autocomplete with php and codeigniter without jquery ui?

I was searching a lightweight and crossbrowser compatible solution for my web site. Here is the solution i have successfully implemented: Codes: http://www.jamipietila.fi/codeigniter-and-autocomplete-with-jquery/ Working…
mirza
  • 5,685
  • 10
  • 43
  • 73
5
votes
2 answers

PHP - The script tried to execute a method or access a property of an incomplete object

I'm using CI and I have a UserModel that selects the user based on login information and sets a userVO and add this userVO in a session like this: $this->session->set_userdata('user', $userVO); When I try to access this session it return me this…
user745235
5
votes
1 answer

CodeIgniter: pagination doesn't have question mark?

The code below generates pagination using query strings. However, there is no leading ?. So, I get something like this: http://localhost/index.php/search/&limit=10. Any ideas why? this->load->library('pagination'); $config =…
StackOverflowNewbie
  • 39,403
  • 111
  • 277
  • 441
5
votes
4 answers

Extending Multiple models in Codeigniter 2

How do you set up CI2 to allow extending of multiple models? I can only get it to extend one model (put in /application/core) named MY_Model (case sensitive). To choose what model to extend I am doing; in the model.. require_once…
Rooneyl
  • 7,802
  • 6
  • 52
  • 81
5
votes
3 answers

Authentication in jQuery Mobile and PhoneGap

I have a web application built with jQuery Mobile and PHP (CodeIgniter framework). Now I'm trying to make a PhoneGap version of it as well, to make it distributable as a standalone app. However, the PHP web app. version uses Ion Auth, a CodeIgniter…
Anders
  • 12,556
  • 24
  • 104
  • 151
5
votes
2 answers

Is there a mongodb-backed user authentication library for codeigniter?

I need a Codeigniter login library for user authentication. I use MongoDB as my database. I have gone through some of the recommended libraries like Ion Auth, Tank Auth, DX Auth etc. but all use mysql databases. Is there a recommended library which…
Ninja
  • 5,082
  • 6
  • 37
  • 59
5
votes
2 answers

How to get form_dropdown() show the selected value in Codeigniter?

I am trying to populate a dropdown list from database. In my view file I have the following code $batch= $query ['batch']; // I pull this data from a separate model echo form_dropdown('shirts', $options, $batch); Now the drop down list is…
black_belt
  • 6,601
  • 36
  • 121
  • 185
5
votes
2 answers

Scaffolding feature in Codeigniter 2.02

Scaffolding feature was in routes.php ($route['scaffolding_trigger'] = '';)in previous version but it is not in routes now in 2.02 so please tell my how do i use scaffolding feature in 2.0.2 version of codeigniter
Imran Ali
  • 97
  • 1
  • 7
5
votes
3 answers

Codeigniter - return my model object instead of stdClass Object

Not sure the best way of phrasing this so bear with me. Within Codeigniter I can return a record set of my object no problem but this is returned as a stdClass object not as an "model" object (for example a Page Object) which I can then use to make…
simnom
  • 2,590
  • 1
  • 24
  • 34
5
votes
1 answer

Calling Flysystem, why do I get PHP Fatal error: Class 'League\Flysystem\Adapter\Local' not found?

I try to run Flysystem's basic example code for the Local adapter and get a Class 'League\Flysystem\Adapter\Local' not found error. This is my process: version check: php -v PHP 5.5.9-1ubuntu4.23 (cli) (built: Feb 8 2018 21:59:47) install…
jbobbins
  • 1,221
  • 3
  • 15
  • 28
5
votes
1 answer

fsockopen(): php_network_getaddresses: getaddrinfo failed: Name or service not known

I am failing to send form contents to email. I am getting the following error: : Warning Message: fsockopen(): php_network_getaddresses: getaddrinfo failed:Name or service not known Filename: libraries/Email.php Line Number: 1986 Severity:…
Cooper
  • 111
  • 1
  • 2
  • 9
5
votes
3 answers

Set up the base url in codeigniter

I have the directory structure like this in code igniter: Appsite -website -application -images When I accessing the image in index.php I used:
qazzu
  • 361
  • 3
  • 5
  • 16
5
votes
2 answers

How to serve static/media contents (only) from s3 and others from EC2?

I want to serve my static/media contents ( images for now) from S3 but my url should be as it is now. For example: http://example.com/resources/img/me.jpg is one of my current image url which is now being served from the native server (EBS storage…
edam
  • 910
  • 10
  • 29
5
votes
3 answers

passing data from hook to view in codeigniter

can i passing data from hook to view, If is it possible please explain. for example $hook['post_controller_constructor'][] = array( 'class' => 'Varify_user', 'function' => 'user_project', 'filename' => 'varify_project.php', …
Pavnish Yadav
  • 2,728
  • 3
  • 15
  • 14