codeigniter4 / CodeIgniter4

Open Source PHP Framework (originally from EllisLab)
https://codeigniter.com/
MIT License
5.36k stars 1.9k forks source link

Bug: SYSTEMPATH/Session/Handlers/FileHandler.php at line 128 #8279

Closed mettleshade closed 11 months ago

mettleshade commented 11 months ago

PHP Version

8.1

CodeIgniter4 Version

4.4.3

CodeIgniter4 Installation Method

Composer (using codeigniter4/appstarter)

Which operating systems have you tested for this bug?

Windows

Which server did you use?

apache

Database

MariaDB 10.2

What happened?

I created an extension for my error_exception.php file to log errors to the database. I am encountering a recurring issue, but there is no problem when I manually enter URLs.

Error: SYSTEMPATH/Session/Handlers/FileHandler.php at line 128 -> 0 www.hepsimoda.com.tr/bt-zebra-desen-balon-kol-tunik-vizon-krem

I have many different URLs like this one, and I'm encountering the same issue.

error_exception.php

$errorId = uniqid('error', true);
$title = "Hata oluştu, Lütfen ekran görüntüsü alıp site iletişimine bildiriniz.";
?>
<!doctype html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="robots" content="noindex">

    <title><?= esc($title) ?></title>
    <style>
        <?= preg_replace('#[\r\n\t ]+#', ' ', file_get_contents(__DIR__ . DIRECTORY_SEPARATOR . 'debug.css')) ?>
    </style>

    <script>
        <?= file_get_contents(__DIR__ . DIRECTORY_SEPARATOR . 'debug.js') ?>
    </script>
</head>
<body onload="init()">

<!-- Header -->
<div class="header">
    <div class="container">
        <h1><?= esc($title), esc($exception->getCode() ? ' #' . $exception->getCode() : '') ?></h1>
        <p>
            <?= nl2br(esc($exception->getMessage())) ?>
            <a href="https://www.duckduckgo.com/?q=<?= urlencode($title . ' ' . preg_replace('#\'.*\'|".*"#Us', '', $exception->getMessage())) ?>"
               rel="noreferrer" target="_blank">search &rarr;</a>
        </p>
    </div>
</div>

<?php
HataLog('Kritik Hata', "", esc(clean_path($file)) . "</b> at line <b>" . esc($line) . " -> " . " " . $exception->getCode() . " " . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']);
?>

</body>
</html>

Steps to Reproduce

I don't know how it occurred.

Expected Output

I don't know how it occurred.

Anything else?

No response

mettleshade commented 11 months ago

error_exception file : https://prnt.sc/pgV3eX7B3RQZ

kenjis commented 11 months ago

What is 0 www.hepsimoda.com.tr/bt-zebra-desen-balon-kol-tunik-vizon-krem in the log? Can you show all error messages with backtrace?

mettleshade commented 11 months ago

sorry,I'm not understand

kenjis commented 11 months ago

This seems not a bug in CI4. Please find the code that outputs SYSTEMPATH/Session/Handlers/FileHandler.php at line 128 -> 0 www.hepsimoda.com.tr/bt-zebra-desen-balon-kol-tunik-vizon-krem.

kenjis commented 11 months ago

We use GitHub issues to track BUGS and to track approved DEVELOPMENT work packages. We use our forum to provide SUPPORT and to discuss FEATURE REQUESTS.