Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Thu Jul 18, 2019 9:11 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 24 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: Cannot Install Cacti-1.2.1 new release
PostPosted: Fri Feb 01, 2019 11:33 am 
Offline
Cacti User

Joined: Mon Oct 01, 2018 10:09 am
Posts: 124
Hello, Thank you very much for the information.
This forum is very helpful.

I will check the links, and see what is up.

Thanks,

eholz1


Top
 Profile  
 
 Post subject: Re: Cannot Install Cacti-1.2.1 new release
PostPosted: Fri Feb 01, 2019 5:32 pm 
Offline
Cacti User

Joined: Mon Oct 01, 2018 10:09 am
Posts: 124
This is what I get and before you ask java is enabled!
Attachment:
ie_error_message.JPG
ie_error_message.JPG [ 22.8 KiB | Viewed 463 times ]


Top
 Profile  
 
 Post subject: Re: Cannot Install Cacti-1.2.1 new release
PostPosted: Sat Feb 02, 2019 3:53 am 
Offline
Cacti Guru User

Joined: Sun Aug 27, 2017 12:05 am
Posts: 2596
OK, so what this means is there is an error occurring in your browser console, can you let me know what that error is?

And I'm assuming that it's JavaScript you must have enabled, don't need Java (fyi two completely different things).

_________________
Official Cacti Developer

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation

My resources:
How to submit Pull Requests
Development Wiki and How To's
Updated NetSNMP Memory template for Cacti 1.x
Cisco SFP template for Cacti 0.8.8


Top
 Profile  
 
 Post subject: Re: Cannot Install Cacti-1.2.1 new release
PostPosted: Sun Feb 03, 2019 8:12 am 
Offline
Cacti Pro User
User avatar

Joined: Mon Jan 05, 2015 10:10 am
Posts: 792
The JavaScript issue is fixed in GitHub.

_________________
Before history, there was a paradise, now dust.


Top
 Profile  
 
 Post subject: Re: [SOLVED]Cannot Install Cacti-1.2.1 new release
PostPosted: Thu Feb 21, 2019 9:34 pm 
Offline

Joined: Tue Jul 21, 2015 11:05 pm
Posts: 10
I've just downloaded the new cacti version 1.2.1 off the website today for fresh install and am getting the same error, though this is on a windows machine.
The install is interrupted at the first stage and an 'action failed' popup is displayed as per OP's first post.

My browser debugging shows an XHR POST to http://<redacted>/cacti/install/step_json.php
The browser is showing PHP errors thrown before the JSON in that POST:


Code:
<br />
<b>Notice</b>:  Undefined index: name in <b>C:\Apache24\htdocs\cacti\lib\installer.php</b> on line <b>959</b><br />
<br />
<b>Notice</b>:  Undefined index: name in <b>C:\Apache24\htdocs\cacti\lib\installer.php</b> on line <b>959</b><br />
<br />
<b>Notice</b>:  Undefined index: name in <b>C:\Apache24\htdocs\cacti\lib\installer.php</b> on line <b>959</b><br />
<br />
<b>Notice</b>:  Undefined index: name in <b>C:\Apache24\htdocs\cacti\lib\installer.php</b> on line <b>959</b><br />
<br />
<b>Notice</b>:  Undefined index: name in <b>C:\Apache24\htdocs\cacti\lib\installer.php</b> on line <b>959</b><br />
{"Mode":"1","Step":"1","Errors":{"Modules":[" is missing"," is missing"," is missing"," is missing"," is missing"]},"Eula":null,"Prev":{"Text":"Previous","Step":0,"Enabled":false,"Visible":true},"Next":{"Text":"Begin","Step":2,"Enabled":false,"Visible":true},"Test":{"Text":"Test Connection","Step":-4,"Enabled":true,"Visible":false},"Theme":"modern","StepData":{"Eula":null,"Theme":"modern","Language":"en-US"},"Html":"<h2 class='cactiInstallSectionTitle'>Cacti Version 1.2.1 - License Agreement<\/h2><p class='cactiInstallSection cactiInstallSectionNormal'>Thanks for taking the time to download and install Cacti, the complete graphing solution for your network. Before you can start making cool graphs, there are a few pieces of data that Cacti needs to know.<\/p><p class='cactiInstallSection cactiInstallSectionNormal'>Make sure you have read and followed the required steps needed to install Cacti before continuing. Install information can be found for <a href=\"..\/docs\/html\/install_unix.html\">Unix<\/a> and <a href=\"..\/docs\/html\/install_windows.html\">Win32<\/a>-based operating systems.<\/p><p class='cactiInstallSection cactiInstallSectionNormal'>Cacti is licensed under the GNU General Public License, you must agree to its provisions before continuing:<\/p><p class='cactiInstallSection cactiInstallSectionCode'>This program is free software; you can redistribute it and\/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.<br\/><br\/>This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.<\/p><p class='cactiInstallSection cactiInstallSectionNormal'><span>Select default theme: <select id='theme' name='theme'><option value='classic'>Classic<\/option><option value='dark'>Dark<\/option><option value='modern' selected>Modern<\/option><option value='paper-plane'>Paper-plane<\/option><option value='paw'>Paw<\/option><option value='sunrise'>Sunrise<\/option><\/select><\/span><span style='float: right'><input type='checkbox' id='accept' name='accept'><label for='accept'>Accept GPL License Agreement<\/label><\/span><span><select id='language' name='theme'>\r\nen-US == ar-SA [Arabic]\r\n<option value='ar-SA' data-class='flag-icon-sa'><span class=\"flag-icon flag-icon-squared flag-icon-sa\"><\/span>Arabic<\/option>\r\nen-US == bg-BG [Bulgarian]\r\n<option value='bg-BG' data-class='flag-icon-bg'><span class=\"flag-icon flag-icon-squared flag-icon-bg\"><\/span>Bulgarian<\/option>\r\nen-US == zh-CN [Chinese (China)]\r\n<option value='zh-CN' data-class='flag-icon-cn'><span class=\"flag-icon flag-icon-squared flag-icon-cn\"><\/span>Chinese (China)<\/option>\r\nen-US == zh-TW [Chinese (Taiwan)]\r\n<option value='zh-TW' data-class='flag-icon-tw'><span class=\"flag-icon flag-icon-squared flag-icon-tw\"><\/span>Chinese (Taiwan)<\/option>\r\nen-US == nl-NL [Dutch]\r\n<option value='nl-NL' data-class='flag-icon-nl'><span class=\"flag-icon flag-icon-squared flag-icon-nl\"><\/span>Dutch<\/option>\r\nen-US == en-US [English]\r\n<option value='en-US' selected data-class='flag-icon-us'><span class=\"flag-icon flag-icon-squared flag-icon-us\"><\/span>English<\/option>\r\nen-US == fr-FR [French]\r\n<option value='fr-FR' data-class='flag-icon-fr'><span class=\"flag-icon flag-icon-squared flag-icon-fr\"><\/span>French<\/option>\r\nen-US == de-DE [German]\r\n<option value='de-DE' data-class='flag-icon-de'><span class=\"flag-icon flag-icon-squared flag-icon-de\"><\/span>German<\/option>\r\nen-US == el-GR [Greek]\r\n<option value='el-GR' data-class='flag-icon-gr'><span class=\"flag-icon flag-icon-squared flag-icon-gr\"><\/span>Greek<\/option>\r\nen-US == he-IL [Hebrew]\r\n<option value='he-IL' data-class='flag-icon-il'><span class=\"flag-icon flag-icon-squared flag-icon-il\"><\/span>Hebrew<\/option>\r\nen-US == hi-IN [Hindi]\r\n<option value='hi-IN' data-class='flag-icon-in'><span class=\"flag-icon flag-icon-squared flag-icon-in\"><\/span>Hindi<\/option>\r\nen-US == it-IT [Italian]\r\n<option value='it-IT' data-class='flag-icon-it'><span class=\"flag-icon flag-icon-squared flag-icon-it\"><\/span>Italian<\/option>\r\nen-US == ja-JP [Japanese]\r\n<option value='ja-JP' data-class='flag-icon-jp'><span class=\"flag-icon flag-icon-squared flag-icon-jp\"><\/span>Japanese<\/option>\r\nen-US == ko-KR [Korean]\r\n<option value='ko-KR' data-class='flag-icon-kr'><span class=\"flag-icon flag-icon-squared flag-icon-kr\"><\/span>Korean<\/option>\r\nen-US == pl-PL [Polish]\r\n<option value='pl-PL' data-class='flag-icon-pl'><span class=\"flag-icon flag-icon-squared flag-icon-pl\"><\/span>Polish<\/option>\r\nen-US == pt-PT [Portuguese]\r\n<option value='pt-PT' data-class='flag-icon-pt'><span class=\"flag-icon flag-icon-squared flag-icon-pt\"><\/span>Portuguese<\/option>\r\nen-US == pt-BR [Portuguese (Brazil)]\r\n<option value='pt-BR' data-class='flag-icon-br'><span class=\"flag-icon flag-icon-squared flag-icon-br\"><\/span>Portuguese (Brazil)<\/option>\r\nen-US == ru-RU [Russian]\r\n<option value='ru-RU' data-class='flag-icon-ru'><span class=\"flag-icon flag-icon-squared flag-icon-ru\"><\/span>Russian<\/option>\r\nen-US == es-ES [Spanish]\r\n<option value='es-ES' data-class='flag-icon-es'><span class=\"flag-icon flag-icon-squared flag-icon-es\"><\/span>Spanish<\/option>\r\nen-US == sv-SE [Swedish]\r\n<option value='sv-SE' data-class='flag-icon-se'><span class=\"flag-icon flag-icon-squared flag-icon-se\"><\/span>Swedish<\/option>\r\nen-US == tr-TR [Turkish]\r\n<option value='tr-TR' data-class='flag-icon-tr'><span class=\"flag-icon flag-icon-squared flag-icon-tr\"><\/span>Turkish<\/option>\r\nen-US == vi-VN [Vietnamese]\r\n<option value='vi-VN' data-class='flag-icon-vn'><span class=\"flag-icon flag-icon-squared flag-icon-vn\"><\/span>Vietnamese<\/option><\/select><\/span><\/p>"}



