Welcome Guest, Not a member yet? Register   Sign In
  Remove index.php with htaccess: works on server, not in WAMP
Posted by: El Forum - 04-03-2008, 11:39 AM - Replies (6)

[eluser]codex[/eluser]
Ok, I'm a complete noob when it comes to htaccess, but I have this rule:

Code:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]

Works fine on the live server, but not in WAMP. Is there something missing in the rule?

Any help greatly appreciated!!

EDIT: I guess mod_rewrite has to be enabled in WAMP, but when I look at the modules there's no mod_rewrite, but there IS a rewrite_module. Is this the same?


  A MySQL table definition diff tool?
Posted by: El Forum - 04-03-2008, 10:47 AM - Replies (2)

[eluser]Daniel H[/eluser]
Guys -

OT from CodeIgniter here, but can anyone think of a tool that compares the definition of two MySQL databases and generate the appropriate MySQL statements to amend the tables of the 'target' database while leaving the data untouched?

Any ideas?

Thanks,

Dan.


  Unable to connect to database
Posted by: El Forum - 04-03-2008, 10:15 AM - Replies (1)

[eluser]Unknown[/eluser]
Hi,

Just downloaded CI and ran through the intro. I am evaluating
a few frameworks, and I like what I see.

Problem is, I can't connect to a MySQL database, so I must be missing
something, or just as likely, doing something rather stupid.

I have tried all three methods described in the manual - i.e., set
the values in database.php, use autoload; set values in database.php
explicitly load by passing TRUE as 3rd param to model class. And then
tried to load explicitly from both controller and model classes.

I've tried with dbdriver set to both mysql and odbc. The results of
all of these 8 attempts have been identical. Incidently, I get the
same result when I try to use the scaffold facility.

Anyway the result that is displayed in the browser is:

An error occurred while loading http://bigmax.ipc.com/CodeIgniter/index.php/trader:
Connection to host bigmax.ipc.com is broken.

This is on CI 1.6.1, RHEL8, MySQL 5.0.45, unixODBC 2.2.12 PHP 5.2.4, Apache 2.2.6

If sample code will help, I will send it in.

Thanks much


  help with mod_rewrite
Posted by: El Forum - 04-03-2008, 10:12 AM - Replies (2)

[eluser]dexter21[/eluser]
Hi, i've a virtual directory in a server:

http://date1.server1.com
localdir :/usr/dates1
codeigniter dir :/usr/dates1/codeig1

i've uploaded ci and config the config. file with the base_url

if i launch http://date1.server1.com/codeig1/ it load the default view that i've write in the routes files, but if i type http://date1.server1.com/codeig1/test.php i get and error that doesnt exist file.

i have a test.php controler that load the view test.php . so i think there is a problem with the mod_rewrite


any help plz?


  get(), with limit dont work??
Posted by: El Forum - 04-03-2008, 09:24 AM - Replies (4)

[eluser]Lucas Caleto[/eluser]
Hi Guys, me again...

i am try this on my model:

$query = $this->db->get('produtos',0,3);
return $query;

And nothen come back




when i use this:

$query = $this->db->get('produtos');
return $query;

work, but i need to control this limit's


i dont understand the problem

some one can help me ?

thanks

Lucas


  Advice on a CMS
Posted by: El Forum - 04-03-2008, 08:48 AM - Replies (5)

[eluser]meigwilym[/eluser]
Hi all,

I'll soon be building my first custom CMS with CI. Before I start I thought I'd ask the community for your advice on a few things. I don't want anyone to do any coding for me, I just want some pointers.

First of all, the CMS will be bilingual - does anyone have any experience of this?

How do I integrate a WYSIWYG editor into a page? I also need to inculde user's images in the text.

I want a simple system for admin logging in/out - what are your recommendations? Sentry? Erkana? There will probably be only 1-2 admins so this does not need a fully fledged user management system.

Thanks for your help.

Mei


  Unexpected NULL returned in AR delete()
Posted by: El Forum - 04-03-2008, 08:33 AM - No Replies

