• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Spain CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple Netherlands

All times are UTC




Post new topic Reply to topic  [ 26 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: A Support Tool
PostPosted: Fri Jun 13, 2008 12:24 am 
Offline
Power Poster
Power Poster
User avatar

Joined: Fri Feb 02, 2007 4:31 pm
Posts: 2396
Location: Comox Valley, BC
Here is a small start to something I hope can be incorporated into the CMSMS Admin Panel. The idea is to provide a simple means to gather the basic info required for support questions in the Forum.

Create a UDT called "support_info" and add the following code:

Updated to include CMSMS Version and active modules
Updated 13/6/2008 to add more php config info, browser info and directory permission info
Updated 14/6/2008 mostly cosmetic changes and changed from get_cfg_var to ini_get
Updated 16/6/2008 to add mysqli and postgre db info

Code:
global $gCms;
$db = &$gCms->db;
$config = &$gCms->config;

echo "<b>CMS Made Simple Version:</b> " . $GLOBALS['CMS_VERSION'] . "<br /> <br />";
echo "<b>Installed Modules:</b> ";
echo "<ul>";
$query = "SELECT * FROM ".cms_db_prefix()."modules WHERE active=1";
$dbresult = $db->Execute($query);
while($row = $dbresult->FetchRow()) {
   echo "<li>" . $row['module_name'] . ": " . $row['version'] . "</li>";
}
echo "</ul>";

echo "<b>Current PHP Version:</b> " . phpversion() . "<br /> <br />";
echo "<b>PHP Configuration:</b>";
echo "<ul>";
echo "<li>Maximum Post Size: " . ini_get('post_max_size') . "</li>";
echo "<li>Maximum Upload Size: " . ini_get('upload_max_filesize') . "</li>";
echo "<li>PHP Memory Limit: " . ini_get( 'memory_limit' ) . "</li>";

if (ini_get('safe_mode') == 1) {
        echo "<li>PHP Safe Mode: On</li>";
} else {
        echo "<li>PHP Safe Mode: Off</li>";
}
echo "<li>Maximum Execution Time: " . ini_get('max_execution_time') . " seconds</li>";
echo "<li>Session Save Path: " . session_save_path() . "</li>";

echo "</ul>";

switch($config['dbms'])
{
    case 'postgres7':    $v = pg_version();
         $_server_db = "<b>PostgreSQL Server Version:</b> " . $v['server_version'];
                        break;
    case 'mysql':   $v = mysql_get_server_info();
         $_server_db = "<b>MySQL Server Version:</b> " . $v;
                        break;
    case 'mysqli':      $v = mysqli_get_server_info();
         $_server_db = "<b>MySQLi Server Version:</b> " . $v;
                        break;
}

echo $_server_db . "<br /> <br />";

echo "<b>Server Software:</b> " . $_SERVER['SERVER_SOFTWARE'] . "<br />";
echo "<b>Server API:</b> " . strtoupper(PHP_SAPI) . "<br />";
echo "<b>Server OS:</b> " . PHP_OS . " v " . php_uname('r') . " on " . php_uname('m') . " architecture<br /> <br />";

clearstatcache();

echo "<b>Directory Permissions:</b>";
echo "<ul>";
echo "<li>tmp/cache - " . substr(sprintf('%o', fileperms($config['root_path'].DIRECTORY_SEPARATOR.'tmp/cache')), -4) . "</li>";
echo "<li>tmp/templates_c - " . substr(sprintf('%o', fileperms($config['root_path'].DIRECTORY_SEPARATOR.'tmp/templates_c')), -4) . "</li>";
echo "<li>uploads - " . substr(sprintf('%o', fileperms($config['root_path'].DIRECTORY_SEPARATOR.'uploads')), -4) . "</li>";
echo "<li>modules - " . substr(sprintf('%o', fileperms($config['root_path'].DIRECTORY_SEPARATOR.'modules')), -4) . "</li>";
echo "</ul>";

echo "<b>Browser:</b> " . $_SERVER['HTTP_USER_AGENT'] . "<br />";


Now you can place the {support_info} tag on a test page and it will print out some of the basic configuration info that is required to provide effective support, which you can copy and paste into your Forum posting.

Perhaps others could add to the code, to make it more comprehensive. I'm thinking that we should be able to read the Apache and MySQL log files, to include a number of lines from them as well.

Nullig

_________________
Come play in the Sandbox at my CMS Made Simple demo site: http://www.cmsmsdemo.com.


Last edited by Nullig on Mon Jun 16, 2008 2:42 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: A Support Tool
PostPosted: Fri Jun 13, 2008 12:30 am 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Tue Oct 19, 2004 6:44 pm
Posts: 5951
Location: Fernie British Columbia, Canada
Not a bad plan...

We should also include
  a) current CMS version  (global $CMS_VERSION)
  b) which versions of which modules are installed
      (iterating through $gCms->modules)
  c) the host type if we can get it
  d) some basic permissions checks
  e) some basic functionality tests (like what the installer has).

