A Support Tool
Re: A Support Tool
@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
@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.
Re: A Support Tool
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...

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
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
Re: A Support Tool
FYI - There's been a "System Info" module for quite a while.
http://dev.cmsmadesimple.org/projects/sysinfo/
http://dev.cmsmadesimple.org/projects/sysinfo/
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
Re: A Support Tool
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.

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.
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.
Re: A Support Tool
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:
but it makes the script abort at that point.
I've never used Postgre, so I'm stuck here.
Nullig
I tried:
Code: Select all
if (pg_version())
echo "<b>PostgreSQL Server Version:</b> " . pg_version() . "<br /> <br />";
I've never used Postgre, so I'm stuck here.
Nullig
Re: A Support Tool
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
@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
Yes, as PierreM say that value is a arrayNullig wrote:Code: Select all
if (pg_version()) echo "<b>PostgreSQL Server Version:</b> " . pg_version() . "<br /> <br />";
I use this:
Albyswitch($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;
}
Re: A Support Tool
mysql_get_server_info() is a function from the 'mysql' extension.Code: Select all
case 'mysql': case 'mysqli': $v = mysql_get_server_info();
For 'mysqli' it is mysqli_get_server_info() (or use mysqli_get_server_version()).
Re: A Support Tool
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
Thanks,
Nullig
Re: A Support Tool
ok test and work: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?
Nullig test in SVN tooswitch($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;
}
Alby