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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 12,699
» Latest member: JerryCip
» Forum threads: 68,850
» Forum posts: 428,706

Full Statistics

Latest Threads
Axios POST requests and C...
Forum: General Help
5 minutes ago
» Replies: 0   » Views: 3
PHPbenchmarks.com
Forum: Choosing CodeIgniter
35 minutes ago
» Replies: 4   » Views: 665
CodeIgniter 4.0.0 Alpha.4...
Forum: News & Discussion
1 hour ago
» Replies: 12   » Views: 2,094
Hard working
Forum: Installation & Setup
3 hours ago
» Replies: 0   » Views: 16
Undefined property
Forum: General Help
5 hours ago
» Replies: 7   » Views: 105
Bug v3.1.9 MY_Controller
Forum: General Help
8 hours ago
» Replies: 1   » Views: 64
function being called twi...
Forum: General Help
Yesterday, 03:56 PM
» Replies: 9   » Views: 172
Email package protocols
Forum: CodeIgniter 4 Roadmap
Yesterday, 01:02 PM
» Replies: 4   » Views: 79
Cannot get the right encr...
Forum: General Help
Yesterday, 05:38 AM
» Replies: 0   » Views: 30
Migrate CI2 to CI3
Forum: Jobs
Yesterday, 04:25 AM
» Replies: 6   » Views: 262

 
  Troubles with PostgreSQL
Posted by: El Forum - 06-22-2007, 09:53 PM - Forum: Archived General Discussion - Replies (4)

[eluser]hrundel[/eluser]
Hi, all. I'm not long ago begin to use CodeIgniter, it's nice and light for understanding framework.
But when I face to some troubles when I try to work with postgresql.
I edited database.php as needed and when loading database library thereis no errors i.e. connecting and selecting database passed successfully, but such construction