Line 959 of installer.php is part of a foreach cycling through extensions, and calls $e['name'] but $e['name'] isn't part of the $extensions array.
$extensions is as follows:

Code:
array(22) {
  ["ctype"]=>
  array(3) {
    ["cli"]=>
    bool(true)
    ["web"]=>
    bool(true)
    ["installed"]=>
    bool(true)
  }
  ["openssl"]=>
  array(3) {
    ["cli"]=>
    bool(true)
    ["web"]=>
    bool(true)
    ["installed"]=>
    bool(true)
  }
  ["filter"]=>
  array(3) {
    ["cli"]=>
    bool(true)
    ["web"]=>
    bool(true)
    ["installed"]=>
    bool(true)
  }
  ["gettext"]=>
  array(3) {
    ["cli"]=>
    bool(true)
    ["web"]=>
    bool(true)
    ["installed"]=>
    bool(true)
  }
  ["gd"]=>
  array(3) {
    ["cli"]=>
    bool(false)
    ["web"]=>
    bool(false)
    ["installed"]=>
    bool(false)
  }
  ["gmp"]=>
  array(3) {
    ["cli"]=>
    bool(false)
    ["web"]=>
    bool(false)
    ["installed"]=>
    bool(false)
  }
  ["hash"]=>
  array(3) {
    ["cli"]=>
    bool(true)
    ["web"]=>
    bool(true)
    ["installed"]=>
    bool(true)
  }
  ["json"]=>
  array(3) {
    ["cli"]=>
    bool(true)
    ["web"]=>
    bool(true)
    ["installed"]=>
    bool(true)
  }
  ["ldap"]=>
  array(3) {
    ["cli"]=>
    bool(true)
    ["web"]=>
    bool(true)
    ["installed"]=>
    bool(true)
  }
  ["mbstring"]=>
  array(3) {
    ["cli"]=>
    bool(false)
    ["web"]=>
    bool(false)
    ["installed"]=>
    bool(false)
  }
  ["date"]=>
  array(3) {
    ["cli"]=>
    bool(true)
    ["web"]=>
    bool(true)
    ["installed"]=>
    bool(true)
  }
  ["PDO"]=>
  array(3) {
    ["cli"]=>
    bool(true)
    ["web"]=>
    bool(true)
    ["installed"]=>
    bool(true)
  }
  ["pcre"]=>
  array(3) {
    ["cli"]=>
    bool(true)
    ["web"]=>
    bool(true)
    ["installed"]=>
    bool(true)
  }
  ["pdo_mysql"]=>
  array(3) {
    ["cli"]=>
    bool(true)
    ["web"]=>
    bool(true)
    ["installed"]=>
    bool(true)
  }
  ["session"]=>
  array(3) {
    ["cli"]=>
    bool(true)
    ["web"]=>
    bool(true)
    ["installed"]=>
    bool(true)
  }
  ["simplexml"]=>
  array(3) {
    ["cli"]=>
    bool(true)
    ["web"]=>
    bool(true)
    ["installed"]=>
    bool(true)
  }
  ["sockets"]=>
  array(3) {
    ["cli"]=>
    bool(false)
    ["web"]=>
    bool(false)
    ["installed"]=>
    bool(false)
  }
  ["spl"]=>
  array(3) {
    ["cli"]=>
    bool(true)
    ["web"]=>
    bool(true)
    ["installed"]=>
    bool(true)
  }
  ["standard"]=>
  array(3) {
    ["cli"]=>
    bool(true)
    ["web"]=>
    bool(true)
    ["installed"]=>
    bool(true)
  }
  ["xml"]=>
  array(3) {
    ["cli"]=>
    bool(true)
    ["web"]=>
    bool(true)
    ["installed"]=>
    bool(true)
  }
  ["zlib"]=>
  array(3) {
    ["cli"]=>
    bool(true)
    ["web"]=>
    bool(true)
    ["installed"]=>
    bool(true)
  }
  ["com_dotnet"]=>
  array(3) {
    ["cli"]=>
    bool(false)
    ["web"]=>
    bool(false)
    ["installed"]=>
    bool(false)
  }
}