And when this information is collected, maybe, just maybe a module or something could be written that would allow a user to type in his CMS forum username, password, and a description of the problem and have this stuff posted to the forum as a new post.

It'd definately help some people to provide some useful information.  They would still have to know what all that information means.

_________________
Follow me on twitter
For quality help follow these instructions:
a) Think about the problem for an hour
b) research the problem for an hour
c) spend 1/2 an hour explaining it and providing as much information as you can muster
(too much information is okay, not enough information may get your question ignored).
--
if you can't bother explaining your problem well, why should we bother helping with it.
----------------
Don't make me angry..... you won't like me when I'm angry....


Top
 Profile  
 
 Post subject: Re: A Support Tool
PostPosted: Fri Jun 13, 2008 12:35 am 
Offline
Administrator
Administrator
User avatar

Joined: Thu Mar 09, 2006 5:32 am
Posts: 10678
Location: Arizona
Very nice...

I put it in a template, wrong one so I didn't see it...

How to put in other parts I wonder?...

_________________
Extensions » Modules/Tags click the name of the module/tag or Help to the right to get it's parameters.
Right click and view source is a great way to see what you have to work with.
Check ver. CMSMS, PHP, server OS, in System Information page.
Default content http://multiintech.com/defaultcontent/
People are Wonderful
Business is Great
Life is Terrific
Ever wonder what happened to the Album module? Well it is alive and well.
http://album.multiintech.com/

Image


Top
 Profile  
 
 Post subject: Re: A Support Tool
PostPosted: Fri Jun 13, 2008 1:03 am 
Offline
Power Poster
Power Poster
User avatar

Joined: Fri Feb 02, 2007 4:31 pm
Posts: 2396
Location: Comox Valley, BC
Forgot the MOST important piece of info... DUH!!!

So on your test page you have:

Code:
CMS Made Simple Version: {cms_version}<br />
{support_info}


Nullig

_________________
Come play in the Sandbox at my CMS Made Simple demo site: http://www.cmsmsdemo.com.


Top
 Profile  
 
 Post subject: Re: A Support Tool
PostPosted: Fri Jun 13, 2008 1:17 am 
Offline
Power Poster
Power Poster
User avatar

Joined: Mon Jun 25, 2007 5:36 pm
Posts: 1067
Location: Portugal
mark wrote:
Very nice...

I put it in a template, wrong one so I didn't see it...

How to put in other parts I wonder?...


or add in that UDT ;)
echo "CMS version: " . $GLOBALS['CMS_VERSION'] . "
";


Top
 Profile  
 
 Post subject: Re: A Support Tool
PostPosted: Fri Jun 13, 2008 2:37 am 
Offline
Administrator
Administrator
User avatar

Joined: Thu Mar 09, 2006 5:32 am
Posts: 10678
Location: Arizona
Very nice indeed...

echo "Current PHP Version: " . phpversion() . "
";
echo "Maximum Post Size: " . get_cfg_var('post_max_size') . "
";
echo "Maximum Upload Size: " . get_cfg_var('upload_max_filesize') . "
";
echo "PHP Memory Limit: " . get_cfg_var( 'memory_limit' ) . "
";
echo "MySQL Server Version: " . mysql_get_server_info() . "
 
