vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Show PHP & MySQL Version Info in Admin Panel (https://vborg.vbsupport.ru/showthread.php?t=36733)

Marshalus 03-29-2002 10:00 PM

Show PHP & MySQL Version Info in Admin Panel
 
One of my admins wanted a way to keep track of what versions of software we run on our server are at, so I threw together this little hack.

It's really very simple, and only requires one code hack in admin/index.php.

In admin/index.php find:
Code:

<tr class="secondalt">
        <td>Useful Links</td>
        <td><select onchange="jumpto(this.options[this.selectedIndex].value)">
                <option>&raquo; Useful Links &laquo;</option>
                <option value="http://www.vbulletin.com/">vBulletin Home Page</option>
                <option value="http://www.vbulletin.com/members/">vBulletin Members' Area</option>
                <option value="http://www.vbulletin.com/forum/">vBulletin Support Forums</option>
                <option value="http://www.vbulletin.com/manual/">vBulletin Online Manual</option>
                <option value="http://www.php.net/">PHP Home Page</option>
                <option value="http://www.php.net/manual/">PHP Online Manual</option>
                <option value="http://www.mysql.com/">MySQL Home Page</option>
                <option value="http://www.mysql.com/documentation/">MySQL Documentation</option>
        </select></td>
</tr>
</form>

Directly under that place:
Code:

<tr class="firstalt">
        <td>PHP Version</td>
        <td><?php echo 'v' . phpversion(); ?></td>
</tr>
<tr class="secondalt">
        <td>MySQL Version</td>
        <td><?php echo 'v' . mysql_get_server_info(); ?></td>
</tr>

Save and reupload, and thats it.

Works with all versions of vBulletin but requires PHP v4.0.5 to display the MySQL server info. If you have that version (which you shouldn't, get 4.1.2 if you can) then just remove the second section of the code. PHP version information will load on all copies of PHP.

Disclamer, if you break it, it's not my fault.

Admin 03-30-2002 05:29 AM

You can already access this info from /admin/index.php?s=&action=phpinfo

Neo 03-30-2002 06:40 AM

firefly.. do you think there should be a disclaimer before you post a hack?

Marshalus 03-31-2002 04:32 AM

The disclamer was a joke.

Thomas P 04-05-2002 04:26 PM

I've to admin I like it! :)
So you can see at the first glance in the CP if your hoster has updated any of both versions, i.e. php or mysql.
Thx,
-Tom

Mathiau 05-01-2002 07:41 AM

nice nice, since i am the admin, and got remote access to our server, i can know as well if any one was trying to mess with MY forum! :D and decapitate em!

and if i do break it, i will be breaking someone :)

thnx m8!

claussen 11-07-2002 07:05 AM

very good idea. quick, easy, and useful.

Thank you.


All times are GMT. The time now is 11:16 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02112 seconds
  • Memory Usage 1,721KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete