PDA

View Full Version : Server Info in Admin Control Panel


Darren Lewis
05-26-2002, 10:00 PM
This hack is designed to create an option in your vBulletin admin control panel to display information about the server you are hosting your vBulletin on. I've tested this on V2.2.5, but it should also work on other versions.

Information displayed:-

Server Software Type & Version
Server IP Address
Server Admin email address

PHP version running on server

MySQL Server & Client versions running on server
MySQL Host and Protocol information.

Your current IP address.

Option to display detailed information about PHP running on your server.

Full instructions in the attached zip file.

NEW VERSION 1.10

The new version is now in the new zip file attachment
To upgrade, overwrite the serverinfo.php file with the one in this new zip package.

V1.10 28 May 2002
Added info about MySQL database size (taken from Freddie's Quick Stats Hack at www.vbulletin.org/forum/showthread.php?s=&threadid=37193).

I haven't added any other information from Freddie's hack as it's not really server info.

Darren Lewis
05-27-2002, 08:49 PM
And here's a screenshot from V1.00.

V1.10 adds five rows of info about the size of your MySQL database at the bottom of the MySQL Information area.

John
05-27-2002, 09:27 PM
First of all I got a parse error, then when I finally managed to get to the thing I got this on the overview page:

Fatal error: Call to undefined function: mysql_get_host_info() in /home/sites/site115/web/admin/serverinfo.php on line 15

John
05-27-2002, 09:29 PM
And that error is also on the php page

RDX1
05-27-2002, 09:49 PM
why not have this on the main page when you enter ACP

Minots
05-27-2002, 10:06 PM
@ Darren Lewis
It works fine for me.
Thank you

Slynderdale
05-27-2002, 11:19 PM
cool hack, im gonna intergrate some of the info into my main admin page quick stats instead in a new area though, heres my current quick stats.

CeleronXL
05-27-2002, 11:39 PM
Yeppers, worked perfectly for me too. Thanks. :)

Floris
05-28-2002, 06:22 AM
Nice addition to the one freddie made.

Slynderdale
05-28-2002, 06:23 AM
Originally posted by xiphoid
Nice addition to the one freddie made.

Yea i like freddies quick stats hack, im gonna edit it a little so it has the info above in this hack and has categories and look better

Darren Lewis
05-28-2002, 01:33 PM
JohnWarwick I can't understand why you're getting error messages. I tested this hack locally on my own computer (Windows and PHP 4.2.1) and also on my website (Linux and PHP 4.1.2). What system are you running? I haven't tried it with IIS.

Slynderdale I like the way you've done things there. I haven't looked at Freddie's hack, but will do so.

KarateKid
05-28-2002, 01:37 PM
@Slynderdale: Could you combine your addons with the hack here and bring it out together? :)

Darren Lewis
05-28-2002, 01:43 PM
Originally posted by NerdNations
why not have this on the main page when you enter ACP
To do this, open up your admin/index.php in your text editor.

Find this code (approx line 163)

<option value="http://www.mysql.com/documentation/">MySQL Documentation</option>
</select></td>
</tr>
</form>
</table>
</td></tr></table>
</form>
<?php


Add this code below it (taken from the serverinfo.php file)

// Server Info
$phpversion = phpversion();
$mysqlhost = mysql_get_host_info();
$mysqlproto = mysql_get_proto_info();
$mysqlserver = mysql_get_server_info();
$mysqlclient = mysql_get_client_info();
doformheader("","");
maketableheader("Server Information");
makelabelcode("<b>Server Software</b>","$SERVER_SOFTWARE");
makelabelcode("<b>Server IP address</b>","$SERVER_ADDR");
makelabelcode("<b>Server Admin Email</b>","<a href=\"mailto:$SERVER_ADMIN\">$SERVER_ADMIN</a>");
makelabelcode("<b>Server Protocol</b>","$SERVER_PROTOCOL");
makelabelcode("<b>Server Port</b>","$SERVER_PORT");
makelabelcode("<b>Server Signature</b>","$SERVER_SIGNATURE");
maketableheader("PHP Information");
makelabelcode("<a href=\"http://www.php.net\" target=\"_blank\"><b>PHP Homepage</b></a>");
makelabelcode("<b>PHP Version</b>","$phpversion");
maketableheader("MySQL Information", "", 0, 2);
makelabelcode("<a href=\"http://www.mysql.com\" target=\"_blank\"><b>MySQL Homepage</b></a>");
makelabelcode("<b>MySQL Host</b>","$mysqlhost");
makelabelcode("<b>MySQL Protocol</b>","$mysqlproto");
makelabelcode("<b>MySQL Server Version</b>","$mysqlserver");
makelabelcode("<b>MySQL Client Version</b>","$mysqlclient");
maketableheader("Other Information");
makelabelcode("<b>Your Current IP address</b>","$REMOTE_ADDR");
dotablefooter();

Darren Lewis
05-28-2002, 03:33 PM
I've updated the zip file with some code from Freddie's Quick Stats hack so that the page also shows info about the size of your MySQL database.

The other info wasn't really related specifically to server details so I haven't included it. I can post some instructions of how to if people want.

I haven't formally asked Freddie if this is OK so I hope that he doesn't mind :)

Chris M
05-28-2002, 06:28 PM
Nice...

Satan

lohman
06-03-2002, 12:32 AM
Very Convenient, thank you

centris
06-03-2002, 02:36 AM
I can see where a few have had problems LOL, this is the code you insert;

// *************************************************
makenavoption("Overview","serverinfo.php?action=detail","|");
makenavoption("PHP Info","serverinfo.php?action=phpinfo");
makenavselect("Server Information","<hr>");

If you dont read it properly this is probably what you inserted;

// *************************************************
makenavoption("Overview","serverinfo.php?action=detail","|");
makenavoption("PHP Info","serverinfo.php?action=phpinfo");
makenavselect("Server Information","<hr>");

So that it looks like this:-

// *************************************************
makenavoption("Overview","serverinfo.php?action=detail","|");
makenavoption("PHP Info","serverinfo.php?action=phpinfo");
makenavselect("Server Information","<hr>");
// *************************************************
makenavoption("vBulletin Options","options.php?t=0","<br>");
if($debug==1) {
makenavoption("Edit Settings","setting.php?action=modify","<br>");
makenavoption("Add Setting","setting.php?action=add","<br>");
makenavoption("Add Setting Group","setting.php?action=addgroup");
}

Also the serverinfo.php file goes into the admin folder also.

eytan
06-03-2002, 12:57 PM
I seem to be having some problems with it - I am using 2.2.1 - is this why?....

Thanks

Eytan

Darren Lewis
06-03-2002, 06:46 PM
Originally posted by eytan
I seem to be having some problems with it - I am using 2.2.1 - is this why?....
What sort of problems are you having? I haven't been able to try it with earlier versions of vBulletin (I only bought vBulletinat V2.2.4). Do you know what web server software you have? I've only been able to try it on Apache (incl V2) but not on IIS.

Darren.

Stretchr
06-11-2002, 06:17 AM
Thanks, Darren! This is an excellent hack for me because I love to have so much functionality in a single place. Makes for a lot less work and, besides, I already have 20 or so windows open at once! :D

Vile
08-14-2002, 06:18 AM
Great hack, installed just fine:)