Welcome Guest, Not a member yet? Register   Sign In
  Sessions old files are deleted
Posted by: Stord1980 - 05-11-2025, 11:31 PM - Replies (1)

Currently, within the Session library when using file - we see CI_Session_files_driver::read taking up to 120s to process 
Sessions old files are deleted but after some time I see still see these performance issues on requests tracked in NewRelic where it takes 100-120s


  Update from 4.6.0 to 4.6.1 failed
Posted by: Vespa - 05-11-2025, 07:13 AM - Replies (8)

I got in trouble with latest update...it's my fault for sure but each update it's a pain.
I run composer update to update new files...then I downloaded the latest package and manually replaced the following files in the project space:

Code:
app/Config/Autoload.php

app/Config/Cache.php

app/Config/DocTypes.php

app/Config/Mimes.php

app/Config/Modules.php

app/Config/Optimize.php

app/Config/Paths.php

app/Views/errors/html/debug.css

preload.php

public/index.php

spark

Now, when I try to run spark serve file I got the follwoing error:
Code:
PHP Warning:  require(D:\_GAVS_nuovo_sito\project-root\app\Config/../../system/Boot.php): Failed to open stream: No such file or directory in D:\_GAVS_nuovo_sito\project-root\spark on line 85

Warning: require(D:\_GAVS_nuovo_sito\project-root\app\Config/../../system/Boot.php): Failed to open stream: No such file or directory in D:\_GAVS_nuovo_sito\project-root\spark on line 85
PHP Fatal error:  Uncaught Error: Failed opening required 'D:\_GAVS_nuovo_sito\project-root\app\Config/../../system/Boot.php' (include_path='.;C:\php\pear') in D:\_GAVS_nuovo_sito\project-root\spark:85
Stack trace:
#0 {main}
  thrown in D:\_GAVS_nuovo_sito\project-root\spark on line 85

Fatal error: Uncaught Error: Failed opening required 'D:\_GAVS_nuovo_sito\project-root\app\Config/../../system/Boot.php' (include_path='.;C:\php\pear') in D:\_GAVS_nuovo_sito\project-root\spark:85
Stack trace:
#0 {main}
  thrown in D:\_GAVS_nuovo_sito\project-root\spark on line 85

Honestly I have no idea what I did wrong...any hint or help? Thanks a lot


  Ajax post failing with TypeError
Posted by: PaulC - 05-10-2025, 06:25 AM - Replies (4)

I have defined the route and when I actually fire the JS I end up with the following: (CI 4.6.0, on FireFox). Is this a CI problem please?
{
    "title": "TypeError",
    "type": "TypeError",
    "code": 500,
    "message": "CodeIgniter\\HTTP\\Request::fetchGlobal(): Argument #3 ($filter) must be of type ?int, true given, called in /var/www/html/gnb/ci460/system/HTTP/IncomingRequest.php on line 714",
    "file": "/var/www/html/gnb/ci460/system/HTTP/RequestTrait.php",
    "line": 258,
    "trace": [
        {
            "file": "/var/www/html/gnb/ci460/system/HTTP/IncomingRequest.php",
            "line": 714,
            "function": "fetchGlobal",
            "class": "CodeIgniter\\HTTP\\Request",
            "type": "->"
        },
        {
            "file": "/var/www/html/gnb/ci460/app/Controllers/TheBigPicture.php",
            "line": 148,
            "function": "getPost",
            "class": "CodeIgniter\\HTTP\\IncomingRequest",
            "type": "->"
        },
        {
            "file": "/var/www/html/gnb/ci460/system/CodeIgniter.php",
            "line": 933,
            "function": "interact",
            "class": "App\\Controllers\\TheBigPicture",
            "type": "->"
        },
        {
            "file": "/var/www/html/gnb/ci460/system/CodeIgniter.php",
            "line": 507,
            "function": "runController",
            "class": "CodeIgniter\\CodeIgniter",
            "type": "->"
        },
        {
            "file": "/var/www/html/gnb/ci460/system/CodeIgniter.php",
            "line": 354,
            "function": "handleRequest",
            "class": "CodeIgniter\\CodeIgniter",
            "type": "->"
        },
        {
            "file": "/var/www/html/gnb/ci460/system/Boot.php",
            "line": 334,
            "function": "run",
            "class": "CodeIgniter\\CodeIgniter",
            "type": "->"
        },
        {
            "file": "/var/www/html/gnb/ci460/system/Boot.php",
            "line": 67,
            "function": "runCodeIgniter",
            "class": "CodeIgniter\\Boot",
            "type": "::"
        },
        {
            "file": "/var/www/html/gnb/ci460/public/index.php",
            "line": 56,
            "function": "bootWeb",
            "class": "CodeIgniter\\Boot",
            "type": "::"
        }
    ]
}


