codeigniter

CodeIgniter: How to disable "index.php" in URLs completely (disallow it if manually entered in URL)

I'm using codeigniter and have been able to use url's without "index.php" in there, but if I manually type in "index.php", the urls still work. I'd like to disable access to "index.php/controller" type urls in order to avoid duplicate content penalty from Google. Here is what my current .htaccess file looks like: Options +FollowSymLink...

Fixing mod_rewrite and mod_alias conflict

I have a VirtualHost setup like this : Alias /somedir /some/other/dir http://example.com/somedir works fine However, I need to setup mod_rewrite for /somedir (a CodeIgniter app for which I want clean URLs). Here's the bit from the CodeIgniter wiki : RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQ...

Using multiple feeds in simplepie with codeigniter

I'm trying to get simplepie to loop through a few rss feeds using codeigniter but I can only get it to display the feed items from the last feed in the array. I think it is to do with the foreach loop in the _get_feed function but everything I've tried has failed to fix it. In my controller I have this class Main extends Controller{ ...

Opinions: CakePHP or CodeIgniter for eCommerce

I know there are many options out there for eCommerce and I know there are many opinions on these two frameworks that differ beyond belief. I am looking for thoughts on which framework would be easier to use to create a site that will be used to sell prints of photos. The prints will be sold in various sizes, each size being added to th...

Does xdebug work with CodeIgnitor (after adding URI routing rules)?

I had xdebug/Netbeans and CodeIgnitor 1.7.2 working. After I added some new routes (in the "routes.php" config file), my app still works fine. But now xdebug crashes in the CI_router class. _set_routing() method is called. _parse_routes() is called. _set_request() is called _validate_request() is then called and produces a 404 messa...

Show errors before redirect

Hi all! When i do a redirect, no errors are shown. I use codeigniter framework and there's error_reporting(E_ALL); ini_set('display_errors', 1); in my index.php file. When something is breaking in my code(e.g.some 'undefined index' error) and i do a redirect to another page - the error isn't showing. How to avoid this - break the red...

CSS Parser in CodeIgniter

Hi guys, is there any CSS parser in the CodeIgniter Framework? If not: Where should I store my PHP file for parsing css (neat solution)? In the webroot? ...

First attempt at ajax, script not being seen?

I've been coding with php/CI for a bit now and am starting to get the hang of it, but I'm trying to make the leap to use jQuery + some ajax stuff and I can't seem to get it to work. It's like the the script isn't even being seen. What I'd like it to do is to call the java/test function when the user clicks the submit button. I'd like ...

How to integrate phpThumb into a CodeIgniter application's architecture?

I'd like to use phpThumb ( http://phpthumb.sourceforge.net/ ) on my view layer to automatically size some images. What's the recommended way to integrate phpThumb into the CodeIgniter architecture? Has anyone done this already and found that you prefer one method of integration over another? I'm basically looking for opinions on using ...

Codeigniter and multiple inheritance

I've been using Codeigniter to construct the front end of a moderately sized application, and have run into an issue with--what I think may be--inheritance in PHP. Here is what I am trying to do: In following the MVC architecture, I found that I was duplicating a lot of code across models, and decided to create a common Model from which...

CodeIgniter image manip. script mixing up file names

This is from a CodeIgniter application that uses its image manipulation library. $photos contains an array of relative photo paths. This script should resize the original and also create a medium (_m) and small (_s) size. When I only send one photo to the script, everything works great. When I send a second, things get screwed up - th...

Codeigniter Active Record inside custom library class

My function breaks at the line where I make an Active Record call, so I must not be calling things right. <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); Class Stuff { public function specific($passedArray) { echo "Test"; $CI =& get_instance(); $CI->load->database(); ...

image resize in runtime with codeigniter(php)

I have uploaded an image with the resolution 1600x1200. How can I show users 60x60 and 200x200 without creating thumbnails and uploading again. (like phpthumb library) in CodeIgniter? ...

Why are there pluses ( + ) in my oAuth tweets?

Ive cracked oAuth and have my class file for it. I'm at the last stage of posting a tweet and all works except all the words are joined with a plus sign in the tweet. Changing anything results in the signature been incorrect and twitter returns 401 error. So how does one remove the pluses? Post function below: function post($token, $t...

Default Controller not loading after rerouting

I have a codeigniter multistie install where I have such code that I can serve sites with such links site.com/sites/sitename/controller/function/vars site.com/controller/function/vars/ subdom.site.com/controller/function/vars the challange is that , whith the routing $route['sites/([^/]+)/(.*)'] = '$2'; $route['default_controller']...

has anyone comes with new solution for codeigniter and uploadify session problem

Hello i know that this is a famous question and have been asked many times. but i want to ask if there is any new solution for uplodify and codeigniter problem when we use codeigniter session library. i know that flash doesn't forward browser cookies with its request. and i saw many solutions to send the session data as a parameter wit...

How do I do this query with ActiveRecord Class from Code Igniter?

I need to increment the number of comments on an Entries Table, the SQL for this would be: UPDATE entries SET comments = comments + 1 WHERE entry_id = 123; And i was wondering how to do this using Active Record Class form Code Igniter. http://codeigniter.com/user_guide/database/active_record.html#update ...

Codeigniter white page

Strange issue: Last night I changed the Arecord and CNAME for a CI site of mine. Now that the changes have propagated and the site runs off a new server, domain.com just gives a blank page. There is nothing in the CI logs (level set to 3). Even a die('test') in the CI root index.php does not appear. But, domain.com/index.php shows the h...

How can I manage this CodeIgniter/PHP + Subversion workflow?

Hi folks, Sorry if this is a really easy question or something. As you can tell, I'm a complete novice to Subversion (but hey, we all have to start somewhere, right?). So I've setup Subversion using Beanstalk + Coda for my webapp, which up until now I've just been managing locally and manually. So I've got it set up successfully and in...

Post js array to php @jquery @codeigniter

Hi, i'm trying to pass a javascript array to a php controller ( i'm using codeigniter ) with ajax post method. Data seems to be sent but $_POST['data'] is not known. This is the code : JAVASCRIPT: function update_order(){ var ordre_column1 = $('#column1').sortable('toArray'); var data = serialize(ordre_column1); $.post('../../controll...