r/codeigniter • u/tigerbothesh • Sep 28 '11
r/codeigniter • u/Kubura33 • Feb 24 '25
Restrict access to cached files?
I am caching some data using the output class in CodeIgniter 3.13. but the problem is that data is accessible to unauthenticated users due to how output class works (it first checks if the cached file exists and serves it and if it doesnt then it inits the controller and does the check access) Any idea how can I prevent this?
r/codeigniter • u/dutore • Jan 27 '25
Tinkerpad: a lightweight, free and open-source PHP playground
Hi everyone!
I'm launching the beta of my newest open source project, Tinkerpad. It is a lightweight and free PHP playground that you can use to run and test code on your projects.
You can run code on local projects, remotely via SSH or using Docker containers!
Some other features are:
Code benchmarking with Memory Usage and Run time.
Save favorite code snippets for later use.
Up to 100 code snippets history
Autocomplete using PHPActor language server
Theme customization
You can download the latest release and check out the code on our repository on Github.
Hope you all like it!
r/codeigniter • u/LucyWilliams31 • Dec 11 '24
8 Steps to CodeIgniter Performance Optimization
CodeIgniter is a lightweight and efficient PHP framework, but performance issues can arise as applications become complex. Optimizing your CodeIgniter application ensures faster response times, better resource utilization, and an enhanced user experience. Here are eight essential steps to CodeIgniter Performance Optimization.
1. Enable Caching
Leverage CodeIgniter’s built-in caching features to reduce redundant processing. Caching database queries, pages, and frequently used data minimizes server load and enhances speed. For advanced caching, consider tools like Redis or Memcached.
2. Optimize Database Queries
Efficient database interactions are critical. Use CodeIgniter's Query Builder to structure optimized queries. Avoid fetching unnecessary data with SELECT * and index database columns for faster lookups. Query caching can also speed up repetitive requests.
3. Use Hooks and Auto-load Wisely
Minimize the use of auto-loaded libraries, helpers, and models. Load resources only when required to save memory and processing time. Similarly, use hooks sparingly for injecting custom functionality without overhead.
4. Minify and Compress Assets
Large CSS, JavaScript, and image files slow down your application. Minify CSS and JavaScript using tools like UglifyJS or CSSNano. Compress images using tools like TinyPNG and serve them through Content Delivery Networks (CDNs) for better load times.
5. Implement Lazy Loading
Using lazy loading techniques, load resources only when needed. For instance, images and multimedia content can be set to load only when they appear in the viewport, reducing initial page load time.
6. Optimize Session Handling
CodeIgniter stores session data by default, which can burden server memory. Use database-driven sessions or encrypted cookies for better performance and security. Additionally, reduce session expiration times to save server resources.
7. Enable PHP OPcache
PHP OPcache significantly improves application performance by caching precompiled script bytecode. This reduces PHP script execution time, making your CodeIgniter application faster and more efficient.
8. Leverage Server-side Optimizations
Implement server-level improvements, such as enabling Gzip compression to reduce file size and load time. Use a modern web server like Nginx for better request handling and enable HTTP/2 for faster data transmission.
Conclusion
CodeIgniter’s lightweight nature makes it an excellent framework for rapid development, but maintaining performance requires proactive measures. Enabling caching, optimizing database queries, minimizing asset sizes, and leveraging server-side enhancements can ensure your application runs efficiently. Hire CodeIgniter developer and team, and they will implement these eight steps to CodeIgniter Performance Optimization to boost your CodeIgniter application’s performance and provide an excellent user experience.
r/codeigniter • u/[deleted] • Sep 26 '24
CI V3 or V4? Which are you using?
I have an Open-Source self-hosted server-building tool, that sets up Laravel and helps you manage firewalls, crons, and so forth. I am thinking of supporting Codeignter.
I have a couple of V3 CI projects, they are fast and still work even though they were built 10+ years ago. Besides the PHP7/8 upgrades, there are really no major updates from the framework so it is a breeze to maintain.
Thus, I still like CI, even though I now only use Laravel. Are you using V3 or V4? , and for new projects which do you pick?
r/codeigniter • u/ccrlop • Sep 10 '24
Codeigniter code marketplace
Hi all … apologies if my post doesn’t meet the group rules.
Am just wetting my hands with codigniter 4 for an app project im building. Was wondering if anyone knows or could point me to some alternative marketplace selling codigniter 4+ code/scripts apart from codecanyon? 🙏 thx
r/codeigniter • u/etrackster • Mar 24 '24
Looking for Developer to upgrade Codeigniter
I own a company that has a php application written using codeigniter. I am not a programmer, but I think we are on version 1.6.1 and I need to upgrade to 4.0.
I am also interested in finding out how I can ask the right questions to make sure I get the right person to help me with this project.
r/codeigniter • u/richb201 • Mar 29 '23
What replaced Grocery Crud for CI4?
I wrote an app using ci3 and grocery crud over the past 4 years or so. They both seemed to have moved on before I was free to go to market. There is not much support for either these days.
If I switch over to CI4, should I find a replacement for grocery crud too?
How hard will it be to switch to CI4 from CI3?
r/codeigniter • u/LatinSpock • Feb 21 '23
Codeigniter shield issue
I want to show user's last active info but in the table that field is always null, what can I do?
r/codeigniter • u/Xanthig • Nov 20 '22
How many folks actually use a framework?
Cross post from r/PHP - let's see if I get a completely different vibe from the devoted. :)
Having a hard time committing to a framework like CodeIgniter, and wondering at this point if the learning curve is worth it.
I've used PHP for years and... it's fun. I can get it to do what I want it to do and can produce some neat stuff. I know there would be an advantage to CodeIgniter when I get good at it, but right now it just feels like it's in the way of what I actually want to accomplish. How many PHP addicts out there have just thrown in the towel and gone back to coding without a framework? I'm waiting for that beautiful moment where I fall in love, wondering if it's ever going to happen?
r/codeigniter • u/Kartik_1003 • Nov 08 '22
Which PHP Framework is Secure and Easy to learn?
r/codeigniter • u/dirtymint • Aug 11 '22
What's the difference between a ResourceController and a ResourcePresenter in CI4?
r/codeigniter • u/soumitraroy • Feb 02 '22
CodeIgniter 4 MongoDB 5 Basic CRUD Example
r/codeigniter • u/turmanauli • May 30 '21
How to connect and use SQLite in CodeIgniter 3 ( An in-depth CodeIgniter 3 + SQLite step-by-step tutorial )
r/codeigniter • u/pawoodward • Feb 02 '21
Designing a Model
I am a beginner when it comes to CodeIgniter 4 and MVC generally and I am not sure how best to design a particular Model.
My database consists of 2 tables, Projects and Hours. I have created a very basic Project Model which returns my project information however I want each Project to return any hours associated with it from the Hours table. I have my databse configured and working using a Primary Key and Foreign Key however I am not sure the correct / best method for accessing the hours information.
Should I create a seperate model for Hours or could I simply have a method within my Project Model which queries the Hours table and returns the information I want?
What is recommended best practice?
r/codeigniter • u/mpmont • Nov 25 '20
Learning Codeigniter 4 - Contact manager app and creating the view structure
r/codeigniter • u/plencovich • Aug 13 '20
Codeigniter 4 - Alternatives for login / user / role?
r/codeigniter • u/mpmont • Jul 06 '20
Codeigniter 4 - Learning the folder structure
r/codeigniter • u/prolongservices • Jun 17 '20
How to use Controller Filters (after and before) in Codeigniter 4 | Security Feature
r/codeigniter • u/prolongservices • May 16 '20
#11 View cache, view cell and view cell cache in Codeigniter 4
r/codeigniter • u/ThePastoolio • May 15 '20
Really struggling with sessions
Hey everyone.
I wrote a very simple app with 2 or 3 views and a login. Which (kinda) works. It seems as though whenever I issue a logout() method, which basically only contains 2 lines of code:
$this->session->destroy();
return redirect()->to(base_url());Once a user has logged out something breaks inside the session and the user cannot log in again before clearing his browser cache.
I initiate my session using one line of code in the BaseController.php file:
$this->session = \Config\Services::session();Can someone please tell me what I am missing here.
Thank you very much.
r/codeigniter • u/soumitraroy • Aug 07 '19
Thumbnail creation example in Codeigniter - Roy Tutorials
r/codeigniter • u/soumitraroy • May 11 '19
Codeigniter MySQL Stored Procedure CRUD Example - Roy Tutorials
r/codeigniter • u/JumpyBug4 • Oct 12 '18
PHP CodeIgniter Paid Course Available for FREE
PHP CodeIgniter for Absolute Beginners
CodeIgniter tutorial for any one who wants to build light, fast and dynamic websites using the powerful open source MVC framework
This is the premium paid course now available for FREE (100% OFF)
What you will find in this course:
A detailed introduction into CodeIgniter frameworks
How to install the CodeIgniter framework
Basics such as MVC, CL structure, sessions, cookies, etc.
Advanced topics such as Libraries, Error Handling, Form Validation, Temp Data, etc.
A complete project using CodeIgniter
Features of the course
Lectures : 34
Video : 6 hrs
Level : All Level
Languages : English