Page 2 of 2
Re: A Support Tool
Posted: Sat Jun 14, 2008 4:30 am
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
Re: A Support Tool
Posted: Sat Jun 14, 2008 10:10 am
by cyberman
Great - like it, want it

.
Re: A Support Tool
Posted: Sat Jun 14, 2008 1:15 pm
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...
Re: A Support Tool
Posted: Sat Jun 14, 2008 1:17 pm
by jmcgin51
FYI - There's been a "System Info" module for quite a while.
http://dev.cmsmadesimple.org/projects/sysinfo/
Re: A Support Tool
Posted: Sat Jun 14, 2008 3:06 pm
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.
Re: A Support Tool
Posted: Sat Jun 14, 2008 6:04 pm
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
Re: A Support Tool
Posted: Mon Jun 16, 2008 11:09 am
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
Re: A Support Tool
Posted: Mon Jun 16, 2008 12:32 pm
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
Re: A Support Tool
Posted: Mon Jun 16, 2008 12:44 pm
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()).
Re: A Support Tool
Posted: Mon Jun 16, 2008 2:45 pm
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
Re: A Support Tool
Posted: Mon Jun 16, 2008 5:49 pm
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