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

Username/Email:
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 8,143
» Latest member: Yacine31
» Forum threads: 65,659
» Forum posts: 412,929

Full Statistics

Latest Threads
CodeIgniter 3.1.4 release...
Forum: News & Discussion
19 minutes ago
» Replies: 12   » Views: 3,176
Add option in select and ...
Forum: General Help
2 hours ago
» Replies: 0   » Views: 18
Session: Error while tryi...
Forum: CodeIgniter 3.x
3 hours ago
» Replies: 11   » Views: 2,183
Combine input val ajax fr...
Forum: General Help
3 hours ago
» Replies: 1   » Views: 37
CI4 Database Pessimistic ...
Forum: CodeIgniter 4 Feature Requests
4 hours ago
» Replies: 1   » Views: 50
Class stdClass not found
Forum: General Help
6 hours ago
» Replies: 2   » Views: 26
Want a Codeigniter Query
Forum: General Help
9 hours ago
» Replies: 2   » Views: 115
CodeIgniter has some erro...
Forum: General Help
9 hours ago
» Replies: 3   » Views: 105
Exact location of CI file...
Forum: Installation & Setup
Yesterday, 10:10 PM
» Replies: 10   » Views: 111
No Controller Call In Con...
Forum: CodeIgniter 4 Feature Requests
Yesterday, 05:59 PM
» Replies: 0   » Views: 40

 
  Codeigniter file upload ajax Question
Posted by: wolfgang1983 - 03-15-2017, 08:39 PM - Forum: General Help - No Replies

I have this ajax code below I would like to be able to hide the once the progress bar has reached 100 %;

Not sure where best to place it.

$('.progress').show();


Code:
var inputFile = $('input[name=file]');
var uploadURI = "<?php echo base_url('question/ask/upload_attachment');?>";
var progressBar = $('#progress-bar');

$('#button-upload input[name="file"]').on('change', function() {

    var fileToUpload = inputFile[0].files[0];    

    if (fileToUpload != 'undefined') {
        // provide the form data
        // that would be sent to sever through ajax
        var formData = new FormData();
        formData.append("file", fileToUpload);

        // now upload the file using $.ajax
        $.ajax({
            url: uploadURI,
            type: 'post',
            data: formData,
            processData: false,
            contentType: false,
                success: function() {
            },
            xhr: function() {
                var xhr = new XMLHttpRequest();
                xhr.upload.addEventListener("progress", function(event) {
                    if (event.lengthComputable) {
                            var percentComplete = Math.round( (event.loaded / event.total) * 100 );
                            // console.log(percentComplete);
                            
                            $('.progress').show();
                            
                            progressBar.css({width: percentComplete + "%"});
                            progressBar.text(percentComplete + '% completed');

                        };
                    }, false);

                return xhr;
            }
        });
    }

});


  single signon codeigniter with csrf
Posted by: codeigniter_guru - 03-15-2017, 08:00 PM - Forum: General Help - No Replies

Hi all codeigniter gurus i have some questions about the logic and ideas of how to use a single sign on on codeigniter with csrf?

for example i have a site which is called test.com when i login on this all its subdomain will login as well

payroll.test.com
members.test.com
profiles.test.com

anybody have ideas on how do i implement this on codeigniter? i have tried using an ajax to submit as well but its not working it keeps at 500 i have disable its csrf to false its not working as well any thoughts?


  Connecting CI 3.1.3 to SQL Server 2016 Problem
Posted by: Akihiko - 03-15-2017, 07:40 PM - Forum: Installation & Setup - No Replies

I never use SQL Server before, so i still don't know why this happen. Huh


I'm running XAMPP v3.2.2 with PHP 7.1.1 with Thread Safety Enabled
SQL Server 2016 on Windows 10
i have installed ODBC driver 13
and have copy of Microsoft Driver for PHP for SQL Server 4.0 to my PHP extension and registering it to php.ini file.


the problem is, i keep getting this error when trying to connect to SQL Server 2016.

Code:
An uncaught Exception was encountered

Type: Error

Message: Call to undefined function sqlsrv_connect()

Filename: C:\xampp\htdocs\sideka\system\database\drivers\sqlsrv\sqlsrv_driver.php

Line Number: 144

Backtrace:

File: C:\xampp\htdocs\sideka\index.php
Line: 315
Function: require_once

And this is my database.php settings
Code:
$active_group = 'default';
$query_builder = TRUE;

