A secure, administrator-only plugin for displaying comprehensive PHP configuration information in CMS Made Simple.
The CMSMS phpinfo Plugin provides a simple and secure way to view your server's PHP configuration directly from within CMS Made Simple. This diagnostic tool is essential for developers and administrators who need to verify server settings, loaded extensions, and PHP configuration values.
- Admin-Only Access - Restricted to users with "Manage Settings" permission
- Comprehensive Information - Displays full PHP configuration including version, modules, and settings
- Error Handling - Robust error handling with safe error messages
- PHP 7.4-8.6 Compatible - Works across modern PHP versions
- Simple Integration - Just add
{phpinfo}tag to any page - Security-First Design - Built with security best practices from the ground up
IMPORTANT: This plugin exposes sensitive server information including PHP version, configuration directives, loaded extensions, and environment variables.
- Access is automatically restricted to administrators with "Manage Settings" permission
- Never use this plugin on a publicly accessible page
- Consider removing the plugin from production sites after diagnostics are complete
You can download the plugin from either:
- GitHub: Download
function.phpinfo.phpfrom this repository - CMSMS Forge: Official plugin page at dev.cmsmadesimple.org/projects/php_info_plugin
-
Download the Plugin
- Download
function.phpinfo.phpfrom this repository or the CMSMS Forge
- Download
-
Upload to CMSMS
- Navigate to your CMSMS installation directory
- Upload the file to:
assets/plugins/ - Ensure proper file permissions (typically 644)
-
Verify Installation
- Log in to your CMSMS admin panel
- Go to Extensions β User Defined Tags
- Look for "phpinfo" in the list of available functions
Simply add the following tag to any CMSMS page or template:
{phpinfo}For best results, follow these steps:
-
Create a New Page
- In CMSMS admin, create a new page (e.g., "Server Info" or "PHP Diagnostics")
-
Assign a Block Template
- Choose a minimal "block" template (no header/footer)
- This prevents HTML conflicts with phpinfo's full HTML output
-
Add the Tag
- In the page content, add:
{phpinfo}
- In the page content, add:
-
Set Page Properties
- Mark the page as "hidden" or restrict it in your navigation
- Optionally set "Show in Menu" to "No"
-
Access the Page
- Visit the page as an administrator
- You'll see the complete PHP information display
The plugin shows comprehensive PHP details including:
- β PHP version and build information
- β Server API and configuration
- β Loaded PHP extensions and modules
- β PHP directives and their current values
- β Environment variables
- β Configuration file (php.ini) location
- β Apache/web server information (if available)
| Requirement | Version/Details |
|---|---|
| CMS Made Simple | 2.x or higher (tested on latest versions) |
| PHP | 7.4, 8.0, 8.1, 8.2, 8.3, 8.4, 8.5, 8.6 |
| Admin Permission | "Manage Settings" permission required |
| Server | Compatible with AlmaLinux, Ubuntu, and most Linux distributions |
Problem: Red error message saying "Access Denied: Administrator privileges required"
Solution:
- Ensure you're logged in as an administrator
- Verify your user account has "Manage Settings" permission
- Check in: Extensions β User Management β Groups
Problem: Page shows nothing or is blank
Solution:
- Verify the plugin file is correctly uploaded to the
plugins/directory - Check file permissions (should be 644)
- Look for PHP errors in your server error log
- Ensure phpinfo() function is not disabled in php.ini (check
disable_functionsdirective)
Problem: Page layout breaks or looks strange
Solution:
- Use a "block" template without header/footer
- Create a dedicated page just for phpinfo display
- The phpinfo() function outputs a complete HTML document, which conflicts with most site templates
Problem: Function not working on CyberPanel/OpenLiteSpeed
Solution:
- Verify PHP is running in LSAPI mode
- Check that phpinfo() is not disabled in your PHP configuration
- Test with a simple PHP file first to ensure phpinfo() works on your server
Contributions, issues, and feature requests are welcome!
- CMSMS Forge: dev.cmsmadesimple.org/projects/php_info_plugin
- Official bug tracker and feature requests
- Release history and updates
- GitHub Issues: Submit issues and pull requests on this repository
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- Email: info@newstargeted.com
- Website: newstargeted.com
- CMSMS Forge Profile: master3395
Feel free to reach out with questions, suggestions, or issues!
If you find this plugin useful and would like to support its development, consider making a donation!
Security & Compatibility Update
- β Added admin-only access restriction (requires "Manage Settings" permission)
- β Fixed deprecated pass-by-reference syntax for PHP 8+ compatibility
- β Implemented output buffering to properly capture phpinfo() output
- β Added comprehensive error handling with try-catch blocks
- β Fixed syntax errors in help function
- β Added security warnings in documentation
- β Verified compatibility with PHP 7.4 through 8.6
Initial Release
- Basic phpinfo() display functionality
- Simple Smarty function integration
This project is licensed under the GNU General Public License v3.0 (GPL-3.0).
Copyright (C) 2025 Kim Birkeland Skorgenes
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
See the LICENSE file for the full license text.
Made with β€οΈ by NewStargeted
Empowering CMSMS developers with better tools