[eluser]barbazul[/eluser]
I think this is more a documentation issue that an actual bug, but, when you call the active record method delete() passing an array of tables the return value is NULL which doesn't say much about how well it worked.
I can see why it doesn't make a lot of sense to return TRUE if all went well or FALSE in case one failed because there is nothing you can do about it at that point but at least there should be some documentation about this.

IMHO the best approach would be to always return TRUE and make a note in the documentation mentioning this special case.

BTW, there is a typo in the docs:

An array of table names can be passed into delete() if you would like to delete data from more then 1 table.

More info


  Oracle issues
Posted by: El Forum - 04-03-2008, 07:49 AM - Replies (3)

[eluser]iffs[/eluser]
First, good day to all!

Now, let's go to business. I'm trying to create a simple application with CI, with 2 databases, one in Oracle, and the other in PostgreSQL. I've managed to successfully connect and perform queries to both databases, thanks to what I've found in these two posts:

http://www.abbett.org/2007/12/02/using-o...deigniter/
http://ellislab.com/forums/viewthread/74105/

I've had issues with Oracle, returning an unnumbered error, then the errors listed in the first site, and finally errors with multiple queries. So the first question is: will all these changes apply to CI? Are they indeed correct? These changes worked fine for me. :lol:

Another thing, now about encoding. Both of the databases have LATIN1 encoding. The code I used for testing follows:

First, the Controller:

Code:
<?php
    class Noticia extends Controller {
        
        function Noticia() {
            parent::Controller();
        }
        
        function index() {
            $db = $this->load->database('seguranca', TRUE);
            $data['query'] = $db->get('unidades_federais');
            $data['query2'] = $db->get('s_pessoa');
            $this->load->view('noticia_view', $data);
        }
    }
?>

Then, the view:

Code:
<html>
    <head>
        <title>Componente de noticias</title>
    </head>
    <body>
        <ul>
            &lt;?php if($query->num_rows() > 0) : ?&gt;
                &lt;?php foreach($query->result() as $uf) : ?&gt;
                    <li>&lt;?= $uf->SIGLA ?&gt; - &lt;?= $uf->UNIDADE ?&gt;</li>
                &lt;?php endforeach; ?&gt;
            &lt;?php endif; ?&gt;
        </ul>
        <hr>
        <ol>
            &lt;?php if($query2->num_rows() > 0) : ?&gt;
                &lt;?php foreach($query2->result() as $pessoa) : ?&gt;
                    <li>&lt;?= $pessoa->NU_CPF ?&gt; - &lt;?= $pessoa->NO_PESSOA ?&gt;</li>
                &lt;?php endforeach; ?&gt;
            &lt;?php endif; ?&gt;
        </ol>
    &lt;/body&gt;
&lt;/html&gt;

And finally, my database connection settings:

Code:
&lt;?php  if (!defined('BASEPATH')) exit('No direct script access allowed');
/*
| -------------------------------------------------------------------
| DATABASE CONNECTIVITY SETTINGS
| -------------------------------------------------------------------
| This file will contain the settings needed to access your database.
|
| For complete instructions please consult the "Database Connection"
| page of the User Guide.
|
| -------------------------------------------------------------------
| EXPLANATION OF VARIABLES
| -------------------------------------------------------------------
|
|    ['hostname'] The hostname of your database server.
|    ['username'] The username used to connect to the database
|    ['password'] The password used to connect to the database
|    ['database'] The name of the database you want to connect to
|    ['dbdriver'] The database type. ie: mysql.  Currently supported:
                 mysql, mysqli, postgre, odbc, mssql
|    ['dbprefix'] You can add an optional prefix, which will be added
|                 to the table name when using the  Active Record class
|    ['pconnect'] TRUE/FALSE - Whether to use a persistent connection
|    ['db_debug'] TRUE/FALSE - Whether database errors should be displayed.
|    ['cache_on'] TRUE/FALSE - Enables/disables query caching
|    ['cachedir'] The path to the folder where cache files should be stored
|    ['char_set'] The character set used in communicating with the database
|    ['dbcollat'] The character collation used in communicating with the database
|
| The $active_group variable lets you choose which connection group to
| make active.  By default there is only one group (the "default" group).
|
| The $active_record variables lets you determine whether or not to load
| the active record class
*/

