Welcome Guest, Not a member yet? Register   Sign In
  upload all kind of images
Posted by: El Forum - 01-29-2008, 07:55 AM - Replies (2)

[eluser]Justin Patel[/eluser]
Hello friends


How can we allow all kind of image upload ...


  Using FreakAuth
Posted by: El Forum - 01-29-2008, 07:50 AM - Replies (4)

[eluser]GreenDude[/eluser]
Hi.

I just tried the new FreakAuth, went through the docs several times, and I can't quite get it.

My goal is to have a login box somewhere in my page (or in a new page) and I need the admin hierarchy also. I'm fairly new to CI, and it took me a while to understand all the modifications that came with the install, but really weird stuff happened in the end. I would log in with the super admin, and after leaving the admin page it would become blank if I try to access it again. I tried to embed the auth check in my functions but that didn't really work either.

Can you please advise me on what to do/read or where I can find easier or clearer examples?

Cheers,
GreenDude


  $_POST and PHP version
Posted by: El Forum - 01-29-2008, 06:26 AM - Replies (2)

[eluser]Lobosaurus[/eluser]
Hi, I am using something like this in my script:

Code:
foreach ($_POST as $key => $value)

OR

count($_POST);
...

I tried my script on two different servers: one with PHP4 and second with PHP5.

With PHP4 everythinkg runs correctly, but the same script with PHP5 writes error:

Code:
A PHP Error was encountered

Severity: Notice

Message: Undefined variable: _POST

Filename: libraries/Profiler.php

Line Number: 153

... although script works with submited $_POST values.

There are more differences: PHP4 version shows posted data in Benchmark but PHP5 version shows that no POST data are available. Strange.


  Extending/Replacing Controller
Posted by: El Forum - 01-29-2008, 06:12 AM - No Replies

[eluser]BizComputing[/eluser]
The manual states:

Note: The Database classes can not be extended or replaced with your own classes, nor can the main Controller class. All other classes are able to be replaced/extended.

I've had complete success with extending the Controller class. This statement in the manual may need to be updated.


  Database Config Load Question
Posted by: El Forum - 01-29-2008, 05:32 AM - Replies (5)

[eluser]ChrisMiller[/eluser]
Ok basically I am sure I am just skipping over it somewhere but what I want to do is use the ci database library twice in a controller, when the script is loaded it connects to the database in the config file which is easy to do but then I want to connect to a seperate database using a config specified in file... so the result is $this->db-> = the normal database and $this->app_db = the new loaded database....? any ideas? also I cant just put the config values in the database config file as they are loaded from a database depending on what user is accessing the app.

Code:
$config['hostname'] = "localhost";
$config['username'] = "myusername";
$config['password'] = "mypassword";
$config['database'] = "mydatabase";
$config['dbdriver'] = "mysql";
$config['dbprefix'] = "";
$config['pconnect'] = FALSE;
$config['db_debug'] = TRUE;
$config['active_r'] = TRUE;

$this->load->database($config);
How can I get that so it can be loaded via a diffrent class name like I can do with my libraries. ie $this->db2->


  .htaccess + removing index.php not working + The requested URL /about/ was not found on this server.
Posted by: El Forum - 01-29-2008, 03:48 AM - Replies (2)

[eluser]Unknown[/eluser]
Hello,

my sites url is
http://www.loyalto.com/

I have used following code in my htaccess file,--

RewriteEngine on
Options +FollowSymlinks
RewriteBase /
RewriteCond %{HTTP_HOST} ^(.+)\.loyalto\.com [NC]
#RewriteCond %{HTTP_HOST} !www\.loyalto\.com [NC]
RewriteCond $1 !^(index\.php|images|video|photos|js|AFLAX|css|robots\.txt)
RewriteRule ^(.*)$ /index.php/groupSite/domain/mukesh/$1 [L]

But when I am trying with
http://www.loyalto.com/about/
it is showing error- The requested URL /about/ was not found on this server.

