Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

On my Ubuntu 12.04 Server LTS on nginx 1.1.19, the following PHP code works properly:

switch($_SESSION['user']['permissions']) {
        case 9:
            echo "Super Admin Privileges";
            break;
        case 0:
            echo "Operator Privileges";
            break;
        case 1:
            echo "Line Leader Privileges";
            break;
        case 2:
            echo "Supervisor Privileges";
            break;
        case 3:
            echo "Engineer Privileges";
            break;
        case 4:
            echo "Manager Privileges";
            break;
        case 5:
            echo "Administrator Privileges";
            break;
        default:
            echo "Operator Privileges";
    }

However, I have a backup server running Ubuntu Server 13.04 on nginx 1.4.1 which has the exact same copy of the script (synced) but instead of breaking on the break; command, it echos the whole php script.

The output on the 12.04 Box is similar to this:

You are logged in with Super Admin Privileges

But on the 13.04 Box, the output is like this:

You are logged in logged in with Super Admin Privileges"; break; case 0: echo "Operator Privileges"; break; case 1: echo "Line Leader Privileges"; break; case 2: echo "Supervisor Privileges"; break; case 3: echo "Engineer Privileges"; break; case 4: echo "Manager Privileges"; break; case 5: echo "Administrator Privileges"; break; default: echo "Operator Privileges"; } ?>

I have also tried changing the script from switch statement to if statements but same results. Any idea what is wrong?

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.