";
echo "Server Software: " . $_SERVER['SERVER_SOFTWARE'] . "
";
echo "CMS version: " . $GLOBALS['CMS_VERSION'] . "
 
";

=

Current PHP Version: 5.2.6
Maximum Post Size: 8M
Maximum Upload Size: 10M
PHP Memory Limit: 40M
MySQL Server Version: 5.0.45-community

Server Software: Apache/1.3.41 (Unix) mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 FrontPage/5.0.2.2635 mod_ssl/2.8.31 OpenSSL/0.9.7a
CMS version: 1.3

Updated code now =...

CMS Made Simple Version: 1.3
Installed Modules:

    * CMSMailer vers - 1.73.13
    * FileManager vers - 0.3.0
    * MenuManager vers - 1.5
    * ModuleManager vers - 1.1.6
    * News vers - 2.8
    * nuSOAP vers - 1.0.1
    * Printing vers - 0.2.3
    * Search vers - 1.5
    * ThemeManager vers - 1.0.8
    * TinyMCE vers - 2.4.1
    * CGExtensions vers - 1.8
    * Blogs vers - 0.3.0b2
    * CompanyDirectory vers - 1.1.3

Current PHP version: 5.2.6
Maximum Post Size = 8M
Maximum Upload Size = 10M
PHP Memory Limit = 40M
MySQL server version = 5.0.45-community

Server Software = Apache/1.3.41 (Unix) mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 FrontPage/5.0.2.2635 mod_ssl/2.8.31 OpenSSL/0.9.7a

_________________
Extensions » Modules/Tags click the name of the module/tag or Help to the right to get it's parameters.
Right click and view source is a great way to see what you have to work with.
Check ver. CMSMS, PHP, server OS, in System Information page.
Default content http://multiintech.com/defaultcontent/
People are Wonderful
Business is Great
Life is Terrific
Ever wonder what happened to the Album module? Well it is alive and well.
http://album.multiintech.com/

Image


Last edited by Anonymous on Fri Jun 13, 2008 2:55 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: A Support Tool
PostPosted: Fri Jun 13, 2008 5:05 am 
Nullig wrote:
Here is a small start to something I hope can be incorporated into the CMSMS Admin Panel.


Yes - think a separate information page in admin panel would be a very good idea!

Users can access this page faster than an udt :).


Top
  
 
 Post subject: Re: A Support Tool
PostPosted: Fri Jun 13, 2008 3:40 pm 
Offline
Support Guru
Support Guru

Joined: Mon Jul 24, 2006 3:27 pm
Posts: 3693
Location: Paris
Support tool ? +1 http://forum.cmsmadesimple.org/index.ph ... 407.0.html
Pierre

_________________
-- Pierre, support team member. comodérateur du forum francophone.
Please read "how to submit installation/support requests" before posting. Don't send private messages to ask for support.
Want to contribute to CMSms ? Improve the wiki with your forum account.


Top
 Profile  
 
 Post subject: Re: A Support Tool
PostPosted: Fri Jun 13, 2008 7:14 pm 
Offline
Power Poster
Power Poster
User avatar

Joined: Fri Feb 02, 2007 4:31 pm
Posts: 2396
Location: Comox Valley, BC
Updated the first post to add some more info...

_________________
Come play in the Sandbox at my CMS Made Simple demo site: http://www.cmsmsdemo.com.


Top
 Profile  
 
 Post subject: Re: A Support Tool
PostPosted: Fri Jun 13, 2008 8:25 pm 
Offline
Support Guru
Support Guru
User avatar

Joined: Mon Jul 04, 2005 5:12 pm
Posts: 4821
Location: Ferrara, Italy
Nullig wrote:
Updated the first post to add some more info...


