70,062 questions
2
votes
1
answer
70
views
CodeIgniter 3 odbc affected rows
Running PHP 8. I have just upgraded CodeIgniter from 3.0.4 to 3.1.13.
Before the upgrade, the affected_rows() worked fine and gave me the correct quantity.
Now it just gives me a TypeError.
This is a ...
0
votes
1
answer
83
views
Datatables pagination not working - table never updates
I'm working on a project upgrading our website- jquery/datatables/codeigniter. In the previous version, I had no problem with this datatable. But now, for some reason the pagination isn't working. ...
0
votes
0
answers
134
views
Google Login Redirect Not Working in CodeIgniter 4: 'Page Does Not Exist' Error on Callback
I'm integrating Google OAuth login in my CodeIgniter project, but I'm encountering an issue with the redirect URI after successfully authenticating with Google. Here's a summary of the problem:
My ...
1
vote
2
answers
114
views
Displaying about to expire items
I'm displaying Expired Items using this (codeigniter 3)
$qs6="SELECT a.item_name,a.item_code,b.category_name,a.expire_date from db_items as a,db_category as b where b.id=a.category_id and a....
2
votes
0
answers
122
views
SOCKET_EAGAIN error on Nesk\Puphpeteer with Codeigniter project
Getting next clue/socket-raw vendored error (Socket\Raw\Exception) when trying to launch Puppeteer browser:
Socket operation failed: Resource temporarily unavailable (SOCKET_EAGAIN)
Socket\Raw\...
0
votes
1
answer
93
views
CodeIgniter email function does not work on Prohoster SMTP
My website was developed in PHP using the CodeIgniter framework. On the development server, everything worked perfectly, but after migrating the site to Prohoster, the email sending feature stopped ...
1
vote
1
answer
63
views
php CI 3 custom library => passing parameter to someclass
I am really new to Codeigniter, and just learning from scratch. I use CI3.
in native PHP I have a function like this
( to calculate the number of days between two dates) :
function dateDiff($date1, $...
0
votes
0
answers
52
views
Codeigniter 3... Undefined Property $Ngetest
Models: Ngetest.phpp
<?php
defined('BASEPATH') or exit('No direct script access allowed');
class Ngetest extends CI_Model
{
public function showEcho()
{
return "naisu";
...
-1
votes
2
answers
117
views
AJAX file upload request will not end [closed]
I am trying to upload an image to the server but the request will not end. In DevTools, the request shows as pending while, in the backend, php is continuously writing to an ever growing file until I ...
1
vote
1
answer
99
views
CodeIgniter 4 session data has been lost inside a if condition after redirect
Flow:
User fills a form with an email and gets a passcode.
I generate and store this passcode (checksum_code) in the session using session()->set(...).
Then I redirect() the user to a ...
0
votes
1
answer
75
views
PHP Json encode - Malformed UTF-8 PHP/CodeIgniter
I'm getting the following error:
<b>Fatal error</b>: Uncaught CodeIgniter\Format\Exceptions\FormatException:
Falha ao analisar a string json, erro: "Malformed UTF-8 characters, ...
0
votes
1
answer
73
views
How to check for uniqueness of multiple fields in a database?
I ran into a problem where I don't know how to check the uniqueness of some fields in the database, I don't have a field where only 1 element is unique, of course, except for the id, but I can't ...
2
votes
1
answer
78
views
How to transfer fields to a database where one field is foreign?
I can't add fields to the profile, user_id seems to work, the values are correct, but it doesn't add to the field, but if I change it manually in mysql, it changes the value without errors, what ...
0
votes
1
answer
58
views
Codeigniter 4 php spark publish command failed to publish files
After Upgrading to the latest Codeigniter 4 version, when I am trying to run the command
php spark publish
Then I am getting an error failed to publish to and more specifically for the reason:
fails ...
0
votes
1
answer
176
views
Why is my CodeIgniter 4 custom validation rule not working in form validation?
I'm working on a CodeIgniter 4 project and trying to use a custom validation rule for my form. However, the rule doesn't seem to trigger, and I get no validation errors, even when the input should ...
0
votes
1
answer
76
views
Nginx Showing 404 in Header Despite Page Rendering Fine (CentOS, aaPanel, CodeIgniter 4)
I'm experiencing a strange issue where the page at
https://customsportswears.com/ibc52/custom-afl-uniforms-high-quality-australian-football-league-gear.html
loads fine in the browser, but when checked ...
1
vote
0
answers
54
views
CodeIgniter 4: insert() only saves document_id and sets the rest of the columns to NULL
I'm trying to save a mapped associative array from a JSON extracted with GPT-4 to a DB. The $datosPromptData array correctly contains all key-value pairs, and my DatosPromptModel model has the exact ...
0
votes
0
answers
39
views
Error exception on codeigniter 4 about open failed to open stream
error description
This error occurred when I uploaded an image file with the rules I wrote in the model. The image is still uploaded into a path that I have specified even though this error appears. ...
0
votes
0
answers
64
views
How to grant external access to a file in codeigniter4
Good folk, a small tale of woe. I have taken on the upgrade of Codeigniter3 to version 4 (4.6.0).
My app was working fine in CI3 but I have hit an issue with one aspect of my site with CI4.
My Ubuntu ...
1
vote
1
answer
98
views
How to get the filtered record count for a query?
I am using codeigniter 4 model for a an application which I work.
I would like to get the filtered record count for a query as shown.
My code is a shown below:
$model = new LocationModel();
$builder = ...
0
votes
1
answer
64
views
CodeIgniter app redirect issue on OpenLiteSpeed server
I've installed a CodeIgniter app on an OpenLiteSpeed server, and although the script installation went smoothly, there appears to be a problem with the .htaccess redirects.
Pages only seem to work ...
4
votes
1
answer
112
views
CI4 + PHP 8.1: Finally block not executed when mysqli_sql_exception occurs (but works with register_shutdown_function)
I'm working on a CodeIgniter 4 project (CI: 4.4.3 production mode | PHP: 8.1.32), and I'm running into a strange issue where my finally block never executes if a database error happens during ...
-1
votes
1
answer
109
views
How to read excel file in Codeigniter 4
I have a problem in displaying or getting the data from Excel File. Every time i run the route it gives me the error of "Failed to load resource: the server responded with a status of 500 (...
0
votes
0
answers
82
views
CodeIgniter 3 (HMVC) - 404 on route even though controller exists - MX_Controller issue?
Hi I'm facing an issue during a technical challenge for a PHP internship using PHP 8.1 and CodeIgniter 3 (with HMVC structure using MX_Controller).
The company sent me the repository already set up — ...
0
votes
2
answers
204
views
Why is my codeigniter4 project not connecting to my database
I have been running into the same issue for over the past 3 hours. I have uploaded my codeigniter4 project (my first one) to my namecheap shared hosting provider, and unfortunately I have ran into ...
1
vote
2
answers
77
views
Toast Notification Appears on Every Page After Login Failure in CodeIgniter
I'm facing an issue with toast notifications in my CodeIgniter app. After a failed login attempt, the error message is displayed correctly using Toastr. However, this message keeps appearing on every ...
0
votes
1
answer
78
views
CodeIgniter base_url Configuration Issue
I’ve been working with CodeIgniter for a while, and it's been great so far. However, I’m having trouble understanding how base_url works. For instance, I’ve set the base_url like this:
$config['...
0
votes
1
answer
76
views
Microsoft Graph subscription API error regarding Notification endpoint
So I have been trying to create a Azure graph subscription API , the publicly accessible endpoint is
https://omstest.shiplogiq.dev/webhook/graph_listener
POST API URL:
https://graph.microsoft.com/v1....
0
votes
0
answers
27
views
Sharing ci_session between two applications, one built with CodeIgniter and the other with React and Node.js
We are unable to get ci_session in React with a Node.js application from the CodeIgniter application. We currently have a running CodeIgniter portal and want to revamp a single page with React and ...
0
votes
3
answers
79
views
Codeigniter 4 validation of keys within an associative array
I would like to validate the following json in CI4:
{
"field1": "some value",
"array1": {
"2876": "4358",
"9904": &...
0
votes
0
answers
127
views
SQL Unknown column error with first() and findAll()
I'm using CodeIgniter 4 and having an issue with my model. I'm using first() and findAll() to retrieve data as objects or arrays, but for some functions, I get this error:
Unknown column '...
-1
votes
1
answer
107
views
503 error after 3 minutes of execution time [closed]
I have an function that tries to synchronize data of the API to the system and the system data needs to be synchronized with the API.
As you can imagine this can take a little while, definitely when ...
-1
votes
1
answer
151
views
I am using Codeigniter 3 hmvc with php 8.2 and i am getting the below error
A PHP Error was encountered
Severity: Deprecated Notice
Message: str_replace(): Passing null to parameter #1 ($search) of type array|string is deprecated
Filename: MX/Controller.php
Line Number: 46
...
1
vote
2
answers
122
views
Loading Route.php and Routing.php settings in different Modules in CodeIgniter4
I have different custom Module paths/ Namespaces in my CodeIgniter4 project, and I just recently upgraded to version 4.4.0. in this upgrade the route settings will move from Config/Routes.php to ...
0
votes
1
answer
54
views
Parallel Processing with RabbitMQ in CodeIgniter for Multiple File Uploads
I have implemented RabbitMQ in my CodeIgniter project to handle a file upload system. Users can upload multiple files at once. After uploading the files, the IDs of the uploaded files are added to a ...
0
votes
1
answer
82
views
CI4 Not Staying Logged In
I have an issue that I've been troubleshooting for days that just doesn't make any sense to me. I'm hoping someone has any idea to help!
I'm working on a page where you need to be logged in. The ...
1
vote
1
answer
97
views
Why autorouting (legacy) doesn't work in Codeigniter 4?
I have a project with a GET route included in the ‘Routes.php’ file and the rest of the routes generated by autorouting, that is, access to the methods of the controllers from the URL.
These ...
0
votes
0
answers
46
views
Ajax call with CSRF protection 403 forbidden CI4
I am working on translating a page from Codeigniter 3 to Codeigniter 4, and have session based CSRF protection enabled in CI4. For some reason, even though I can see the CSRF name and CSRF hash in ...
1
vote
0
answers
69
views
How to manage correct orientation for upload image
I am using GD library to combine two or more than two images in code igniter. The combining part is working fine. But if I open any image in my system and rotate the image and then try to combine the ...
1
vote
2
answers
73
views
Possible to group class functions and access them by group in PHP/Codeigniter?
I have a library in my CodeIgniter4 project, now I want to make my lib with lots of functions more clear.
For that I want to know if its possible to group the functions inside the class-definition by ...
0
votes
3
answers
108
views
How can I make a library globally accessible?
I have a library with lot of functions which I need all around the controllers, helper, models etc.
Also I want to reduce the code inside each part of them.
So I try to init the library once and have ...
0
votes
1
answer
411
views
Cannot install mysqli or pdo_mysql extensions in PHP 7.4.33 Docker container
I’m trying to set up a Docker-based environment for my PHP 7.4.33 application, but I’m unable to install the mysqli and pdo_mysql extensions. Despite following several tutorials and rebuilding the ...
0
votes
1
answer
62
views
CI4: Passing variable to custom validation rule comes through as string not int
I'm trying to rewrite a page from CI3 to CI4. In CI3, the validation rule took a parameter from the controller. But now that I've rewritten the code, that parameter (projectid) is coming through as ...
1
vote
1
answer
76
views
How to open a new page with button Link?
So, I am working on simple website for my office using codeigniter 4 and it's really different with the one I tried during my university days.
My problem is a button which link to our form page. But ...
0
votes
1
answer
93
views
How to use CodeIgniter 4.6 in subfolder?
I am trying to create a new site under xampp (php 8.2) with CodeIgniter 4.6(the latest). Here are what I did:
run cmd: composer create-project codeigniter4/appstarter c46 under folder htdocs
update ...
0
votes
3
answers
81
views
Restrict Unauthorized Access to Profile Images in CodeIgniter 4
I'm currently facing an issue with profile image access in my CodeIgniter 4 (ci4) application. After a user logs in, they can access the "Match Profile" and "View Profile" pages, ...
0
votes
1
answer
89
views
Code Igniter 4: There is no data to update
I've been trying for hours to figure out this error in CodeIgniter 4 (PHP 8.2), and I think someone else might notice what I'm missing.
I have a Model with an update function. When I use it as is, I ...
0
votes
0
answers
47
views
502 Bad Gateway Error when Configuring base_url in CodeIgniter with Nginx and Docker
Title: 502 Bad Gateway Error when Configuring base_url in CodeIgniter with Nginx and Docker
Description:
I have a legacy CodeIgniter application running in a Dockerized environment with PHP-FPM, ...
-1
votes
1
answer
33
views
codeigniter image not moving to folder: Undefined variable $file_name
VIEW:
<form method='post' action="<?php echo base_url('Reg_form/save')?>" enctype="multipart/form-data" name="reg_form">
<div class="form-row"&...
1
vote
2
answers
61
views
SimpleXMLElement XML displays as plain text after CI3 to CI4 upgrade
I am upgrading a page from CI3 to CI4. The page has a button to open a new tab which displays XML data. For some reason the CI4 version is showing the XML as plain text. I copied the source of each ...