Code:
$query = $this->db->query("SELECT * FROM some_table");
echo "<pre>";
var_dump($query);
echo "</pre>";
return empty result_array, although some_table not empty. I'm use latest version of codeigniter and version of postgresql sever is 8.0
Doe's enybody know reason of my trouble.
Thanks.


  Sessions....... :(
Posted by: El Forum - 06-22-2007, 08:33 PM - Forum: Archived Development & Programming - Replies (3)

[eluser]Unknown[/eluser]
I am taking a stab at CI, and I have hit a bit of a wall. I created a user login function in my user controller, and it works dandy right up until I navigate away from the landing after sucessfully authenticating. My sessions disapear.


I will be using sessions to secure pages, so if your session user id value is not populated then you will be redirected to log in. Anyhow here is what I have.

Code:
function login()
    {


    $this->load->library('validation');
        $this->load->helper('url');
    $this->load->library('session');

    if($_POST['username'])
    {
        $this->load->database();
            $query = $this->db->query("SELECT * FROM users WHERE username = '".$_POST['username']."' and password = '".md5($_POST['password'])."'");
        
        if($query->num_rows() > 0){
            //return true;
            $status = "0";
            
             foreach ($query->result() as $row)
                 {
                 $username = $row->username;
                 $id = $row->id;
            
                }
            
            $sid = array('id' => $id);
            
            
            $this->session->set_userdata($sid);
            $data['goodz'] = $this->session->userdata('id');
            $data['status'] = $status;
            }
                
                else {
                    $status = "1";
                    $data['status'] = $status;
                    $data['goodz'] = $this->session->userdata('id');
                    }    
        }
$this->load->view('login_vals',$data);
    }


  IIS + CI Problems!
Posted by: El Forum - 06-22-2007, 07:49 PM - Forum: Archived Development & Programming - No Replies

[eluser]Roosevelt![/eluser]
Hi there,
Recently I started to test out my CI products in IIS Server environment, and I noticed this problem. And I really hope somebody can help me solve this problem Smile.

If I visit CI Application homepage like (http://localhost/ci/) by not modifying config.php file, I get 404 Page Not found error.

Then if I change $config['uri_protocol'] = "AUTO"; to $config['uri_protocol'] = "PATH_INFO";

The welcome page loads just fine Smile.

However, if I visit http://localhost/ci/index.php/welcome, it doesn't work Sad. The error HTTP Error 502.2 - Bad Gateway by IIS.

Any ideas on how to fix this other than using query strings? I LOVE FRIENDLY URLS! Sad.


  How to effectively search in the userguide?
Posted by: El Forum - 06-22-2007, 02:05 PM - Forum: Archived General Discussion - Replies (13)

[eluser]baZzz[/eluser]
Hi all,

As a n00b to CI (and frameworks in general) I'm relying heavily on the (excellent) user guide. However, using it search function will almost always give me just 1 result in Google and that one is the change log. That's not helping me a lot, so is there another way of searching the user guide more effectively? (Or should I built a CI app for it? ;-) )


  modrewrite users
Posted by: El Forum - 06-22-2007, 01:04 PM - Forum: Archived Development & Programming - No Replies

[eluser]Unknown[/eluser]
is there anyway to mod rewrite users names? im trying to work out a social networking site.


  URL via javascript into CodeIgniter
Posted by: El Forum - 06-22-2007, 10:29 AM - Forum: Archived General Discussion - Replies (4)

[eluser]Doncqueurs[/eluser]
Hi,

I ran into a little problem and couldn't really find an answer in this forum. It seems like there has been a closely related issue a year ago, but unfortunately that didn't help me to solve the problem.

I try to do the following. With this piece of javascript I would like to add url and sitename to my application.

Quote:java_script:location.href='http://localhost/index.php/bookmarks/add/'+encodeURIComponent(location.href)+'/'+encodeURIComponent(document.title)

(bookmarks is the controller and add the function within the controller)
(Of course java_script should be javascript but I am not allowed to use that word in this forum (or at least it gets automatically removed)

This results in the following URL:

Quote:http://localhost/index.php/bookmarks/add/http&#x3A;&#x2F;&#x2F;www.codeigniter.com&#x2F;/CodeIgniter%20-%20Open%20source%20PHP%20web%20application%20framework

On the receiving end I have this script:
Quote:&lt;?php
class Bookmarks extends Controller {

function add($url, $name){ //
echo "URL: " . $url ."<br />";
echo "Name: " . $name;
}
}
?&gt;

If things were working fine this would display something like:
Quote:URL: http://www.codeigniter.com
Name: CodeIgniter

Instead I get:
Quote:Not Found

The requested URL /collaboration/index.php/bookmarks/add/http://www.codeigniter.com//CodeIgniter - Open source PHP web application framework was not found on this server.

Apache/1.3.33 Server at powerbook.local Port 80

Conclusion, it seems that CodeIgniter decodes the javascript urlencoded before it is told to do so. This results in requesting a URL that doesn't exist. Is there anybody who found a way to work around this?

Thanks, Jochem

PS. I tried to give full information I hope that I succeeded in it. In case you miss something please drop me a note. (I use a recent - last two weeks - download - last two weeks - of CodeIgniter).


  ociserverversion() error
Posted by: El Forum - 06-22-2007, 09:22 AM - Forum: Archived Development & Programming - No Replies

[eluser]phpworker[/eluser]
Hi there and thanks for Code Igniter framework! It's great :O

Here is my problem:

For about 2 days I am fighting with (suppose silly) error message that obstinately appears on the screen. This is the msg:

Code:
An Error Was Encountered

Unable to connect to your database server using the provided settings.

I am trying to connect with Oracle db using oci8 driver. I tested the connection on the same server with strip php code and I see another message:

Code:
Warning: oci_connect() [function.oci-connect]: OCIEnvNlsCreate() failed. There is something wrong with your system - please check that LD_LIBRARY_PATH includes the directory with Oracle Instant Client libraries in /usr/local/apache2/htdocs/krzysztofk/oracle.php on line 42

from time to time there's no error from oracle.php file at all and data is received from database.

Here is my oracle.php file source:

Code:
&lt;?php
$active_group = "default";

$db['default']['hostname'] = '(DESCRIPTION =
           (ADDRESS =
        (PROTOCOL = TCP)
        (HOST = 192.168.99.109)
        (PORT = 1521)
        (HASH =1111)
     )
         (CONNECT_DATA =(SID = devtst))
     )';
$db['default']['username'] = "ap";
$db['default']['password'] = "ap";
$db['default']['database'] = "devtst";
$db['default']['dbdriver'] = "oci8";
$db['default']['dbprefix'] = "";
$db['default']['active_r'] = TRUE;
$db['default']['pconnect'] = FALSE;
$db['default']['db_debug'] = TRUE;
$db['default']['active_r'] = TRUE;
$db['default']['cache_on'] = FALSE;
$db['default']['cachedir'] = "";
?&gt;

$db['default']['hostname'] value is taken originally from tnsnames.ora config file.

I also connect with db using Oracle PL/SQL Developers (from my computer) and everything is OK.

We have apache server on Fedora Linux and oci8 is already activated there.

I understand that this is Oracle-like problem and maybe I am knocking on wrong door, but if you see any solution here, please help!

We are planning to reinstall the server next week, so I want to be sure we do not get this error next time.

Thanks for your help!


  news story titles in urls
Posted by: El Forum - 06-22-2007, 08:54 AM - Forum: Archived Development & Programming - Replies (7)

[eluser]adrian westlake[/eluser]
I have been doing the tutorials, including the one to create a simple blog. At the moment the urls, use the unique id field as the last segment to point to the blog story. However, sites like digg seem to use the title of the story as the last segment in the url. How is this possible, bearing in mind the title is not a unique identifier?


  Wrong server timezone?
Posted by: El Forum - 06-22-2007, 08:19 AM - Forum: Archived Development & Programming - Replies (2)

[eluser]Unknown[/eluser]
I'm facing a strange problem with time in my application.
The server on which my project is hosted is in the UK (UTC) and I live in Italy (UTC + 1:00).
I'll explain my problem through examples.

time() on localhost = 12:00
time() on the UK server = 11:00

And that's OK. But if I use now() setting $config['time_reference'] = 'gmt' here's what I get:

now() on localhost = 10:00 (that's OK, -1 for the timezone and -1 for the daylight saving)
now() on the UK server = 09:00

Isn'that strange? I mean, GMT should be the same all around the world (in this case 10:00)...
UK has no timezone shift, GMT should be just -1 because of the daylight saving, shouldn't it?
And it's not a problem of CI's now() function, I get the same results with PHP's gmdate().
To get the correct time with gmt_to_local() I have to set $timezone to 'UP2', which isn't correct.

Is there something wrong with the UK server settings? can anyone with a project on a server in a different timezone than his own confirm this?
Or am I missing something about how all this time stuff work?

Thanks :-)


  How robust/(un)safe is CI
Posted by: El Forum - 06-22-2007, 04:48 AM - Forum: Archived General Discussion - Replies (4)

[eluser]johnman[/eluser]
I am a new user and i don't want to flame CI since i really like it a lot. But i personally think safety of any framework should be the prime concern so forgive me if i sound blunt. Its just because i want to get some clarity about this subject.

So far i am very impressed with how smooth everything goes with CI, but i am very worried about its robustness and safety. In a very recent topic (http://ellislab.com/forums/viewthread/53203/P0/) someone noted CI is NOT always escaping properly which can be a huge security risk (if i am not mistaken). The reason i am worried is because my assumption that CI was making my web-system safer might be incorrect. Now i believe the biggest security risk is actually CI itself. The escaping bug is very easy to see, even if you just briefly glance at the code, very easy to fix, but it is still in the current release. That makes me wonder how good the quality of the rest of the code is. Has it been reviewed by other professional people? How has it been used and tested ?

The second question is about the callback validation functions. You can use i.e. callback_username_check as a parameter for the validation class. So you need to make the function username_check for checking which is a PUBLIC function and therefore can be called from the browser. Shouldn't this function be private? I know you can fix it by using a double underscore, but this should at least be mentioned in the userguide. I'm not a real php programmer so i might be wrong but currently i come to the conclusion this is actually a design fault. It would be safer to have all functions private unless you explicitly make them public.

I only used CI intensively for a couple of days but if these 2 problems already arise, i am worried about how much more problems i am unaware of. I hope one of the developers can give some clarity about how much of a priority security is to them.
And please don't think this is some sort of rant for not supplying the update we all needed yesterday. I just try to give some context on why i am worried and reluctant to use CI as a framework.



  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2018 MyBB Group.