line: 33 php_define = /home/usbf/public_html/includes/defines.php
line: 34 php_framework = /home/usbf/public_html/includes/framework.php

JPATH_BASE =/home/usbf/public_html
FOUND defines.php
FOUND framework.php
Warning: session_name(): Session name cannot be changed after headers have already been sent in /home/usbf/public_html/libraries/vendor/joomla/session/src/Storage/NativeStorage.php on line 405

line: 82 after crlf Failed to start the session because headers have already been sent by "/home/usbf/public_html/apps/includes/session.php" at line 33. (500 Whoops, looks like something went wrong.)

RuntimeException

HTTP 500 Whoops, looks like something went wrong.

Failed to start the session because headers have already been sent by "/home/usbf/public_html/apps/includes/session.php" at line 33.

Exception

RuntimeException

  1.             throw new \RuntimeException('Failed to start the session: already started by PHP.');
  2.         }
  3.         if (ini_get('session.use_cookies') && headers_sent($file$line))
  4.         {
  5.             throw new \RuntimeException(
  6.                 sprintf('Failed to start the session because headers have already been sent by "%s" at line %d.'$file$line)
  7.             );
  8.         }
  9.         if (!session_start())
  1.                 $this->setId($session_clean);
  2.                 $cookie->set($session_name''time() - 3600);
  3.             }
  4.         }
  5.         parent::start();
  6.         // Try loading data from the session
  7.         if (isset($_SESSION['joomla']) && !empty($_SESSION['joomla'])) {
  8.             $this->data unserialize(base64_decode($_SESSION['joomla']));
  9.         }
  1.         if ($this->isStarted())
  2.         {
  3.             return;
  4.         }
  5.         $this->store->start();
  6.         $this->setState(SessionState::ACTIVE);
  7.         // Initialise the session
  8.         $this->setCounter();
  1.      */
  2.     public function has($name)
  3.     {
  4.         if (!$this->isActive())
  5.         {
  6.             $this->start();
  7.         }
  8.         return $this->store->has($name);
  9.     }
  1.                 $name $args[2] . '.' $name;
  2.             }
  3.         }
  4.         if (parent::has($name)) {
  5.             // Parent is used because of b/c, can be changed in Joomla 5
  6.             return parent::get($name$default);
  7.         }
  8.         /*
Session->get('user') in /home/usbf/public_html/apps/includes/session.php (line 84)
  1. } else {
  2.     $crlf '<br>';
  3. }
  4.     echo "<br> line: " __LINE__ "  after crlf" 
  5. $user    $app->getSession()->get('user');
  6. if ($user->guest) {
  7.     echo 'this is a guest user' $crlf;
  8. } else {
  9.     echo 'user id = ' $user->id ', name = ' $user->name $crlf;
  10. }
include('/home/usbf/public_html/apps/includes/session.php') in /home/usbf/public_html/apps/teamforms.php (line 5)
  1. <?php
  2. // teamforms.php
  3. /// must be before header
  4. include "includes/session.php";    // access joomla login
  5. $ifadmin =  ($my->usertype == 'Administrator' || $my->usertype == 'Super Administrator'  );
  6. /// init variables ///
  7. $script_version $parent_version "021f4-008g1" // 20240204
  8. $script_name    basename(__FILE__);

Stack Trace

RuntimeException
RuntimeException:
Failed to start the session because headers have already been sent by "/home/usbf/public_html/apps/includes/session.php" at line 33.

  at /home/usbf/public_html/libraries/vendor/joomla/session/src/Storage/NativeStorage.php:473
  at Joomla\Session\Storage\NativeStorage->start()
     (/home/usbf/public_html/libraries/src/Session/Storage/JoomlaStorage.php:295)
  at Joomla\CMS\Session\Storage\JoomlaStorage->start()
     (/home/usbf/public_html/libraries/vendor/joomla/session/src/Session.php:406)
  at Joomla\Session\Session->start()
     (/home/usbf/public_html/libraries/vendor/joomla/session/src/Session.php:333)
  at Joomla\Session\Session->has('user')
     (/home/usbf/public_html/libraries/src/Session/Session.php:194)
  at Joomla\CMS\Session\Session->get('user')
     (/home/usbf/public_html/apps/includes/session.php:84)
  at include('/home/usbf/public_html/apps/includes/session.php')
     (/home/usbf/public_html/apps/teamforms.php:5)