Jump to content

TCAdmin To LGSL v1.2


whoisrich

Recommended Posts

Greetings, I am the creator of a server monitoring script called LGSL, which seems to be popular with various TCAdmin users, and I was asked to create a script that puts TCAdmin servers into LGSL.

 

The script is now finished and tested as working, so I am sharing it here for everyone else, feedback is welcomed :)

 

Technical:

 

- It requires PHP 5.1 or newer, the settings are at the top of the code, along with some helpful information.

 

- The script is independant of TCAdmin and LGSL, it can run on a completely separate host, it just needs a connection to both databases.

 

- Remember that if a database is on a different host, you need to have the database and firewall setup to allow remote access.

 

- During tests it was found some server owners had set the wrong query port in TCAdmin, so query port correction was added. To enable, place a copy of the lgsl_protocol.php ( found within LGSL ) into the same folder as this script. If the host has a firewall, queries need to be allowed.

 

Download:

http://www.greycube.com/help/lgsl_other/tcadmin_to_lgsl_v1.2.zip

Link to comment
Share on other sites

The script password goes in the URL /tcadmin_to_lgsl.php?password=FOOBAR

 

Please note, the script password should be kept simple, it is purely to prevent any chance of a webcrawler running it. If you start putting symbols in the password it may not work as they can conflict with the URL.

 

Your remote DB password however should be very secure for obvious reasons.

Link to comment
Share on other sites

To allow the script to access the TCAdmin database on from a different host, you need to grant access within MySQL itself.

http://dev.mysql.com/doc/refman/5.1/en/grant.html

 

If you have combined PHP and ASP.NET on the TCAdmin server, then you can use phpMyAdmin for the permissions:

http://www.greycube.com/help/lgsl_other/tcadmin_to_lgsl_remote_mysql.png

 

If not, you can use the MySQL command line, or any tool that allows you to run MySQL commands. Here is what to type, do not miss off the end semi-colons.

 

- Command Prompt, Navigate to the MySQL bin folder.

- Type: mysql.exe -u root -p password

- Type: CREATE USER 'root'@'123.123.123.123' IDENTIFIED BY 'password';

- Type: GRANT ALL PRIVILEGES ON *.* TO 'root'@'123.123.123.123';

- Type: FLUSH PRIVILEGES;

- Type: SELECT User,Host FROM mysql.user;

- Type: QUIT

 

( change 123.123.123.123 to script host IP, and password to the actual password )

Link to comment
Share on other sites

still no luck for me still getting

 

Transfer started.

lgsl_protocol.php was found - query port checking enabled.

TCAdmin database connection failed: SQLSTATE[HY000] [2003] Can't connect to MySQL server on '213.229.97.226' (110)

 

do you have any messenger or any other IM contact rich?

Link to comment
Share on other sites

  • 4 weeks later...
  • 3 weeks later...

I have this error:

 

Transfer started.

lgsl_protocol.php was found - query port checking enabled.

TCAdmin database connection failed: could not find driver

 

Running this script on the freebsd 8.0 box with php 5.2 support and all php 5.2 extensions compiled.

 

//update. found the solution.

Need to install databases/php5-pdo_mysql port

Link to comment
Share on other sites

  • 2 weeks later...
  • 3 weeks later...
  • 2 years later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Terms of Use