If i put index.php in the url it is working.(http://www.loyalto.com/index.php/about/).

And
I have also tried with simple htaccess file like,

RewriteEngine on
RewriteCond $1 !^(index\.php|images|video|photos|js|AFLAX|css|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]


But it is still not working...

Can any one helps me..

Nilesh.


  Interrelational results in several pages
Posted by: El Forum - 01-29-2008, 01:31 AM - Replies (7)

[eluser]agartzia[/eluser]
Hi!

I'm coding a large application that uses several tables with all the information interrelated. From a table I take several values, and some of them can point to another table. For example, the table USERS has a field like "range" where it's set the range id. With this id I can check out the table RANGES and find out what the user can and can not do.

This is all set in several pages (users.php, ranges.php...). All pages have their own search methods. I used to link the range value to the ranges.php page, so anyone could click the link and look at the result in the ranges.php page, like this

Code:
<a href="ranges.php?search[id_range]=&lt;?=$data['range'];?&gt;">&lt;?=$data['range'];?&gt;</a>
where the search values were taken from GET values.

Now I'm using CI and I'm trying to make some similar, but GET is disabled and I would like to keep it that way.

How can I manage to inter-relationate pages with simple links?

Thanks!


  Problems with uri routing
Posted by: El Forum - 01-29-2008, 01:30 AM - Replies (14)

[eluser]emperius[/eluser]
I made a function in the helper for the information output depending on the url
this helper is loaded automatically

however when i try to get current segments in the url (like $this->uri->segment(1)) i get a bug:

Code:
Fatal error: Using $this when not in object context in

is there any solution of the problem?


  Display validation message seperately
Posted by: El Forum - 01-29-2008, 01:10 AM - Replies (7)

[eluser]cinewbie81[/eluser]

Code:
______________________
|        |           |
|        |           |    
|        |           |    
|        |           |    
|    A   |    B      |    
|        |           |
|        |           |
|        |           |    
|        |           |    
|________|___________|

I have a form as shown above.

'A' is the registration module and has the fields such as Name, IC Number, Phone Number, Email etc

Whereas 'B' is the login module with 'username' and 'password' fields.

Both of them are under the same form.

'A' has its own validation, and i want the validation error to be displayed above 'A'.
Whereas 'B' has its own validation and the validation error need to be displayed above 'B'.

My current code will display both validation error on top of 'A' and 'B' together. I want it to be seperately, for eg: Login Validation error will only display the validation message on top of 'B' but not in 'A' ...

Anyone?


  Extending database class
Posted by: El Forum - 01-29-2008, 12:56 AM - Replies (5)

[eluser]agartzia[/eluser]
Hi! I'm trying to extend the database class (I'm using MySQL), but don't know where I'm going wrong...

Code:
//
// file: application/libraries/MY_CI_DB_mysql_driver.php
//
class MY_CI_DB_mysql_driver extends CI_DB_mysql_driver {

    function get_num_rows() {
    
        if ($table != '')
        {
            $this->from($table);
        }
        
        unset($this->limit);
        
        $sql = $this->_compile_select();

        $result = $this->query($sql);
        
        return $result->num_rows();
    
    }//end function

}//end class

And in the controller...
Code:
$config['total_rows'] = $this->db->get_num_rows();

But I get...
Quote:Fatal error: Call to undefined method CI_DB_mysql_driver::get_num_rows() in \system\application\controllers\of.php on line 48

How I'm supposed to extend the database library?

Thanks!


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

Username
  

Password
  





Latest Threads
Is it possible to go back...
by ejimenezo
4 minutes ago
Error / Shield 1.0.3 + Ci...
by kcs
4 hours ago
SQL server connection not...
by davis.lasis
4 hours ago
Validation | trim causes ...
by Gary
6 hours ago
Problem with session hand...
by Julesb
7 hours ago
External script access to...
by PomaryLinea
7 hours ago
VIRUS reported after Chro...
by InsiteFX
Yesterday, 11:34 PM
Codeigniter4 version 4.5....
by kenjis
Yesterday, 04:10 PM
Cannot access protected p...
by xsPurX
Yesterday, 02:10 PM
Update to v4.5.1, same us...
by xsPurX
Yesterday, 08:31 AM

Forum Statistics
» Members: 85,490
» Latest member: bet88hair
» Forum threads: 77,583
» Forum posts: 376,018

Full Statistics

Search Forums

(Advanced Search)


Theme © iAndrew 2016 - Forum software by © MyBB