PHPackages                             kiatng/openmage-shooter - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. kiatng/openmage-shooter

ActiveMagento-module[Utility &amp; Helpers](/categories/utility)

kiatng/openmage-shooter
=======================

Troubleshooting tool for OpenMage developers

v1.2.5(1y ago)8231GPL-3.0PHPPHP &gt;=7.4

Since Nov 3Pushed 1y ago2 watchersCompare

[ Source](https://github.com/kiatng/openmage-shooter)[ Packagist](https://packagist.org/packages/kiatng/openmage-shooter)[ Docs](https://github.com/kiatng/openmage-shooter)[ RSS](/packages/kiatng-openmage-shooter/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (7)Dependencies (1)Versions (10)Used By (0)

Shooter - A Troubleshooting Tool for OpenMage Developers
========================================================

[](#shooter---a-troubleshooting-tool-for-openmage-developers)

A browser-centric troubleshooting tool for OpenMage developers. Features:

- Logging capabilities:
    - Custom logging with timestamp, URI, and user context
    - Support logging of objects (Varien\_Object and collections)
    - Trace stack logging for debugging
- Browser debug output:
    - Recent logs from exception, system, and other log files
    - Echo variables, objects, and collections with formatting
    - Display controller request parameters including uploaded files parameters
- System information:
    - Server host name, IP address, OS, PHP version
    - OpenMage version
    - PHP information
- OAuth 1.0a Tester:
    - Test OpenMage REST API as a consumer
    - Test SSL connection

**CAUTION**: This module is designed for development environments. It may not be suitable for production environments due to the potential for exposing sensitive information.

Table of Contents
-----------------

[](#table-of-contents)

1. [Quick Start](#quick-start)
    - [Debug Helper](#debug-helper)
    - [Output the Log Files in the Browser](#output-the-log-files-in-the-browser)
    - [Capture the Last Error](#capture-the-last-error)
    - [Show Information in the Browser](#show-information-in-the-browser)
    - [REST OAuth 1.0a Tester](#oauth-10a-tester)
2. [Configuration](#configuration)
    - [Customizing Customer IDs for Access](#customizing-customer-ids-for-access)
3. [Installation](#installation)
    - [Composer](#composer)
    - [Manual Installation](#manual-installation)
4. [Contributing](#contributing)
5. [License](#license)

Quick Start
-----------

[](#quick-start)

You need to be able to access the customers in the database. By default, the first 20 customers with ID from 1 to 20 are allowed to view the output in the browser. You can edit the `entity_id` in the table `customer_entity` for these users. To allow access for specified customer IDs, see [Configuration](#configuration).

### Debug Helper

[](#debug-helper)

Example uses of the helper:

```
// Add a log entry to file var/log/shooter.log:
Mage::helper('shooter')->log("string=$string", $var); // Log a message
Mage::helper('shooter')->trace('trace message'); // Trace the call stack

// To troubleshoot controllers:
return Mage::helper('shooter')->echoParams($var); // Display the request parameters, $var is optional
return Mage::helper('shooter')->echo($var, $title); // Display a variable, $title is optional
```

### Output the Log Files in the Browser

[](#output-the-log-files-in-the-browser)

#### URI `/shooter/log`

[](#uri-shooterlog)

To output the recent entries of the log files in `var/log/*.log` and `var/report/{latest file}`:

```
{http://your_domain}/shooter/log

```

Optional parameters:

- `?lines=L`, where L is the number of lines to display, default is 80.
- `?secs=S`, where S is the number of seconds from the modification time beyond which the file will not be displayed, default is 80.

For example, to list the log files from the last 120 lines and modified in the last hour:

```
{http://your_domain}/shooter/log?lines=120&secs=3600

```

#### URI `shooter/log/tail`

[](#uri-shooterlogtail)

To show `exception.log`:

```
{http://your_domain}/shooter/log/tail

```

Optional parameters:

- `?fnm=F`, where F is the name of the file to display, default is `exception.log`.
- `?lines=L`, where L is the number of lines to display, default is 80.
- `?dir=D`, where D is the directory of the file to display, default is `var/log`.

Refer to [LogController.php](app/code/community/Kiatng/Shooter/controllers/LogController.php) for more details.

#### Capture `error_get_last()`

[](#capture-error_get_last)

To capture the last error, insert the following code in index.php, just before the last line `Mage::run($mageRunCode, $mageRunType);`:

```
// Insert this code before the last line `Mage::run($mageRunCode, $mageRunType);`
register_shutdown_function(function(){
    $err = error_get_last();
    if ($err && $err['type'] != E_WARNING) {
        $err['type'] = $err['type'] . ':' . array_search($err['type'], get_defined_constants(true)['Core']);
        $err['uri'] = $_SERVER['REQUEST_URI'] ?? $_SERVER['SCRIPT_NAME'];
        [$err['user'], $err['role']] = Mage::helper('shooter')->getSessionUser();
        Mage::getModel('core/flag', ['flag_code' => 'error_get_last'])
            ->loadSelf()
            ->setFlagData($err)
            ->save();
    }
});
```

The error captured is displayed with URI `/shooter/log`.

### Show Information in the Browser

[](#show-information-in-the-browser)

```
{http://your_domain}/shooter/info # Display PHP information
{http://your_domain}/shooter/info/ver # Display OpenMage version
{http://your_domain}/shooter/info/server # Display server information
{http://your_domain}/shooter/info/redis # Display Redis info

```

Refer to [InfoController.php](app/code/community/Kiatng/Shooter/controllers/InfoController.php) for more details.

### REST OAuth 1.0a Tester

[](#rest-oauth-10a-tester)

The tester allows you to test the OpenMage REST API as a consumer interactively with a browser. Use the following URI to access it:

```
{http://your_domain}/shooter/rest

```

The OAuth credentials are only stored in the session and never saved anywhere else.

Refer to [RestController.php](app/code/community/Kiatng/Shooter/controllers/RestController.php) for more details.

#### Test SSL Connection

[](#test-ssl-connection)

For public accessible URLs, tools like [SSL Labs](https://www.ssllabs.com/ssltest/analyze.html) may be preferred. But if the site is private or under development, this tester is useful:

```
{http://your_domain}/shooter/ssl?url={url}

```

Refer to [SslController.php](app/code/community/Kiatng/Shooter/controllers/SslController.php) for more details.

Configuration
-------------

[](#configuration)

### Customizing Customer IDs for Access

[](#customizing-customer-ids-for-access)

By default, the module allows the first 20 customers (with IDs from 1 to 20) to access the output in the browser. To customize this behavior, you can define the allowed customer IDs in your module `config.xml` configuration file.

1. Open the file `etc/config.xml` in in your module.
2. Add the following configuration under the `` section:

    ```

                5
                100,200

    ```
3. Save the file and clear the `config` cache to apply the changes.
4. Because the access is saved in frontend session, re-login may be required.
5. If your config doesn't work, add dependency in `/app/etc/modules/Your_Module.xml`:

    ```

                true
                local

    ```

Installation
------------

[](#installation)

### modman

[](#modman)

Use [modman](https://github.com/colinmollenhour/modman) to install the module, open a bash terminal and run:

```
modman clone https://github.com/kiatng/openmage-shooter
```

### Composer

[](#composer)

Open a bash terminal and run:

```
composer require kiatng/openmage-shooter
```

### Manual Installation

[](#manual-installation)

Download the files in the `app` directory to your OpenMage root directory.

Contributing
------------

[](#contributing)

We welcome contributions! Here's how you can help:

1. Fork the repository
2. Create a feature branch
3. Submit a Pull Request with your changes
4. Update documentation as needed

Please follow our coding standards and include appropriate documentation with your contributions.

### Contributors ✨

[](#contributors-)

Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):

License
-------

[](#license)

@copyright 2024-2025 Ng Kiat Siong This module is licensed under the GNU GPL v3.0.

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance48

Moderate activity, may be stable

Popularity13

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~21 days

Recently: every ~35 days

Total

9

Last Release

379d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/751e8482cfb43e560a8b7bf561d7db5f47661932061d9603324afe957b4b9e3f?d=identicon)[kiatng](/maintainers/kiatng)

---

Top Contributors

[![kiatng](https://avatars.githubusercontent.com/u/1106470?v=4)](https://github.com/kiatng "kiatng (25 commits)")

### Embed Badge

![Health badge](/badges/kiatng-openmage-shooter/health.svg)

```
[![Health](https://phpackages.com/badges/kiatng-openmage-shooter/health.svg)](https://phpackages.com/packages/kiatng-openmage-shooter)
```

###  Alternatives

[inviqa/magento-symfony-container

Provides Magento with an instance of a Symfony DI Container

2436.5k](/packages/inviqa-magento-symfony-container)[tim-reynolds/magento-qconfig

Magento config quick search

513.0k](/packages/tim-reynolds-magento-qconfig)[fastly/cdn

Fastly CDN module for Magento 1.x

275.5k](/packages/fastly-cdn)[clerk/magento

Clerk.io Turns More Browsers Into Buyers

1029.4k](/packages/clerk-magento)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