Here's the foreach:
Code:
foreach ($extensions as $e) {
            if (!$e['installed']) {
               $this->addError(Installer::STEP_CHECK_DEPENDENCIES, 'Modules', $e['name'] . ' is missing');
            }
         }



I've changed my copy to:
Code:
foreach ($extensions as $extname => $e) {
            if (!$e['installed']) {
               $this->addError(Installer::STEP_CHECK_DEPENDENCIES, 'Modules', $extname . ' is missing');
            }
         }


Which then returns the following via JSON and resolves the "action failed" error that we're getting.

Code:
Mode   1
Step   1
Errors   {…}
Modules   […]
0   gd is missing
1   gmp is missing
2   mbstring is missing
3   sockets is missing
4   com_dotnet is missing
Eula   null
Prev   {…}
Text   Previous
Step   0
Enabled   false
Visible   true
Next   {…}
Text   Begin
Step   2
Enabled   false
Visible   true
Test   {…}
Text   Test Connection
Step   -4
Enabled   true
Visible   false
Theme   modern
StepData   {…}
Eula   null
Theme   modern
Language   en-US
Html   <h2 class='cactiInstallSectionTitle'>Cacti Version 1.2.1 - License Agreement</h2><p class='cactiInstallSection cactiInstallSectionNormal'>Thanks for taking the time to download and install Cacti, the complete graphing solution for your network. Before you can start making cool graphs, there are a few pieces of data that Cacti needs to know.</p><p class='cactiInstallSection cactiInstallSectionNormal'>Make sure you have read and followed the required steps needed to install Cacti before continuing. Install in…</span>Spanish</option> en-US == sv-SE [Swedish] <option value='sv-SE' data-class='flag-icon-se'><span class="flag-icon flag-icon-squared flag-icon-se"></span>Swedish</option> en-US == tr-TR [Turkish] <option value='tr-TR' data-class='flag-icon-tr'><span class="flag-icon flag-icon-squared flag-icon-tr"></span>Turkish</option> en-US == vi-VN [Vietnamese] <option value='vi-VN' data-class='flag-icon-vn'><span class="flag-icon flag-icon-squared flag-icon-vn"></span>Vietnamese</option></select></span></p>



