logo
Apache Lounge
Webmasters

 


About

Forum Index Downloads Search Register Log in  RSS Apache Lounge
 



Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Apache Lounge is not sponsored.

Your donations will help to keep this site alive and well, and continuing building binaries.



MySQL info script

 
Post new topic   Reply to topic    Apache Forum Index -> Apache Webmaster Tools & Utilities



View previous topic :: View next topic  
Author Message
Steffen
Moderator


Joined: 15 Oct 2005
Posts: 2581
Location: Hilversum, NL, EU

PostPosted: Sun 27 Aug '06 21:03    Post subject: MySQL info script Reply with quote

With MySQL I missed a script like phpinfo for php.

I made a simple PHP script for testing a MySQL connection and viewing the Mysql settings. Also it shows the MySQL Runtime Information and MySQL Server variables and settings. Also I included phpinfo().

Download at www.apachelounge.com/download/mysqlinfo.zip

I hope you like it and additions are welcome.

Steffen
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 6255
Location: Germany, Next to Hamburg

PostPosted: Sun 27 Aug '06 21:47    Post subject: Reply with quote

For testing MySQLi you can add this

Code:

if(extension_loaded("MySQLi")){
   $mysqli = new mysqli($host, $user, $password);

   /* check connection */
   if (mysqli_connect_errno()) {
          printf("Connect failed: %s\n", mysqli_connect_error());
          exit();
   }

printf("Host information: %s\n", $mysqli->host_info);

/* close connection */
$mysqli->close();

}
else
{
echo "MySQLi not loaded";
}
Back to top
Steffen
Moderator


Joined: 15 Oct 2005
Posts: 2581
Location: Hilversum, NL, EU

PostPosted: Tue 29 Aug '06 18:50    Post subject: Reply with quote

Update:
I updated the script with a install check. It gives notice when the mysql extension is not found and gives hints when it cannot connect to a MySQL server.

Steffen
Back to top
Steffen
Moderator


Joined: 15 Oct 2005
Posts: 2581
Location: Hilversum, NL, EU

PostPosted: Wed 18 Oct '06 14:52    Post subject: Reply with quote

Scott Furry has made a mysqlinfo script for the mysqli extension. I included it in the .zip at the download page.

A big thanks! Scott,

Steffen
Back to top


Post new topic   Reply to topic    Apache Forum Index -> Apache Webmaster Tools & Utilities
Page 1 of 1