Changeset 1854382
- Timestamp:
- 04/06/2018 11:54:57 PM (8 years ago)
- Location:
- lw-mwp-tools/trunk
- Files:
-
- 2 edited
-
lw-mwp-tools.php (modified) (4 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lw-mwp-tools/trunk/lw-mwp-tools.php
r1850976 r1854382 5 5 Description: Easy access to system logs and resource usage on the Liquid Web Managed WordPress Hosting Platform. 6 6 Author: Francis Smith 7 Version: 0.3. 57 Version: 0.3.6 8 8 Author URI: https://github.com/fs1995 9 9 License: GPL2 … … 66 66 67 67 function lw_mwp_tools_info(){ //generate the resource monitor page 68 if(isset($_POST['servermonitor-phpinfo'])){ 69 echo phpinfo(); 70 exit; 71 } 68 72 $lwmwptools_uptime = floatval(file_get_contents('/proc/uptime')); //read uptime 69 73 $lwmwptools_uptime_secs = round(fmod($lwmwptools_uptime, 60), 0); $lwmwptools_uptime = (int)($lwmwptools_uptime / 60); … … 72 76 $lwmwptools_uptime_days = $lwmwptools_uptime; 73 77 74 echo "<div class=\"wrap\"><h1>System Information</h1>Hostname: ", gethostname(), "<br>Uptime: ", $lwmwptools_uptime_days, " days, ", $lwmwptools_uptime_hr, " hours, ", $lwmwptools_uptime_mins, " minutes, ", $lwmwptools_uptime_secs, " seconds.<br>Server IP: ", $_SERVER['SERVER_ADDR'], "<br>PHP version: ", phpversion(), "<br>Platform: ", PHP_OS, "</div>";78 echo "<div class=\"wrap\"><h1>System Information</h1>Hostname: ", gethostname(), "<br>Uptime: ", $lwmwptools_uptime_days, " days, ", $lwmwptools_uptime_hr, " hours, ", $lwmwptools_uptime_mins, " minutes, ", $lwmwptools_uptime_secs, " seconds.<br>Server IP: ", $_SERVER['SERVER_ADDR'], "<br>PHP version: ", phpversion(), "<br>Platform: ", PHP_OS, "<br><br></div><form method=\"post\" action=\"\"><input type=\"submit\" name=\"servermonitor-phpinfo\" value=\"View phpinfo()\" /></form>"; 75 79 } 76 80 … … 116 120 117 121 function lw_mwp_tools_php(){ //generate the php error log page 118 echo "<div class=\"wrap\"><h1>PHP Error Log viewer</h1>This page does not automatically update, you will need to refresh it. If you are troubleshooting WordPress code, have you turned on <a href=\"https://codex.wordpress.org/Debugging_in_WordPress\" target=\"_blank\">WP_DEBUG</a> in wp-config.php?</div><pre>". lwmwptools_readlog( '/var/log/'.get_current_user().'-php-fpm-errors.log') ."</pre>";119 } 122 echo "<div class=\"wrap\"><h1>PHP Error Log viewer</h1>This page does not automatically update, you will need to refresh it. If you are troubleshooting WordPress code, have you turned on <a href=\"https://codex.wordpress.org/Debugging_in_WordPress\" target=\"_blank\">WP_DEBUG</a> in wp-config.php?</div><pre>". lwmwptools_readlog(ini_get('error_log')) ."</pre>"; 123 } //passing the lwmwptools_readlog function the php error log location, which will return the contents of the log for this function to display 120 124 121 125 function lw_mwp_tools_nginx_access(){ //generate the nginx access log page -
lw-mwp-tools/trunk/readme.txt
r1850972 r1854382 2 2 Contributors: fs1995 3 3 Donate link: https://paypal.me/fs1995 4 Tags: liquidweb, liquid web, server info 4 Tags: liquidweb, liquid web, server info, monitor, debug 5 5 Requires at least: 3.4 6 6 Tested up to: 4.9.4 … … 24 24 25 25 == Changelog == 26 27 = 0.3.6 = 28 *Release Date - Apr 6, 2018* 29 30 * Don't hardcode PHP error log location. 31 * View phpinfo(). 26 32 27 33 = 0.3.5 =
Note: See TracChangeset
for help on using the changeset viewer.