I'm getting ` Session: Error while trying to free lock for ci_session` show up in the error log a couple times a minute, sometimes, and every 15 minutes other times. Using Redis for sessions. It's not happening on a different server that has almost the same code base and is sharing the same Redis server, albeit with a different session name. I'm using session_write_close() on every page as soon as I'm done handling sessions.

Member Avatar
Member Avatar
+0 forum 8

DaniWeb was written in Codeigniter, and when posting to the forums, we use database transactions that look like this: $this->db->trans_start(); ... insert into the posts table ... ... update the member's post count ... ... update the tags table ... etc $this->db->trans_complete(); On occassion, the error log will show for a particular query within the transaction: *Query error: Deadlock found when trying to get lock; try restarting transaction - Invalid query* When that happens, the entire transaction is rolled back. However, this is not ideal because when someone attempts to make a post, we don't want it to completely fail …

Member Avatar
Member Avatar
+1 forum 10

I am skilled in Core PHP, JavaScript, Mysql, Ajax, HTML, CSS, jQuery and Codeigniter and having 4+ years of experience in Web Development. I have very vast knowledge in dynamic and static website development.

Member Avatar
+0 forum 0

Hello. I am having a problem here. So I have this slider which display the pictures with status "1" which means displayed. Here comes the problem, when there's no pictures with the status AKA "0" (not-displayed), the default image doesn't show up. Here's the script. <div class="carousel-inner"> <?php $no=1; $default=$this->db->get_where("penyaluran", array("status" => "1"))->result(); $g='image.jpg'; $n=''; foreach($default as $pict) { if ($g=$pict->foto_dokumentasi) { $n=$pict->nama_penyaluran; } else { $g='image.jpg'; $n= ''; } if ($no == 1) { $status = 'active'; } else { $status = ''; } ?> <div class="carousel-item <?php echo $status; ?>"> <img src="<?php echo base_url('uploads/'.$g); ?>" alt="" style="max-height: 300px; …

Member Avatar
+0 forum 0

