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



Search Forums

(Advanced Search)

Forum Statistics
» Members: 9,137
» Latest member: [email protected]
» Forum threads: 66,357
» Forum posts: 416,210

Full Statistics

Latest Threads
Get data from cookie on s...
Forum: Libraries & Helpers
3 hours ago
» Replies: 2   » Views: 93
Cannot delete from databa...
Forum: General Help
4 hours ago
» Replies: 0   » Views: 11
Replacing Core Classes No...
Forum: CodeIgniter 3.x
4 hours ago
» Replies: 5   » Views: 103
I have two tech arguing o...
Forum: Best Practices
4 hours ago
» Replies: 3   » Views: 157
Get data from cookie on s...
Forum: General Help
5 hours ago
» Replies: 0   » Views: 9
Database Error
Forum: Libraries & Helpers
5 hours ago
» Replies: 0   » Views: 20
Multiple Database Connect...
Forum: Libraries & Helpers
6 hours ago
» Replies: 2   » Views: 78
How to use phpseclib by c...
Forum: Addins
8 hours ago
» Replies: 3   » Views: 771
A Simple Forum Software b...
Forum: CodeIgniter 4 Discussion
10 hours ago
» Replies: 12   » Views: 1,077
Project Update - 2017.07....
Forum: News & Discussion
10 hours ago
» Replies: 12   » Views: 3,366

  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)

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)

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.

  permitted_uri_chars single quote
Posted by: El Forum - 06-22-2007, 04:34 AM - Forum: Archived Development & Programming - Replies (3)

I need to add single quote in permitted_uri_chars in config.php. How do I do that? I tried several things (' \' and others), but it did not work.

I get the following error:
Severity: Warning

Message: preg_match() [function.preg-match]: Compilation failed: range out of order in character class at offset 17

Filename: libraries/Router.php

Line Number: 408

I am using ajax to pass on the string to the controller.


  database problem. Help me!
Posted by: El Forum - 06-22-2007, 04:11 AM - Forum: Archived Development & Programming - Replies (4)

I want to get value of 1 table via id of 2 table. I have tried to use join() query command to solve but it not effective and display this error:

Quote:An Error Was Encountered
Unable to load the requested language file: language/db_lang.php
This is my code:
        //$this->db->select('Ten');// field name of another table
        $this->db->join('thanhpho','ThanhPhoID = ThanhPhoID');// join 2 table
        $this->db->orderby('HoahauID desc');
How can i get the value of a table which have related with another table? Tell me please..

  Please help me this code :()
Posted by: El Forum - 06-22-2007, 03:42 AM - Forum: Archived Development & Programming - Replies (6)

I have built a controller that it included one function doUpload, like this:

class Dangky extends Controller {
    function Dangky()
        $this->load->model('tintuc_model', 'tintuc');
        $this->load->model('dangky_model', 'dangky');
    function index()
                $this->load->view('upload_form', array('error' => ' ' ));
                // and something...
        function doUpload()
            $config['upload_path'] = '/uploads/';
            $config['allowed_types'] = 'gif|jpg|png';
            $config['max_size']    = '100';
            $config['max_width']  = '1024';
            $config['max_height']  = '768';
            $this->load->library('upload', $config);
            if ( ! $this->upload->do_upload())
                $error = array('error' => $this->upload->display_errors());
                $data['content'] = $this->load->view('dangky', $error, true);
            $contain_array = array('upload_data' => $this->upload->data());
                $this->db->set('file_name', $upload_data['file_name']);
                $this->load->view('dangky', array('error' => ' ' ));    
and this is my form :
            <?=form_open_multipart('dangki/doUpload'); ?>
          <table cellspacing="0" cellpadding="5" width="100%" border="0">
              <col width="30%" />
              <col width="70%" />
                  <td align="right">(<strong>*</strong>) Ảnh chân dung: </td>
  <td align="left">&lt;input id="fileUpPoitrait" type="file" name="fileUpPoitrait" /&gt;</td>
                  <td align="right">(<strong>*</strong>) Ảnh toàn thân: </td>
  <td align="left">&lt;input id="fileUpFullPicture" type="file" name="fileUpFullPicture" /&gt;</td>
                  <td align="right"> Xác nhận của nhà   trường: </td>
  <td align="left">&lt;input id="fileUpCertificate" type="file" name="fileUpCertificate" /&gt;
My form have 3 field wait to upload. i tried to solve my controller to save filename into database and store the image into some folder so that i can load it out to my page later. I dont know how to solve the path of the file name(it's save a full path of the image when upload). Please tell me how to perform it. I have read in user guide of CI but it's too simple and cannot resolve my problems.

  URI Segment.
Posted by: El Forum - 06-22-2007, 03:29 AM - Forum: Archived Development & Programming - Replies (9)

Was wondering how do I find out what the current URI segment 3 is equal to...?

Basically I have a header that gets pulled into different pages, and usuing that header I want to know what the current page is so I can place a bit of code into the header that will relate to the page,
FYI, using variables will not work, I have multiple places to place the code, each being different for the different pages.

  Integrate Facebook Php Client
Posted by: El Forum - 06-22-2007, 12:56 AM - Forum: Archived Development & Programming - Replies (30)

Trying to integrate Facebook Php Client to Igniter. Any suggestions on how to do that? Copying their files to system/libraries does seems to work for me.



Posted by: El Forum - 06-21-2007, 08:05 PM - Forum: Archived General Discussion - Replies (4)


I have a application with a menubar anda a secundary left menu that is called by a simple innerHTML javascript.
the code is

the extract of view file:

<div id="menu">
<ul id="menubarra">
<li>&lt;a onclick="montamenu('ensino')"&gt;ensino</a></li>
<li>&lt;a onclick="montamenu('pesquisa')"&gt;pesquisa</a></li>
<li>&lt;a onclick="montamenu('extensao')"&gt;extens&atilde;o</a></li>
<div id="menuesquerda"> // the div to put the secundary menu.

the javascript code:

function montamenu(menu) {
if (menu=='ensino') {
var leftmenu = "<ul><li><a href="+base_url+"ensino/habilitacoes>habilita&ccedil;&otilde;es</a></li>"+
"<li><a href="+base_url+"ensino/disciplinas>disciplinas</a></li>"+
"<li><a href="+base_url+"ensino/docentes>docentes</a></li>"+
"<li><a href="+base_url+"ensino/vestibular>Informa&ccedil;&otilde;es ao vestibulando</a></li></ul>"
} else if (menu=='pesquisa')
var leftmenu = "<ul><li><a href="+base_url+"pesquisa/projetos>Projetos em Andamento</a></li>"+
"<li><a href="+base_url+"pesquisa/publicacoes'>Publica&ccedil;&otilde;es</a></li>"+
"<li><a href="+base_url+"pesquisa/tcc>TCC&acute;S dos Alunos</a></li></ul>"
else {
var leftmenu = "<ul><li><a href="+base_url+"extensao/projetos>Projetos em Andamento</a></li>"

the question is:

In the firefox browser everething is ok but they don´t work in IE.

Someone could help?

  Controllers in Two-Level Sub Directory Fail!
Posted by: El Forum - 06-21-2007, 06:50 PM - Forum: Archived Development & Programming - Replies (2)

[eluser]Phil Sturgeon[/eluser]
I have most of my controllers in /controllers/admincp/ as this is the biggest part of my system. However with the increase in files, i tried making another subdirectory /controllers/admincp/settings/ and no joy.

Tried making /admincp/test/stuff with in index() that runs echo "poo"; but nothing there either, I just get 404 every time.

I assume this is not personal error, is this a bug others have ever run into?

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