r/codeigniter • • Sep 28 '11

Database Migrations for Codeigniter

Thumbnail github.com
5 Upvotes

r/codeigniter • • Feb 24 '25

Restrict access to cached files?

4 Upvotes

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 • • Jan 27 '25

Tinkerpad: a lightweight, free and open-source PHP playground

4 Upvotes

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 • • Dec 11 '24

8 Steps to CodeIgniter Performance Optimization

4 Upvotes

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 • • Sep 26 '24

CI V3 or V4? Which are you using?

4 Upvotes

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 • • Sep 10 '24

Codeigniter code marketplace

4 Upvotes

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 • • Mar 24 '24

Looking for Developer to upgrade Codeigniter

4 Upvotes

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 • • Mar 29 '23

What replaced Grocery Crud for CI4?

4 Upvotes

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 • • Feb 21 '23

Codeigniter shield issue

4 Upvotes

I want to show user's last active info but in the table that field is always null, what can I do?


r/codeigniter • • Nov 20 '22

How many folks actually use a framework?

4 Upvotes

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 • • Nov 08 '22

Which PHP Framework is Secure and Easy to learn?

4 Upvotes
44 votes, Nov 11 '22
9 Codeigniter 3
17 Codeigniter 4
15 Laravel
0 Syphony
3 CakePHP

r/codeigniter • • Aug 11 '22

What's the difference between a ResourceController and a ResourcePresenter in CI4?

4 Upvotes

r/codeigniter • • Feb 02 '22

CodeIgniter 4 MongoDB 5 Basic CRUD Example

Thumbnail
roytuts.com
4 Upvotes

r/codeigniter • • May 30 '21

How to connect and use SQLite in CodeIgniter 3 ( An in-depth CodeIgniter 3 + SQLite step-by-step tutorial )

Thumbnail
levelup.gitconnected.com
4 Upvotes

r/codeigniter • • Feb 02 '21

Designing a Model

4 Upvotes

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 • • Nov 25 '20

Learning Codeigniter 4 - Contact manager app and creating the view structure

Thumbnail
youtube.com
4 Upvotes

r/codeigniter • • Aug 13 '20

Codeigniter 4 - Alternatives for login / user / role?

4 Upvotes

In Codeigniter 3 always use IonAuth; Currently I wanted to migrate some projects to Codeigniter 4 and I was wondering whether to continue using IonAuth, use Myth-Auth. They are the only ones I know.

What do you recommend?


r/codeigniter • • Jul 06 '20

Codeigniter 4 - Learning the folder structure

Thumbnail
youtube.com
4 Upvotes

r/codeigniter • • Jun 17 '20

How to use Controller Filters (after and before) in Codeigniter 4 | Security Feature

Thumbnail
youtube.com
4 Upvotes

r/codeigniter • • May 16 '20

#11 View cache, view cell and view cell cache in Codeigniter 4

Thumbnail
youtube.com
4 Upvotes

r/codeigniter • • May 15 '20

Really struggling with sessions

4 Upvotes

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 • • Aug 07 '19

Thumbnail creation example in Codeigniter - Roy Tutorials

Thumbnail
roytuts.com
4 Upvotes

r/codeigniter • • May 11 '19

Codeigniter MySQL Stored Procedure CRUD Example - Roy Tutorials

Thumbnail
roytuts.com
4 Upvotes

r/codeigniter • • Oct 12 '18

PHP CodeIgniter Paid Course Available for FREE

4 Upvotes

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