I have an application that has core PHP for the signin, registration, dashboard. It has a front end and backend (dashboard). Simple stuff. I need to implement a Scheduling system and [EasyAppointments](https://easyappointments.org/) (EA) has 90% of the stuff I need. EA uses codeigniter and requires login. It has it own login as well. So now we have the front site and dashboard with 1 core php signin. The EA has it signin codeigniter. I need to combine both. The developer wants to use the EA signing for everything, but it is not as robust as my signin (IP, lock out, …

Member Avatar
Member Avatar
+0 forum 1

Hi i am trying to fetch data from database into my dropdown menu in codeigniter, but havind error of 'undefined variable: unit_name' . this is my model file `public function get_unit_value() { $result = $this ->db ->select('id, unit_name') -> get('units') -> result_array(); $unit_name = array(); foreach($result as $r) { $unit_name[$r['id']] = $r['unit_name']; } $unit_name[''] = 'Select unit...'; return $unit_name; }` this is my controller `public function unit(){ $this->load->database(); $this->load->model('client_model'); $data['unit_name'] = $this ->client_model-> get_unit_value(); $this -> load -> view('add_quote', $data); }` this s my view file `<div class="panel panel-default"> <div class="panel-heading">The form</div> <div class="panel-body"> <!--dropdown input--> <?php echo form_dropdown('unit_name',$data['unit_name'], '', …

Member Avatar
Member Avatar
+0 forum 1

I am new in Codeigniter And I have no knowldge about Anything in it. This is my Code Snippent Error . A PHP Error was encountered Severity: Notice Message: Undefined property: stdClass::$theme Filename: core/MY_Controller.php Line Number: 117 Backtrace: File: D:\xampp\htdocs\rms\application\core\MY_Controller.php Line: 117 Function: _error_handler File: D:\xampp\htdocs\rms\application\core\MY_Controller.php Line: 72 Function: _setup File: D:\xampp\htdocs\rms\index.php Line: 337 Function: require_once

Member Avatar
Member Avatar
+0 forum 4

i really need help, am new in programming and youtube is my teacher. i really need assistance to install Cryptomarket Trading System Installer in to my cpanel.

Member Avatar
Member Avatar
+0 forum 1

php-pdf attachment is in wrong format on webmails

Member Avatar
Member Avatar
+0 forum 1

php-pdf attachment is in wrong format on webmails

Member Avatar
Member Avatar
+0 forum 1

I've encountered an unknown user appear in my calls log and its had a 16mins airtime videocall to this person in messenger. I'm just suprised, it was appear in my call logs even though I didn't do anything Can anyone help me to track this code or identify who is owner of this account in facebook. I attached the screenshot for your reference and Here's the code that I saw in the contact information of this person. Btw, I'm using IPhone 7 , Idk if this is only a glitch or not. **EIBTUHQ9AHSwSWDqeuw9N3J2dD7KpAcTKxBTZuk8M3LkDRao2HxOnjmGeRylF5RGYOOboRGtRVrDAG** I hope someone on this group will …

Member Avatar
Member Avatar
+0 forum 2

I know C++, PHP and a few more, but I do not have the slightest clue, how to make a browser extension and the tutorials I find on the web are like chinese to me, so let me ask here, if anyone can help me out. Task: I want to auto-close advertising popups and popunders without blocking them completely. The biggest problem is, most websites detect ad blockers and ask you to disable them before they show their site. Also some popunders have to redirect back to the site they came from, or else it won't execute a click on …

Member Avatar
Member Avatar
+0 forum 3

My code is given me error Parse error: parse error, expecting `T_FUNCTION' in C:\wamp\www\schoolapp\application\controllers\Login.php on line 277 here is my code <?php if (!defined('BASEPATH')) exit('No direct script access allowed'); class Login extends CI_Controller { function __construct() { parent::__construct(); $this->load->model('crud_model'); $this->load->database(); $this->load->library('session'); /* cache control */ $this->output->set_header('Last-Modified: ' . gmdate("D, d M Y H:i:s") . ' GMT'); $this->output->set_header('Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0'); $this->output->set_header('Pragma: no-cache'); $this->output->set_header("Expires: Mon, 26 Jul 2010 05:00:00 GMT"); } //Default function, redirects to logged in user area public function index() { $results = $this->up(); if ($this->session->userdata('admin_login') == 1) redirect(base_url() . 'index.php?admin/dashboard', 'refresh'); if ($this->session->userdata('teacher_login') == 1) redirect(base_url() …

Member Avatar
Member Avatar
+0 forum 1

I have a form that uploads a news article with it's picture and then stores all the info correctly. I am using codeigniter with Active Record and would like to know how to display the image with the post it was uploaded with. here is my upload script: public function create(){ $data = array('error' => ''); $config = array( 'upload_path' => './uploads', 'allowed_types' => 'gif|jpg|png', 'max_size' => '204800', 'max_width' => '1920', 'max_height' => '1080', 'encrypt_name' => true ); $this->load->library('upload', $config); if(!$this->upload->do_upload()) { $error = array('error' => $this->upload->display_errors()); $data['title'] = 'Create a news item'; $data['main_content'] = 'news/create'; $this->load->view('templates/template', $data, $error); } …

Member Avatar
Member Avatar
+0 forum 4

hi all, I am new to Codeigniter, start learning because of one of our customer want the conversion of their some Oracle Forms to web app and I found it is much easier to use CI framework of PHP but one thing I can't connect / work with their Oracle database 12c Release 2. I have a VM with Win 8, Oracle DB 12c and WAMP ( latest downloaded on 10-Nov-2018 ). I searched for it and found various solution (not any of 12c), tried some but still I failed to even load data from a table. can somebody help …

Member Avatar
Member Avatar
+1 forum 6

hiii i need your help, i am web developer (fresher). i want display images from database/folder using ajax in codeignater. i try ur source code not working.

Member Avatar
+0 forum 0

How to convert the Codeigniter code to normal HTML and PHP? Basically, I want to merge my older Codeigniter code with new HTML, CSS and PHP code.

Member Avatar
Member Avatar
+0 forum 1

Hello friends, I want to develop a online typing tutor using codeigniter......for hindi language (typing in computer with the help of **hindi indic 3** or** hindi indic 2 typing tool**) .......i know the php and codeigniter with css.....please give me guidance to develop it......what language i need to learn.....and how can be typing using these tool............. how many days will it take to learn............

Member Avatar
Member Avatar
+0 forum 4

Hello, I am trying to prevent SQL Injection on Codeigniter. I am reading this link: https://www.roytuts.com/prevent-sql-injection-in-codeigniter/ I do not understand what is the purpose of Escaping Queries, Query Binding and Active Record. Thanks in advance.

Member Avatar
Member Avatar
+0 forum 2

I am using codeigniter 2.1.2 on Win 8.1 and the following code is not working $this->load->library('image_lib'); $config['image_library'] = 'GD2'; $config['source_image'] = 'C:/xampp/htdocs/imgt/wall/wallpaper2.jpg'; $config['create_thumb'] = TRUE; $config['maintain_ratio'] = TRUE; $config['width'] = 75; $config['height'] = 50; $this->load->library('image_lib', $config); var_dump( $this->image_lib->resize()); // this returns true What is the problem i checked GD is installed ?? I also tried the same code in 2.2.0 here too not working

Member Avatar
Member Avatar
+0 forum 5

I recently had to mass insert a really large text file of strings into MySQL. Here's how I did it.

Member Avatar
Member Avatar
+1 forum 1

I am using two database one is default which I would like to set db name as per session value, second database I am using to login and registration and set session once user logged in. Can anyone have solution to manage this database name after login of user based on session value.. I am using codeigniter framework

Member Avatar
Member Avatar
+0 forum 3

Hi I have problem that cannot show form validation errors in view . I am using ajax to post data to controller. Here is my Controller's Validation part private function _validate() { $this->form_validation->set_rules('Name', 'Name', 'required|alpha'); $this->form_validation->set_rules('CellNo', 'CellNo', 'required|numeric'); $this->form_validation->set_rules('Address', 'Address', 'required'); $this->form_validation->set_rules('Rate', 'Rate', 'required|numeric'); $this->form_validation->set_rules('Advance', 'Advance', 'required|numeric'); $this->form_validation->set_rules('BottlesQty', 'BottlesQty', 'required|numeric'); $this->form_validation->set_rules('DeliveryDay', 'DeliveryDay', 'required'); $this->form_validation->set_rules('DeliveryPerson', 'DeliveryPerson', 'required'); $this->form_validation->set_rules('referenceName', 'referenceName', 'required'); if ($this->form_validation->run() == FALSE) { $errors = validation_errors(); echo json_encode(['error'=>$errors]);} } Here is view with ajax <div id="print-error-msg" class="alert alert-danger " style="display:none"></div> //part of ajax posting to controller var formData = new FormData($('#form')[0]); $.ajax({ url : url, type: "POST", data: formData, …

Member Avatar
+0 forum 0

Hi This question or similar were 4 years ago has already been asked but in my situation did not help. I have codeigniter project. in my employee database I have TINYINT field status. if 1 employee is active otherwise inactive. my form is in bootstrap modal. here is switch button code: <div class="onoffswitch3"> <input type="checkbox" name="status" class="onoffswitch3-checkbox" id="myonoffswitch3" data-format="Y-m-d" required > <label class="onoffswitch3-label" for="myonoffswitch3"> <span class="onoffswitch3-inner"> <span class="onoffswitch3-active"><span class="onoffswitch3-switch" id="onoffswitch3-switch">Active</span></span> <span class="onoffswitch3-inactive"><span class="onoffswitch3-switch" id="onoffswitch3-switch">Inactive</span></span> </span> </label> </div> question is how can I get value of switch either it is 1 or 0. ( on form when I am clicking switch …

Member Avatar
+0 forum 0

Hi, I'm trying to create and save breadcrumbs from recursive function. I manage to display hierarchical tree using recursive function. but I'm I am having hard time creating breadcrumb and save them one by one to my database. here is my table cat_id parent_id title 10 0 shoes 11 0 clothes 12 10 socks 13 11 long-sleve 14 11 T-shirts ... My desire output is like this: Home > Category1 > item Home > Category1 > item Home > Category1 > item Home > Category2 > item Home > Category2 > item Any idea thanks..

Member Avatar
+0 forum 0

I am literary about to bleed...I have a single controller that will accept POST request from an external domain. Once the post data arrives (usually a number or a date), it returns json data. The problem is CORS error in firefoz and chrome. Only that controller is going to be accessed from other domains. I have tried header('Access-Control-Allow-Origin: *'); header('Access-Control-Allow- Methods: POST, GET, PUT, DELETE, OPTIONS'); header('Access-Control-Allow-Headers: X-Requested-With, content-type, X-Token, x-token'); just after opening the php code, in the constructor and even the method but nothing changes at all. My current htaccess looks like this: RewriteEngine on RewriteCond $1 !^(index\.php|public|\.txt) …

Member Avatar
Member Avatar
+0 forum 2

i need someone who can give me his email so i can send my timetable generator software that is given me errors. please anyone who can be of assistance, i will be grateful.

Member Avatar
Member Avatar
+0 forum 2

I want to attach two excel files (sealing_production.xls & sealing_assembly.xls)to my email using php,but I have no idea on how to do it. **Problem** When I click on my send mail button, I gets the mail. with all details. but attachment is not working. **Try** I echo the file name, its prints the file name from controller Here my php code for the send Email function function sendEmail() { $user = "dheanas@gmail.com"; $cc = "as@gmail.com"; $status = "Dear All,"; $date = date("y-m-d") ; $xls = "Sealing Report/{$date}/sealing_production.xls"; $xls1 = "Sealing Report/{$date}/sealing_assembly.xls"; $subject = "Sealing Daily Production & Daily Output Report …

Member Avatar
Member Avatar
+0 forum 2

Hi all, I wanna use Payment Gateway integration with CodeIgniter, I am new to this thing, so I don't have any idea about that yet... can you guys help me with this ?

Member Avatar
Member Avatar
+0 forum 1

if click second link the url pass value but then i click next the url value will empty. any one healp me ...! this is my controllere public function search() { $this->load->library('pagination'); $prdictive= $this->input->post('printable_name'); $category=$this->input->post('category'); $area=$this->input->post('area'); $this->load->library("pagination"); $config = array(); $config["base_url"] = base_url() . "Main_control/search/".$area.'/'.$category; $area2 = $this->uri->segment(3); $category2 = $this->uri->segment(4); $page = $this->uri->segment(5); $config['total_rows'] = $this->Main_model->record_count($category,$category2,$area,$area2); $config["per_page"] = 3; $config["uri_segment"] = 5; // $choice = $config["total_rows"] / $config["per_page"]; // $config["num_links"] = round($choice); $config['page_query_string'] = false; $config['reuse_query_string'] = true; $config['full_tag_open'] = '<ul class="pagination">'; $config['full_tag_close'] = '</ul>'; $config['first_link'] = false; $config['last_link'] = false; $config['first_tag_open'] = '<li>'; $config['first_tag_close'] = '</li>'; $config['prev_link'] = …

Member Avatar
+0 forum 0

The End.