Author Topic: MAIN_SCRIPT error (with fix) on 1.9 on PHP 8.1.12  (Read 4630 times)

0 Members and 1 Guest are viewing this topic.

Offline abda53bd

  • Sr. Member
  • ****
  • Posts: 486
    • View Profile
MAIN_SCRIPT error (with fix) on 1.9 on PHP 8.1.12
« on: January 12, 2023, 09:25:08 PM »
PHP Fatal error:  Uncaught Error: Undefined constant "MAIN_SCRIPT" in includes/page_header.php:83

I get this error after creating a new account on a new install and trying to log in.

Fix:
file: global.php
line 27 add:


if(!defined('MAIN_SCRIPT')){
	
define('MAIN_SCRIPT', __FILE__);
}


It's possible this only happens on non-verified accounts

Offline kai

  • Administrator
  • Addicted member
  • *****
  • Posts: 1.423
    • View Profile
    • 4images - Image Gallery Management System
Re: MAIN_SCRIPT error (with fix) on 1.9 on PHP 8.1.12
« Reply #1 on: January 13, 2023, 08:17:00 AM »
Yes, this will be fixed in the next version.
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search