A Support Tool

Do something cool with CMS? Show us ...
This board is for 'Answers', and the discussion of answers... Not for questions.
User avatar
Nullig
Power Poster
Power Poster
Posts: 2380
Joined: Fri Feb 02, 2007 4:31 pm

Re: A Support Tool

Post by Nullig »

@calguy, I sent you the files for adding this to the Admin Panel.

@everyone - you can see it in action at:

http://sandbox.cmsmsdemo.com/admin

Username demo
Password demo

Go to SiteAdmin -> System Info

Nullig
Last edited by Nullig on Sat Jun 14, 2008 4:56 am, edited 1 time in total.
cyberman

Re: A Support Tool

Post by cyberman »

Great - like it, want it :).
User avatar
kermit
Power Poster
Power Poster
Posts: 693
Joined: Thu Jan 26, 2006 11:46 am

Re: A Support Tool

Post by kermit »

777 needed? i don't think so.. ;)

Directory Permissions:

    * tmp/cache - 0700
    * tmp/templates_c - 0700
    * uploads - 0705
    * modules - 0705


results from the umask test might be helpful, but using the actual username might pose a privacy risk (if report is posted to the forums).. perhaps a check against common known "server" usernames and then just use 'user' if its not one of those? for instance, on this particular site, it reports:

Umask: 072
Owner: (user)
Permissions:
  Owner: Read,Write
  Group:
  Other: Read


could also pull in other 'non-sensitive' config options like default_upload_permission (604 above, btw), auto_alias_content, the various URL settings, and perhaps the default cmsms language...
eternity (n); 1. infinite time, 2. a seemingly long or endless time, 3. the length of time it takes a frozen pizza to cook when you're starving.
4,930,000,000 (n); 1. a very large number, 2. the approximate world population in 1986 when Microsoft Corp issued its IPO. 3. Microsoft's net profit (USD) for the quarter (3 months) ending 31 March 2007.
CMSMS migration and setup services | Hosting with CMSMS installed and ready to go | PM me for Info
jmcgin51
Power Poster
Power Poster
Posts: 1899
Joined: Mon Jun 12, 2006 9:02 pm

Re: A Support Tool

Post by jmcgin51 »

FYI - There's been a "System Info" module for quite a while.

http://dev.cmsmadesimple.org/projects/sysinfo/
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: A Support Tool

Post by calguy1000 »

Okay, I took NullG's files and severely hacked the heck out of em :)

Primarily I moved everything into smarty.

This is all committed to svn now, so anybody running 1.4 svn can see the code and the checks.
I'd like somebody to take this now that I have a good example running and add

a) config information
b) range checking for php version, memory limit  (and display in red, or yellow or something).
c) gd checks (check if gd is found)
d) session save path writable (and display in red if not)
e) better database information
    (so if we are using postgres, etc ,etc, or leave this out, it's rarely a problem).

and anything more we can think of.

I'm happy to answer any technical questions.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
User avatar
Nullig
Power Poster
Power Poster
Posts: 2380
Joined: Fri Feb 02, 2007 4:31 pm

Re: A Support Tool

Post by Nullig »

Are there any Postgre users out there who can help me in trying to find the Postgre equivalent of mysql_get_server_info().

I tried:

Code: Select all

if (pg_version())
echo "<b>PostgreSQL Server Version:</b> " . pg_version() . "<br /> <br />";
but it makes the script abort at that point.

I've never used Postgre, so I'm stuck here.

Nullig
Pierre M.

Re: A Support Tool

Post by Pierre M. »

Hello,

@Nullig : according to http://www.php.net/manual/en/function.pg-version.php pg_version() doesn't deliver a boolean value as http://www.php.net/manual/en/function.pg-ping.php pg_ping(). But I'm not a PHP coder. And http://www.php.net/manual/en/function.p ... status.php could give more parameters/infos. €0.02.

Pierre
alby

Re: A Support Tool

Post by alby »

Nullig wrote:

Code: Select all

if (pg_version())
echo "<b>PostgreSQL Server Version:</b> " . pg_version() . "<br /> <br />";
Yes, as PierreM say that value is a array

I use this:
switch($config['dbms']) //workaroud: ServerInfo() is unsupported in adodblite
{
    case 'postgres7': $v = pg_version();
                        $_server_db = $v['server_version'];
                        break;
    case 'mysql':
    case 'mysqli':      $v = mysql_get_server_info();
                        $_server_db = substr($v, 0, strpos($v, "-"));
                        break;
}
Alby
Wiedmann
Forum Members
Forum Members
Posts: 233
Joined: Wed Mar 26, 2008 1:49 am

Re: A Support Tool

Post by Wiedmann »

Code: Select all

case 'mysql':
case 'mysqli':       $v = mysql_get_server_info();
mysql_get_server_info() is a function from the 'mysql' extension.

For 'mysqli' it is mysqli_get_server_info() (or use mysqli_get_server_version()).
User avatar
Nullig
Power Poster
Power Poster
Posts: 2380
Joined: Fri Feb 02, 2007 4:31 pm

Re: A Support Tool

Post by Nullig »

Thanks, alby and Wiedmann. I've incorporated your suggestions. If anyone uses PostgreSQL or MySQLi, can you check to see if it works?

Thanks,
Nullig
alby

Re: A Support Tool

Post by alby »

Nullig wrote: Thanks, alby and Wiedmann. I've incorporated your suggestions. If anyone uses PostgreSQL or MySQLi, can you check to see if it works?
ok test and work:
switch($config['dbms']) //workaroud: ServerInfo() is unsupported in adodblite
{
        case 'postgres7': $v = pg_version();
                                $_server_db = (isset($v['server_version'])) ? $v['server_version'] : $v['client'];
                                break;
        case 'mysqli':  $v = $db->connectionId->server_info;
        case 'mysql':  if(!isset($v)) $v = mysql_get_server_info();
                                $_server_db = (false === strpos($v, "-")) ? $v : substr($v, 0, strpos($v, "-"));
                                break;
}
Nullig test in SVN too

Alby
Locked

Return to “Tips and Tricks”