Question Website Traffic Drop After Migrating to Magento 2.4.7?
Posted by: pmkkgems - 05-10-2025, 01:25 AM - Replies (1)

Hi everyone,

I recently upgraded my eCommerce website, PMKK Gems, from an older version of Magento to Magento 2.4.7. While the website is now running faster and smoother, I’ve noticed a big drop in organic traffic since the update.

We kept all the product data, design, and most of the URLs the same during the migration. Still, the drop in traffic is worrying. I think it might be due to some SEO settings, URL changes, redirects, or some missed configuration during the process.

Has anyone else faced the same issue after moving to Magento 2.4.7?
What are the most common SEO mistakes during a Magento migration that can cause traffic to drop?

I’d really appreciate any help or suggestions.
Thanks in advance!


  CI4 Auto-Discovery not working on dedicated server (cpanel)
Posted by: cypressit - 05-09-2025, 08:56 AM - Replies (1)

I am working on a prototype using Modules. Everything is working fine in xampp on my windows desktop. When I deploy it to my dedicated server, it cannot find the routes

Folder structure
app
     Config
         Autoload
         Routes
cits
     Blog
          Config
               Routes
          Controllers
               Blog

FILES:

app\Config\Routes
----------------------------------------------------------
service('auth')->routes($routes);
$routes->get('/', 'Home::index');


app\Config\Autoload
---------------------------------------------------------
public $psr4 = [
    APP_NAMESPACE => APPPATH,
    'Config' => APPPATH . 'Config',
    'Cits\Settings' => ROOTPATH . 'cits\Settings',
    'Cits\Blog' => ROOTPATH . 'cits\Blog',
];

\cits\Blog\Config\Routes
---------------------------------------------------------
$routes->group("blog", ["namespace" => "\Cits\Blog\Controllers"], function ($routes) {
    $routes->get("/", "Blog::index");
});
Error I receive:  Can't find a route for 'GET: blog'.

Any idea why this is not working.


  Why PHP is still worth learning in 2025:By the numbers
Posted by: php_rocs - 05-09-2025, 05:13 AM - Replies (1)

Excellent read (Dev.to): https://dev.to/dehemi_fabio/why-php-is-s...mbers-20mc


  My Library cannot see session
Posted by: PaulC - 05-08-2025, 09:18 AM - Replies (2)

Hi Team, (having resolved helper issue) the debugging show one of my libraries cannot see the session.
I have loaded the library (Template) and the session in the BaseController ie

PHP Code:
<?php

namespace App\Controllers;

use 
CodeIgniter\Controller;
use 
CodeIgniter\HTTP\CLIRequest;
use 
CodeIgniter\HTTP\IncomingRequest;
use 
CodeIgniter\HTTP\RequestInterface;
use 
CodeIgniter\HTTP\ResponseInterface;
use 
Psr\Log\LoggerInterface;

/**
* Class BaseController
*
* BaseController provides a convenient place for loading components
* and performing functions that are needed by all your controllers.
* Extend this class in any new controllers:
*    class Home extends BaseController
*
* For security be sure to declare any new methods as protected or private.
*/
abstract class BaseController extends Controller
{
    /**
    * Instance of the main Request object.
    *
    * @var CLIRequest|IncomingRequest
    */
    protected $request;

    /**
    * An array of helpers to be loaded automatically upon
    * class instantiation. These helpers will be available
    * to all other controllers that extend BaseController.
    *
    * @var list<string>
    */
    protected $helpers = ['url''form''functions''time''myvalidate''debug'];

