skip to Main Content

the line $_SERVER['REQUEST_URI'] = MSU_REQUEST_URI;
Fills my errorslog with

Use of undefined constant MSU_PHPEX_PS – assumed ‘MSU_PHPEX_PS’ (this
will throw an Error in a future version of PHP)

So I was thinking to solved it with $_SERVER['REQUEST_URI'] = 'MSU_REQUEST_URI';
Than is the warning gone but the script isn’t working any longer.
Any ideas?

2

Answers


  1. Chosen as BEST ANSWER

    Thanks for the response I found a other page with code about the MSU_REQUEST_URI

     <?php
    if(defined('MSU_REQUEST_URI')) {
        return;
    }
    
    if(version_compare(PHPBB_VERSION, '3.1', '>=')) {
        global $phpEx;
        // Fixing Symphony rewrite compatibility
        $_SERVER['PATH_INFO'] = '';
        $_SERVER['PHP_SELF'] = $_SERVER['SCRIPT_NAME'];
        define('MSU_REQUEST_URI', $_SERVER['REQUEST_URI']);
        if(
            in_array(
                basename($_SERVER['SCRIPT_NAME']),
                array(
                    'viewtopic.'.$phpEx,
                    'viewforum.'.$phpEx,
                    'search.'.$phpEx,
                    'memberlist.'.$phpEx,
                    'faq.'.$phpEx,
                    'viewonline.'.$phpEx,
                    'ucp.'.$phpEx
                )
            )
        ) {
            $_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME'].(!empty($_SERVER['QUERY_STRING']) ? '?'.$_SERVER['QUERY_STRING'] : '');
        }
        if(!defined('PHPBB_USE_BOARD_URL_PATH')) {
            define('PHPBB_USE_BOARD_URL_PATH', true);
        }
    }
    
    ?>
    

    Is that helping


  2. The Problem you’re having is that MSU_REQUEST_URI is undefined

    This means whatever value you expected the constant MSU_REQUEST_URI to have, has not been set at the time of you executing $_SERVER['REQUEST_URI'] = MSU_REQUEST_URI;,

    By surrounding MSU_REQUEST_URI with quotes like this 'MSU_REQUEST_URI' you are assigning the String Value (literally) “MSU_REQUEST_URI” to $_SERVER['REQUEST_URI'].

    So as @alithedeveloper has asked in the comments:

    What is MSU_REQUEST_URI supposed to be and how/where is it supposed to get it’s value from?

    You won’t be able to solve your issue without figuring out why MSU_REQUEST_URI is not set.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search