codeigniter

CI+JQuery+Ajax problem

Calling the ajax called URL works well without ajax eg. http://localhost/ci/controller/method/param_value. But using ajax it doesnt work. Following are the code segment, i have just started with JQuery+Ajax with CI. Here is my controller: <?php class BaseController extends Controller{ public function BaseController(){ parent::Co...

Unit Testing Codeigniter Classes with fooStack - clashes

I'm having 'fun' testing interactions in a CodeIgniter based web app. It seems when running the entire test suite "phpunit AllTests.php" it loads all of the test classes, their targets (Systems under Test) and creates a PHPUnit_Framework_TestSuite instance which presumably iterates over the classes which extend CIUnit_TestCase and runs ...

How can I remove index.php using Codeigniter on XAMPP ?

I can't hide Codeigniter index.php on XAMPP 1.7.3 URL: http://localhost/Servidor/agentesRainbow/index.php/agentes/tony tony is an argument My actual .htaccess: <IfModule mod_rewrite.c> RewriteEngine On RewriteBase /Servidor/agentesRainbow/ #'system' can be replaced if you have renamed your system folder....

Debugging CodeIgniters 404 errors

I'm having a nightmare uploading my site to the production server. The site runs fine locally and on a staging server (exactly the same server, settings as the production site). However when I deploy to production I'm getting a 404 error from CI. CodeIgniters 404 error pages are frustrating because it seems as if i can't access other li...

Loading CI controller in PHP on the same server

How can include CodeIgniter content in a regular PHP page on the same server but not part of the CI app? For example I'm am trying to load a header from CI into Wordpress. Whats the best way to include a CI controller (eg; index.php/mycontroller/header/) on the same server? ...

Doctrine-based CodeIgniter authentication/acl system

I'm working on web app based on CodeIgniter/Doctrine. I've tested several auth libraries, but all of them use ActiveRecord. Is there a plugin/library that uses Doctrine, or can be adapted to Doctrine?! Or can I use both Doctrine and CodeIgniter in a project?! ...

codeigniter with flexgrid

I have just downloaded the flexigrid and examples and tried to execute. In the example, there is a function getCountries, which populates the grid with countries from the database… I tried this and it seems the flexigrid just keeps processing (it says processing and turns and turns)... Am i doing anything wrong. ThanX ...

Codeigniter Strip HTML tags from input

What is the best method to strip htnl tags from the input? How can i remove the HTML tags while validating the input $this->form_validation->set_rules('description', 'Description', 'trim|xss_clean'); Do I need to add custom call back method to validation rules? ...

CodeIgniter: placing PHP functions?

Hello, I'm still quite new to CodeIgniter and I was wondering, where should I place my PHP functions that has nothing to do with Controllers and Views, for example, a function that access a local file. Thank you. ...

paypal ipn working but stopping at 'thank you' page.

I am using the code for controller(CODEIGNITER): function paypal_tran(){ if (empty($_GET['action'])){ $_GET['action'] = 'process';} if($this->uri->segment ( 3 )){ $action=$this->uri->segment ( 3 ); } else{ $action='process'; } $ammount=39.99; $this->lenders_model->paypal_process(...

TinyMce + Ajax File Manager + Codeigniter = Little Problem

OK, I'm using the following: TinyMCE, CodeIgniter, and the TinyMCE Ajax File Manager. I can upload correctly and it looks pretty good. However, when I view the HTML (from TinyMCE), this is what I get. <img src="../../../data/page/verde_enfemera.jpg" alt="" /> What I need to be getting is the following: <img src="http://localhost/htt...

Application Profiling: Memory Usage

Hello all, I have switched on the Codeigniter profile (very useful) and I have noticed that a page of mine shows the memory used as: 2,405,496 bytes That's ~2MB and it's for one request - does it mean if 1000 users accessed this page at the same time, memory usage will be 2GB? Have I got my maths wrong or is there more to this t...

PHP inserting Apostrophes where it shouldn't

Hi folks Not too sure what's going on here as this doesn't seem like standard practise to me. But basically I have a basic database thingy going on that lets users submit code snippets. They can provide up to 5 tags for their submission. Now I'm still learning so please forgive me if this is obvious! Here's the PHP script that makes i...

How do you set the upload path for the Codeigniter upload library on a local machine?

I have the following path set as the upload_path for Upload library included with Codeigniter. $this->upload_config['upload_path'] = './uploads/working/'; This path works fine on the remote server. However, when I'm debugging locally, it fails. I have permissions set so the directory is writeable. I added logging to the upload li...

codeigniter differentiate field names in JOINed tables

Hi, I need to retrieve data from two tables. the first is a list of events, the second is a list of venues. I have a fields with the same name in both tables: events.venue (which is an ID) and venues.venue is the name of the place, say "blues bar". The tables can be joined on events.venue = venues.id. Snippet of my model: $this->db->...

Codeigniter - Call to undefined method CI_DB_mysql_driver::

I am getting this error "Fatal error: Call to undefined method CI_DB_mysql_driver::findVenueInfo()" when I try to use one of my models. I have a view with this anchor: echo anchor('welcome/searchVenue/' . $row->venue_id, $row->venue); which generates a link like: http://localhost/ci-llmg/index.php/welcome/searchVenue/1 the method ca...

Multi-Part form in Codeigniter

I'm building a survey w/ Codeigniter, and it's getting cumbersomely long...so I want to split it up into sections (about 5). If I want each section to validate, and submit to db after the user clicks "next", what is the best way to do this? I've never made a multi-step process before. Any advice for a noob? :) ...

Realpath not working with ../files ??

I am developing under wamp. echo realpath(APPPATH); C:\wamp\www\salsaritmo\system\application echo realpath(APPPATH . '..'); C:\wamp\www\salsaritmo\system echo realpath(APPPATH . '../files'); //(which is the one i want) returns nothing ...

How can I use htaccess to protect a subdirectory of codeigniter installation?

I have codeigniter installed at the root directory, and would like to have a subdirectory called "test" password protected using htaccess. I keep getting a "404 page not found" no matter what I try. The directory structure is: /public_html /css /images /system (codeigniter directory) /test .htaccess .htacce...

Multiple File upload doesnot work in CI

Hi I have used Jquery Plugin to upload multiple file with CI. It works fine for one file but if i try to upload more than one file it doesnot work it gives the result like this"menu_back9.pngmenu_back9.png.jpg". function do_upload() { $config['upload_path'] = './uploads/'; // server directory $config['allowed_types']...