    /**
    * Be sure to declare properties for any property fetch you initialized.
    * The creation of dynamic property is deprecated in PHP 8.2.
    */
    public $session;
public 
$db;
public 
$smail;
public 
$ajax;
public 
$template;
public 
$get;
public 
$make;
public 
$delete;

    /**
    * @return void
    */
    public function initController(RequestInterface $requestResponseInterface $responseLoggerInterface $logger)
    {
        // Do Not Edit This Line
        parent::initController($request$response$logger);

        // Preload any models, libraries, etc, here.

        $this->session = \Config\Services::session();
$this->db = \Config\Database::connect();

$this->smail = new \App\Libraries\Smail();
$this->ajax = new \App\Libraries\Ajax();
$this->template = new \App\Libraries\Template();
$this->get = new \App\Libraries\Get();
$this->make = new \App\Libraries\Make();
$this->delete = new \App\Libraries\Delete();

    }

My controller calls the Template lib which in turn tries to access the session.
I appreciate the libs do not extend BaseController, but I was hoping $this->template and $this->session would be available to everything.
I'm sorry but I appear to be in a morasse of object inheritance and am not sure what to do to fix this?
The error thrown is: Undefined property: App\Libraries\Template::$session
The code snippet from my Template lib is;
PHP Code:
public function render($name$admin false)
    {
        $ip_address real_ip();

        if (!$this->session->get('view_site') || is_ip_blocked($ip_address)) {
            return;
        
Any pointers appreciated, thx, Paul


  update the framework to the latest version
Posted by: Erepaing - 05-07-2025, 11:31 PM - Replies (1)

I am in the process of updating my CodeIgniter framework from version 4.1.3 to 4.1.4. The process requires me to update incrementally, step by step for each version. I initially attempted to use the "composer update" command, however, it only updated the libraries and not the framework itself. As a result, I am searching for a solution to effectively update the framework to the latest version.


  MVC vs MVCS vs CodeIgniter
Posted by: FlavioSuar - 05-07-2025, 01:58 PM - Replies (3)

Hi,
Reading this post Better than MVC.
What do you think? 
I saw some messages about using CI that way and makes sense to me...

Cheers.


  my controller fails to find helper function
Posted by: PaulC - 05-07-2025, 05:40 AM - Replies (12)

Hi Team,
I love the new error interface - great job!
Its helping me to upgrade my ci3 to ci 4.6.0
Latest snag is my controller which extends BaseController cannot find the validation function:
- the function is 'is_valid_level' which is defined in a Helper myvalidate_helper.php
- the myvalidate helper is loaded (I think) by adding to the $helpers array in the BaseController (I can see it in the list of files).
- ci3 call was

PHP Code:
if (!is_valid_level($level3)) { .... 
- and I changed it to after a bit of research
PHP Code:
if (!myvalidate(is_valid_level($level3))) { .... 
- and the error reported is: Call to undefined function App\Controllers\myvalidate()
Clearly I have misunderstood something important, so could someone explain what I have got wrong please?
Thx Paul


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

Username
  

Password
  





Latest Threads
Override Router
by sevmusic
1 hour ago
Tool bar not showing
by paulbalandan
3 hours ago
The Hidden Cost of “Innov...
by gosocial2
5 hours ago
Block IP addresses of bad...
by sevmusic
7 hours ago
Validation does not appea...
by Tokioshy
8 hours ago
CodeIgniter.com - Report ...
by Vikas Mehta
Yesterday, 10:30 AM
best way to store tokens ...
by ahallrod
Yesterday, 10:03 AM
Hey Now it is a time for ...
by J0shflynn
06-29-2025, 06:44 AM
Forum Anti-Spam Measures
by J0shflynn
06-29-2025, 06:43 AM
tool bar not showing
by Luiz Marin
06-29-2025, 06:09 AM

Forum Statistics
» Members: 154,171
» Latest member: jordanretrosvn
» Forum threads: 78,434
» Forum posts: 379,696

Full Statistics

Search Forums

(Advanced Search)


Theme © iAndrew 2016 - Forum software by © MyBB