Jump to content

500 error after upgrading


0xMerlin

Recommended Posts

Posted

I have a script that is in the root directory of the forums that starts with

 

<?php

$_SERVER['SCRIPT_FILENAME']	= __FILE__;
require_once 'init.php';

\IPS\Dispatcher\Front::i()->init();

it is crashing on the ->init(); now that I updated to 4.1.14.3

 

Any ideas why this causes a crash saying the page doesn't exist (in devmode it says a 500 error) and isn't logging any thing to error_log or the internal logging?

Posted

I found the issue. Dispatcher\Front.php added in internal URL checking as well as $url->base !== 'front' which is breaking the app. Since the app is its own page and calls in the IPB methods, this causes the base to be empty which triggers the 404 code. The only way i could bypass this was to alter the IPB code to add an exception for my page.

 

Is there a better way to do this than always alter the Front.php in every update?

Posted
1 hour ago, 0xMerlin said:

Is there a better way to do this than always alter the Front.php in every update?

They added \IPS\Dispatcher\External::i() for this recently. Try that. 

Posted

I'm not sure I understand what you mean. You would just replace Front with External in that script.

<?php

$_SERVER['SCRIPT_FILENAME']	= __FILE__;
require_once 'init.php';

\IPS\Dispatcher\External::i()->init();

 

 

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...