Very nice idea.
Can you add this:
Quote:
echo "
  • Maximum Execution Time: " . get_cfg_var('max_execution_time') . "
  • ";
    echo "
  • Session Save Path: " . session_save_path() . "
  • ";

    echo "
  • SAPI: " . PHP_SAPI . "
  • ";
    echo "
  • OS: " . PHP_OS . "
  • ";


    Alby

    _________________
    CMSMS Support Team
    Italian Admin and Moderator

    Plugins: Geolocate hostip, Multiple random image, Image rotator (beta), Content Pagination
    Modules: ForumMadeSimple (Howto), TranslationManager
    Multilingual: MLE is not CMSMS


    Top
     Profile  
     
     Post subject: Re: A Support Tool
    PostPosted: Fri Jun 13, 2008 8:38 pm 
    Offline
    Power Poster
    Power Poster
    User avatar

    Joined: Fri Feb 02, 2007 4:31 pm
    Posts: 2396
    Location: Comox Valley, BC
    Thanks, alby. I've incorporated your suggestions.

    _________________
    Come play in the Sandbox at my CMS Made Simple demo site: http://www.cmsmsdemo.com.


    Top
     Profile  
     
     Post subject: Re: A Support Tool
    PostPosted: Fri Jun 13, 2008 9:15 pm 
    Offline
    Power Poster
    Power Poster
    User avatar

    Joined: Mon Jun 25, 2007 5:36 pm
    Posts: 1067
    Location: Portugal
    Quote:
    I hope can be incorporated into the CMSMS Admin Panel.


    I hope to, is nice TOOL/UDT vs Support :)

    Best regards


    Top
     Profile  
     
     Post subject: Re: A Support Tool
    PostPosted: Fri Jun 13, 2008 11:27 pm 
    Offline
    Dev Team Member
    Dev Team Member
    User avatar

    Joined: Tue Oct 19, 2004 6:44 pm
    Posts: 5951
    Location: Fernie British Columbia, Canada
    I'll tell ya what...

    if somebody writes the code, and submits a patch against current svn, I'll review it, and work with you to include it in 1.4

    it may be a way to get your feet wet in core coding.

    _________________
    Follow me on twitter
    For quality help follow these instructions:
    a) Think about the problem for an hour
    b) research the problem for an hour
    c) spend 1/2 an hour explaining it and providing as much information as you can muster
    (too much information is okay, not enough information may get your question ignored).
    --
    if you can't bother explaining your problem well, why should we bother helping with it.
    ----------------
    Don't make me angry..... you won't like me when I'm angry....


    Top
     Profile  
     
     Post subject: Re: A Support Tool
    PostPosted: Sat Jun 14, 2008 1:37 am 
    Offline
    Power Poster
    Power Poster
    User avatar

    Joined: Thu Jan 26, 2006 11:46 am
    Posts: 700
    it could be incorporated into an "about cmsms" page in the back-end, perhaps under "main" or "site admin" -- with copyright info (including that for the various 3rd party code and libraries used), a list of the individuals who've contributed to the core code, links to the various parts of the cmsms.org site, the text of the gpl license (and others that may be used by portions of the code), and a little blurb about "how to submit a bug report and obtain support in the forums". it could even be rigged so that this page is shown the very first time the superadmin logs into the back-end after installation.

    _________________
    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


    Top
     Profile  
     
     Post subject: Re: A Support Tool
    PostPosted: Sat Jun 14, 2008 2:55 am 
    Offline
    Dev Team Member
    Dev Team Member
    User avatar

    Joined: Tue Oct 19, 2004 6:44 pm
    Posts: 5951
    Location: Fernie British Columbia, Canada
    kermit, I like your way of thinking :)

    _________________
    Follow me on twitter
    For quality help follow these instructions:
    a) Think about the problem for an hour
    b) research the problem for an hour
    c) spend 1/2 an hour explaining it and providing as much information as you can muster
    (too much information is okay, not enough information may get your question ignored).
    --
    if you can't bother explaining your problem well, why should we bother helping with it.
    ----------------
    Don't make me angry..... you won't like me when I'm angry....


    Top
     Profile  
     
    Display posts from previous:  Sort by  
    Post new topic Reply to topic  [ 26 posts ]  Go to page 1, 2  Next

    All times are UTC


    Who is online

    Users browsing this forum: No registered users


    You cannot post new topics in this forum
    You cannot reply to topics in this forum
    You cannot edit your posts in this forum
    You cannot delete your posts in this forum
    You cannot post attachments in this forum

    Search for:
    Jump to:  
    Arvixe - A CMSMS Partner