$active_group = "default";
$active_record = TRUE;

$db['default']['hostname'] = "10.1.1.34";
$db['default']['username'] = "mmacorporativo";
$db['default']['password'] = "*********";
$db['default']['database'] = "adsi";
$db['default']['dbdriver'] = "postgre";
$db['default']['dbprefix'] = "";
$db['default']['pconnect'] = TRUE;
$db['default']['db_debug'] = TRUE;
$db['default']['cache_on'] = FALSE;
$db['default']['cachedir'] = "";
$db['default']['char_set'] = "latin1";
$db['default']['dbcollat'] = "latin1_general_ci";

$db['seguranca']['hostname'] = "//10.1.1.46/mmadsv";
$db['seguranca']['username'] = "systemsecurity";
$db['seguranca']['password'] = "********";
$db['seguranca']['database'] = "mmadsv";
$db['seguranca']['dbdriver'] = "oci8";
$db['seguranca']['dbprefix'] = "";
$db['seguranca']['pconnect'] = TRUE;
$db['seguranca']['db_debug'] = TRUE;
$db['seguranca']['cache_on'] = FALSE;
$db['seguranca']['cachedir'] = "";
$db['seguranca']['char_set'] = "latin1";
$db['seguranca']['dbcollat'] = "latin1_general_ci";
?&gt;

Some results in my page are as follows:

Gerencia de Conservac?o da Biodiversidade (SBF/DCBIO)
Gerencia de Gest?o de Recursos Geneticos (SBF/DCBIO)
Gerencia de Gest?o de Recursos Pesqueiros (SBF/DCBIO)
SBF/DCBIO/PROBIO II - Projeto de Conservac?o e Uso Sustentavel da Biodiversidade e Ac?es Integradas, Publicas/Privadas para Biodiversidade (SBF/DCBIO)

It does not matter which browser encoding I choose, the ? characters still appear. Can you help me with this one?

Thanks to all, and happy coding!!

Igor Felix


  Announcement: The CodeIgniter Directory is live !
Posted by: El Forum - 04-03-2008, 07:43 AM - Replies (21)

[eluser]Référencement Google[/eluser]
Hi all,

"The CodeIgniter Directory" is a new website that has the goal to become a centralized point to find resources for CodeIgniter:

http://www.codeigniterdirectory.com/

You can register and add your link (if it talks about CodeIgniter of course)
If you are missing categories, you will be able to suggest it once you have registered.

At this stage it's again very incomplete and I have again a big list of links to enter, but I am also open to your ideas, suggestions, etc.

I am sure that you will enjoy it, let me know !


  how to stop sessions being updated?
Posted by: El Forum - 04-03-2008, 06:28 AM - Replies (1)

[eluser]steel_slasher[/eluser]
i realised that when a session is updated all the userdata is removed and i cant think a way to stop this without setting the "sess_time_to_update" variable to 2 years.


Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





Latest Threads
Getting supportedLocales ...
by kcs
1 hour ago
Codeigniter Shield Bannin...
by xsPurX
3 hours ago
Best way to create micros...
by InsiteFX
7 hours ago
Component help
by FlashMaster
9 hours ago
Show logo in email inbox
by WiParson
10 hours ago
Limiting Stack Trace Erro...
by byrallier
Yesterday, 02:21 PM
Bug with sessions CI 4.5....
by ALTITUDE_DEV
Yesterday, 01:36 PM
codeigniter 3.0.1 equiped...
by JustJohnQ
Yesterday, 10:05 AM
Display a custom error if...
by b126
Yesterday, 06:22 AM
Type error in SYSTEMPATH\...
by DXArc
Yesterday, 06:20 AM

Forum Statistics
» Members: 85,210
» Latest member: Gacor4D
» Forum threads: 77,575
» Forum posts: 375,964

Full Statistics

Search Forums

(Advanced Search)


Theme © iAndrew 2016 - Forum software by © MyBB