New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PHP recommendations can generate a warning causing JSON issues #2903
Comments
Check the path_php_binary location is pointed at the php.exe and that you have the required modules installed and enabled in php.ini |
I've corrected the error message that appears so it should at least return correctly to the installer. |
I'm going to add some additional error checking, but I think this goes back to php not correctly configured and pushing out a number of error messages in it's standard output/error like the attempt to double load a module. |
This change will prevent additional warnings from being generated from bad recommendation arrays being passed to the function.
Ignore the double module message. Not enough coffee. Either way, with @netniV and my changes, this should be resolved now. Therefore, closing. |
Hello,
I have been trying to install cacti recently and i encountered a problem.
First of all im using windows 10 64bit, (windows is up to date).
At the first try i was using fully automatic cacti installer and i got stuck at checking php modules (you will find screenshot below).
Then i tried to do clean install ( i installed a new windows, updated drivers etc.) and then i installed XAMPP, however i stuck at page 1 "error 200 OK"
XAMPP is using mysql 5.7 with myphpadmin and apache 2.4
I downloaded the lastest working cacti (1.2.5 for windows).
I was also going step-by-step (just to make sure everything is installed and configured correctly) using cacti documentation for windows.
Here is screenshot of problem that occurd after automated cacti installed for windows.
Here is "error 200 OK"
Action failed
Sorry, we could not process your last action.
Error: 200 OK
Reason:
Warning: sizeof(): Parameter must be an array or an object that implements Countable in C:\xampp\htdocs\cacti\lib\utility.php on line 1439
{"Mode":"1","Step":"2","Errors":{"Modules":["ctype is missing","PDO is missing","zlib is missing","xml is missing","standard is missing","spl is missing","sockets is missing","simplexml is missing","session is missing","pdo_mysql is missing","pcre is missing","date is missing","openssl is missing","mbstring is missing","ldap is missing","json is missing","hash is missing","gmp is missing","gd is missing","filter is missing","com_dotnet is missing"],"Paths":{"path_php_binary":"File not found","path_rrdtool":"File not found"}},"Eula":"1","Prev":{"Text":"Previous","Step":1,"Enabled":true,"Visible":true},"Next":{"Text":"Next","Step":3,"Enabled":false,"Visible":true},"Test":{"Text":"Test Connection","Step":-4,"Enabled":true,"Visible":false},"Theme":"dark","StepData":{"Sections":{"location":2,"php_modules":0,"php_optional":1,"mysql_timezone":0,"mysql_performance":0,"php_recommends_web":1,"php_recommends_cli":2}},"Html":"
Pre-installation Checks</h2>
Location checks</h3>
Your Cacti configuration has the relative correct path (url_path) in config.php.</p></div>
PHP - Recommendations (web)</h3>
PHP Recommendations</span></div> </span></div></div>\n\t\n\t\n\t\n\t
version</td>\n\t 7.3.8</td>\n\t >= 5.4.0</td>\n\t Passed</font></td>\n\t PHP 5.4.0 is the mimimum version</td>\n</tr>\n
memory_limit</td>\n\t 128M</td>\n\t >= 400M</td>\n\t Warning</font></td>\n\t A minimum of 400M MB memory limit</td>\n</tr>\n
max_execution_time</td>\n\t 30</td>\n\t >= 60</td>\n\t Warning</font></td>\n\t A minimum of 60 m execution time</td>\n</tr>\n
date.timezone</td>\n\t Europe/Berlin</td>\n\t >= </td>\n\t Passed</font></td>\n\t A valid timezone that matches MySQL and the system</td>\n</tr>\n</table></div></p></div>
PHP - Recommendations (cli)</h3>
PHP Recommendations</span></div> </span></div></div>
Here is apache log error
[Mon Aug 19 08:09:53.270698 2019] [ssl:warn] [pid 3516:tid 616] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Mon Aug 19 08:09:54.395696 2019] [so:warn] [pid 3516:tid 616] AH01574: module php7_module is already loaded, skipping
[Mon Aug 19 08:09:54.942568 2019] [core:warn] [pid 3516:tid 616] AH00098: pid file C:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Mon Aug 19 08:10:08.036286 2019] [ssl:warn] [pid 3516:tid 616] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Mon Aug 19 08:10:08.036286 2019] [mpm_winnt:notice] [pid 3516:tid 616] AH00455: Apache/2.4.39 (Win64) PHP/7.3.8 OpenSSL/1.1.1c configured -- resuming normal operations
[Mon Aug 19 08:10:08.036286 2019] [mpm_winnt:notice] [pid 3516:tid 616] AH00456: Apache Lounge VC15 Server built: May 29 2019 11:22:50
[Mon Aug 19 08:10:08.036286 2019] [core:notice] [pid 3516:tid 616] AH00094: Command line: 'C:\xampp\apache\bin\httpd.exe -d C:/xampp/apache'
[Mon Aug 19 08:10:08.036286 2019] [mpm_winnt:notice] [pid 3516:tid 616] AH00418: Parent: Created child process 1056
[Mon Aug 19 08:10:08.520661 2019] [so:warn] [pid 1056:tid 564] AH01574: module php7_module is already loaded, skipping
[Mon Aug 19 08:10:08.630034 2019] [ssl:warn] [pid 1056:tid 564] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Mon Aug 19 08:10:08.661285 2019] [so:warn] [pid 1056:tid 564] AH01574: module php7_module is already loaded, skipping
[Mon Aug 19 08:10:08.848784 2019] [ssl:warn] [pid 1056:tid 564] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Mon Aug 19 08:10:08.880034 2019] [mpm_winnt:notice] [pid 1056:tid 564] AH00354: Child: Starting 150 worker threads.
'-q' is not recognized as an internal or external command,
operable program or batch file.
'-v' is not recognized as an internal or external command,
operable program or batch file.
'-q' is not recognized as an internal or external command,
operable program or batch file.
[Mon Aug 19 08:23:47.300693 2019] [php7:warn] [pid 1056:tid 1920] [client ::1:49797] PHP Warning: sizeof(): Parameter must be an array or an object that implements Countable in C:\xampp\htdocs\cacti\lib\utility.php on line 1439, referer: http://localhost/cacti/install/install.php
[Mon Aug 19 08:23:47.300693 2019] [php7:warn] [pid 1056:tid 1920] [client ::1:49797] PHP Warning: Invalid argument supplied for foreach() in C:\xampp\htdocs\cacti\lib\installer.php on line 1679, referer: http://localhost/cacti/install/install.php
'-q' is not recognized as an internal or external command,
operable program or batch file.
Here is cmd php-m and php -v resoult
C:\Users\Administrator>php -v
PHP 7.2.20 (cli) (built: Jul 2 2019 13:01:33) ( ZTS MSVC15 (Visual C++ 2017) x64 )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.2.20, Copyright (c) 1999-2018, by Zend Technologies
C:\Users\Administrator>php -m
[PHP Modules]
bcmath
calendar
com_dotnet
Core
ctype
date
dom
filter
gd
gettext
gmp
hash
iconv
json
ldap
libxml
mbstring
mysqli
mysqlnd
openssl
pcre
PDO
pdo_mysql
Phar
readline
Reflection
session
SimpleXML
snmp
sockets
SPL
standard
tokenizer
wddx
xml
xmlreader
xmlwriter
Zend OPcache
zip
zlib
[Zend Modules]
Zend OPcache
The text was updated successfully, but these errors were encountered: