Josantonius \ Session \ Exceptions \ HeadersSentException
Session->start(): The headers have already been sent in "/home/okbakademi/public_html/admin/classlar/request.php" at line 47. Josantonius\Session\Exceptions\HeadersSentException thrown with message "Session->start(): The headers have already been sent in "/home/okbakademi/public_html/admin/classlar/request.php" at line 47." Stacktrace: #4 Josantonius\Session\Exceptions\HeadersSentException in /home/okbakademi/public_html/admin/vendor/josantonius/session/src/Session.php:274 #3 Josantonius\Session\Session:throwExceptionIfHeadersWereSent in /home/okbakademi/public_html/admin/vendor/josantonius/session/src/Session.php:66 #2 Josantonius\Session\Session:start in /home/okbakademi/public_html/admin/fonksiyonlar.php:67 #1 require_once in /home/okbakademi/public_html/admin/model.php:3 #0 include_once in /home/okbakademi/public_html/index.php:3
Stack frames (5)
4
Josantonius\Session\Exceptions\HeadersSentException
/vendor/josantonius/session/src/Session.php274
3
Josantonius\Session\Session throwExceptionIfHeadersWereSent
/vendor/josantonius/session/src/Session.php66
2
Josantonius\Session\Session start
/fonksiyonlar.php67
1
require_once
/model.php3
0
include_once
/home/okbakademi/public_html/index.php3
/home/okbakademi/public_html/admin/vendor/josantonius/session/src/Session.php
            'use_strict_mode', 'use_trans_sid',
        ]);
 
        foreach (array_keys($options) as $key) {
            if (!isset($validOptions[$key])) {
                throw new WrongSessionOptionException($key);
            }
        }
    }
 
    /**
     * Throw exception if headers have already been sent.
     *
     * @throws HeadersSentException if headers already sent.
     */
    private function throwExceptionIfHeadersWereSent(): void
    {
        $headersWereSent = (bool) ini_get('session.use_cookies') && headers_sent($file, $line);
 
        $headersWereSent && throw new HeadersSentException($file, $line);
    }
 
    /**
     * Throw exception if the session has already been started.
     *
     * @throws SessionStartedException if session already started.
     */
    private function throwExceptionIfSessionWasStarted(): void
    {
        $methodName = debug_backtrace()[1]['function'] ?? 'unknown';
 
        $this->isStarted() && throw new SessionStartedException($methodName);
    }
 
    /**
     * Throw exception if the session was not started.
     *
     * @throws SessionNotStartedException if session was not started.
     */
    private function throwExceptionIfSessionWasNotStarted(): void
/home/okbakademi/public_html/admin/vendor/josantonius/session/src/Session.php
     * * save_path: ""
     * * serialize_handler: "php"
     * * sid_bits_per_character: "4"
     * * sid_length: "32"
     * * trans_sid_hosts: $_SERVER['HTTP_HOST']
     * * trans_sid_tags: "a=href,area=href,frame=src,form="
     * * use_cookies: "1"
     * * use_only_cookies: "1"
     * * use_strict_mode: "0"
     * * use_trans_sid: "0"
     *
     * @see https://php.net/session.configuration
     *
     * @throws HeadersSentException        if headers already sent.
     * @throws SessionStartedException     if session already started.
     * @throws WrongSessionOptionException If setting options failed.
     */
    public function start(array $options = []): bool
    {
        $this->throwExceptionIfHeadersWereSent();
        $this->throwExceptionIfSessionWasStarted();
        $this->throwExceptionIfHasWrongOptions($options);
 
        return session_start($options);
    }
 
    /**
     * Gets all attributes.
     */
    public function all(): array
    {
        return $_SESSION ?? [];
    }
 
    /**
     * Checks if an attribute exists in the session.
     */
    public function has(string $name): bool
    {
        return isset($_SESSION[$name]);
/home/okbakademi/public_html/admin/fonksiyonlar.php
'database' => 'okbakademi_db',
'charset'   => 'utf8',
'collation' => 'utf8_unicode_ci'
 ]);
 
 $sql_details = array(
    'user' => 'okbakademi_user',
    'pass' => 'ZeZpsBxMWUT5Bihj',
    'db'   => 'okbakademi_db',
    'host' => 'localhost',
);
    
 
 
$capsules->setAsGlobal();
$capsules->bootEloquent();
    
$Session = new Session();
 
$Session->start();
 
$site_url = "okbakademi.com"; 
//$_SERVER['HTTP_HOST'];
 
$izinler = array( 
    
"Panel",
"Kullanıcı Listele",
"Kullanıcı Düzelt",
"Kullanıcı İşlemleri",
"Kullanıcı Logları",
 
"Kategori Listele",
 
"Resim Ekle",
"Resim Listele",
 
"İşlemler",
"İşlem Ekle",
"İşlem Listele",
/home/okbakademi/public_html/admin/model.php
<?php
 
require_once'fonksiyonlar.php';
 
 
function admin_giris_kontrol(){
    
    global $Session;
 
    global $site_url;
 
    $site_url_gelen = $_SERVER['HTTP_HOST'];
 
    if( $site_url == $site_url_gelen){
    
        $takip    = get("t");
 
        $yenino   = token_uret_yeni() ;
 
        $gelenler = $Session->get('hepsi');
 
        $object   = (object)$gelenler;
 
        if(!empty($object->token_uret_yeni)){
 
            $uretilentok = $object->token_uret_yeni ;
 
        }else{
            
            $uretilentok ="";
 
        }
 
 
        if( $yenino == $uretilentok and $object->giris == 'true' and $object->takip == $takip ){
                
            return true;
                
        }else{
            
/home/okbakademi/public_html/index.php
<?php
 
include_once 'admin/model.php';
 
 
 
/*
if (isset($_SESSION['customer_logged_in']) && $_SESSION['customer_logged_in'] === TRUE) {
 
*/
?>
 
 
<!doctype html>
<html lang="en"> 
  <head>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
 
        <link rel="stylesheet" href="vendor/bootstrap/css/bootstrap.min.css">
        <link rel="stylesheet" href="vendor/fontawesome-free/css/all.min.css">
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.1/css/all.min.css" integrity="sha512-MV7K8+y+gLIBoVD59lQIYicR65iaqukzvf/nwasF0nqhPay5w/9lJmVM2hMDcnK1OnMGCdVK+iQrJ7lzPJQd1w==" crossorigin="anonymous" referrerpolicy="no-referrer" />
        <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.3.0/font/bootstrap-icons.css">
        <link rel="preconnect" href="https://fonts.googleapis.com">
        <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
        <link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@100;200;300;400;500;600;700;800&display=swap" rel="stylesheet">
        <link rel="stylesheet" href="css/custom.css">
 
    <title></title>
  </head>
  <body>
   
   
    <div class="container">
     
        <div class="row mt-5">
        <div class="col-md-12">
            <div class="row">
                <div class="col-md-4 logo"><a style="text-decoration: none; color: black;" href="https://www.zeynepozmeydan.com.tr/"><img class="img-responsive" src="images/logo.png" alt=""></a> </div>

Environment & details:

empty
empty
empty
empty
empty
Key Value
USER okbakademi
HOME /home/okbakademi
SCRIPT_NAME /index.php
REQUEST_URI /
QUERY_STRING
REQUEST_METHOD GET
SERVER_PROTOCOL HTTP/1.1
GATEWAY_INTERFACE CGI/1.1
REMOTE_PORT 19495
SCRIPT_FILENAME /home/okbakademi/public_html/index.php
SERVER_ADMIN webmaster@okbakademi.com
CONTEXT_DOCUMENT_ROOT /home/okbakademi/public_html
CONTEXT_PREFIX
REQUEST_SCHEME https
DOCUMENT_ROOT /home/okbakademi/public_html
REMOTE_ADDR 216.73.216.147
SERVER_PORT 443
SERVER_ADDR 45.87.120.235
SERVER_NAME mail.okbakademi.com
SERVER_SOFTWARE Apache
SERVER_SIGNATURE
PATH /usr/local/jdk/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/usr/X11R6/bin:/root/bin:/opt/bin
HTTP_X_HTTPS 1
HTTP_HOST mail.okbakademi.com
HTTP_ACCEPT_ENCODING gzip, br, zstd, deflate
HTTP_USER_AGENT Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
HTTP_ACCEPT */*
proxy-nokeepalive 1
SSL_TLS_SNI mail.okbakademi.com
HTTPS on
SCRIPT_URI https://mail.okbakademi.com/
SCRIPT_URL /
UNIQUE_ID aTO8QCxtG3SFC2ODLAKHQAAAAAA
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1764998208.3817
REQUEST_TIME 1764998208
argv Array ( )
argc 0
empty
0. Whoops\Handler\PrettyPageHandler