Alternatively you can switch display_errors = Off in your php.ini and it should prevent this error during install.
That probably won't tell you which extensions you're missing tho.
This is php 7.1.3


Top
 Profile  
 
 Post subject: Re: [SOLVED]Cannot Install Cacti-1.2.1 new release
PostPosted: Fri Feb 22, 2019 5:34 am 
Offline
Cacti Guru User

Joined: Sun Aug 27, 2017 12:05 am
Posts: 2596
I would concur with your fix, as I had the following diff ready for this:

Code:
diff --git a/lib/installer.php b/lib/installer.php
index ed50ac91..290889ba 100644
--- a/lib/installer.php
+++ b/lib/installer.php
@@ -954,9 +954,9 @@ class Installer implements JsonSerializable {
                if (isset($this->extensions) || empty($this->extensions)) {
                        $extensions = utility_php_extensions();

-                       foreach ($extensions as $e) {
+                       foreach ($extensions as $name=>$e) {
                                if (!$e['installed']) {
-                                       $this->addError(Installer::STEP_CHECK_DEPENDENCIES, 'Modules', $e['name'] . ' is missing');
+                                       $this->addError(Installer::STEP_CHECK_DEPENDENCIES, 'Modules', $name . ' is missing');
                                }
                        }

If you could log this on GitHub, I can associate the fix to the issue.

_________________
Official Cacti Developer

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation

My resources:
How to submit Pull Requests
Development Wiki and How To's
Updated NetSNMP Memory template for Cacti 1.x
Cisco SFP template for Cacti 0.8.8


Top
 Profile  
 
 Post subject: Re: [SOLVED]Cannot Install Cacti-1.2.1 new release
PostPosted: Sun Feb 24, 2019 7:37 pm 
Offline

Joined: Tue Jul 21, 2015 11:05 pm
Posts: 10
Sorry netniV, I'm new to Github and not sure how it all works yet but I endeavour to get involved. :)


Top
 Profile  
 
 Post subject: Re: [SOLVED]Cannot Install Cacti-1.2.1 new release
PostPosted: Mon Feb 25, 2019 3:51 am 
Offline
Cacti Guru User

Joined: Sun Aug 27, 2017 12:05 am
Posts: 2596
i already added that fix but if you do find any others feel free to contribute :)

_________________
Official Cacti Developer

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation

My resources:
How to submit Pull Requests
Development Wiki and How To's
Updated NetSNMP Memory template for Cacti 1.x
Cisco SFP template for Cacti 0.8.8


Top
 Profile  
 
 Post subject: Re: [SOLVED]Cannot Install Cacti-1.2.1 new release
PostPosted: Mon Mar 18, 2019 4:29 pm 
Offline

Joined: Sun Mar 17, 2019 6:15 pm
Posts: 7
Thanks netniV. Have sent the partial log off to you as per your instructions


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

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 5 guests


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:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group