$db['default'] = array(
    'dsn'    => '',
    'hostname' => 'tcp:127.0.0.1,1433',
    'port' => '1433',
    'username' => 'sa',
    'password' => 'a1a2a3',
    'database' => 'sideka',
    'dbdriver' => 'sqlsrv',
    'dbprefix' => '',
    'pconnect' => FALSE,
    'db_debug' => FALSE,
    'cache_on' => FALSE,
    'cachedir' => '',
    'char_set' => 'utf8',
    'dbcollat' => 'utf8_general_ci',
    'swap_pre' => '',
    'encrypt' => FALSE,
    'compress' => FALSE,
    'stricton' => FALSE,
    'failover' => array(),
    'save_queries' => TRUE
);


Did anyone know to solve the problem? Any help is appreciated. Rolleyes


  Make session never expiring
Posted by: magikboo23 - 03-15-2017, 05:10 PM - Forum: CodeIgniter 3.x - No Replies

Hi guys i have a serious problem on close of browser session expires
it worked my library on previous codeigniter but on 3.1.3 doesnt work
Anyone can give me a complete solution ?
Thanks


  problem with loading views in Internet Explorer
Posted by: DarkGhost - 03-15-2017, 03:45 PM - Forum: General Help - Replies (4)

Hello.

I am having a problem with viewing my website in Internet Explorer.
There is seems to be a problem with my codes that force users to download a file instead of displaying the web page.

My site is in Persian/Farsi language. but if you visit these pages in IE: http://findmatch.ir/player/login OR http://findmatch.ir/tournament/all ,you will understand.
Do you have any ideas ?

I hope i haven't opened up a duplicated topic.

Thank you.


Question Session: Creates new session on every page refresh
Posted by: derena - 03-15-2017, 12:57 PM - Forum: CodeIgniter 3.x - Replies (4)

When i refresh the page, it creates new session into the folder (or even in database it creates a new row with new id. i tried using sessions with database also. nothing's changed.). What should i do?

I am using PHP 7.1.2 and IIS 7 on Windows Server 2008 R2. Also, for CodeIgniter my version is 3.1.


  Unit testing with database in CI 3.x
Posted by: aaldhahe - 03-15-2017, 12:56 PM - Forum: CodeIgniter 3.x - Replies (5)

Hello all,

I have started writing Unit tests for an existing application. I am testing with database. I wanted to know if is there a way reinitialize MySQL back to its state before running the test. What am looking for is suggestions and resources. Thanks all.


  Blank URI parameters
Posted by: dbrooke - 03-15-2017, 12:45 PM - Forum: General Help - Replies (2)

Hello... likely a noob question...

Can someone tell me why blank params don't in the URI?

Call works:

Code:
https://domain.com/admin/dbmembers/detail/blah/254


Call doesn't work:
Code:
https://domain.com/admin/dbmembers/detail//254


Admin.php Controller snippet:

PHP Code:
public function dbmembers($action null$subaction null$id null)
 
 {
 
   data['theID'] = $id;
 
 )


Bug Error 404 in log
Posted by: MrCodeDev - 03-15-2017, 10:03 AM - Forum: Issues - No Replies

Hi, 

Today I have been reviewing the log and I have found a 404 error (ERROR - 15-03-2017 16:38:12 --> 404 Page Not Found: Assets/vendor). I have been reviewing what it could be (deleting lines until I see it did not come out) and I have found the line of code. This line is the culprit: 

    <link href="<?php echo base_url('assets/vendor/bootstrap/css/bootstrap.min.css'); ?>" rel="stylesheet">

My assets folder is in the root. 

[Image: codeigniterforum-min.png]

Here you pass a screen where the error comes out and also to the left you can see how the folders are distributed. I do not know if it is a bug, but it links well to the css.

If you need more questions please ask me.

Thank you


  Session Logout while using session driver database
Posted by: deepanshu12 - 03-15-2017, 09:26 AM - Forum: General Help - No Replies

Hi ,
Currently I am working on CI  Ver 3.1.3, and I have a multiple instances setup on which I am using following code for the session storage

Code:
$config['sess_driver'] = 'database';
$config['sess_cookie_name'] = 'ci_session';
$config['sess_expiration'] = 7200;
$config['sess_save_path'] = 'ci_sessiontable';
$config['sess_match_ip'] = FALSE;
$config['sess_time_to_update'] = 300;
$config['sess_regenerate_destroy'] = FALSE;

for the previous version setup I have never faced such problem but in the latest version My sessions are getting expired in within few minutes. I have made the ajax session update fix but still I am not able to fix the problem.



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