Q: How to run Magento shell script in browser This question has been asked a few times but none of them solves my issue.
I simply created a file:

/shell/test.php

<?php
require_once 'abstract.php';
class Mage_Shell_Test extends Mage_Shell_Abstract
{
    public function run() {
        echo 'in-shell-test!';
    }
}
$shell = new Mage_Shell_Test();
$shell->run();

and commented out $this->_validate(); in

/shell/abstract.php

Then I still see the page of WHOOPS, OUR BAD...
Appreciate any ideas.

A: You could override the _validate method which is inherited from Mage_Shell_Abstract. This method checks where you are running your script from and it looks like this:
protected function _validate()
{
    if (isset($_SERVER['REQUEST_METHOD'])) {
        die('This script cannot be run from Browser. This is the shell script.');
    }
}

You can change this to return true, but this validation was obviously put there for a reason. If you plan on leaving the script there for a longer period, I would recommend looking for a different approach.
