opennetadmin / ona

OpenNetAdmin IP Address Management (IPAM) system
opennetadmin.com
GNU General Public License v2.0
141 stars 35 forks source link

New install -> errors #115

Closed oldfart101 closed 6 years ago

oldfart101 commented 6 years ago

Ubuntu - brand new installation, first run:-

[Wed Dec 06 21:28:40.689470 2017] [:error] [pid 10715] [client 192.168.1.26:51366] PHP Notice:  Undefined index: APACHE_RUN_USER in /opt/ona/install/install.php on line 48, referer: http://192.168.1.90/ona/
[Wed Dec 06 21:28:40.689521 2017] [:error] [pid 10715] [client 192.168.1.26:51366] PHP Notice:  Undefined index: APACHE_RUN_USER in /opt/ona/install/install.php on line 48, referer: http://192.168.1.90/ona/
[Wed Dec 06 21:28:40.689532 2017] [:error] [pid 10715] [client 192.168.1.26:51366] PHP Notice:  Undefined variable: ona_contexts in /opt/ona/install/install.php on line 61, referer: http://192.168.1.90/ona/
[Wed Dec 06 21:28:40.689539 2017] [:error] [pid 10715] [client 192.168.1.26:51366] PHP Notice:  Undefined variable: db_context in /opt/ona/install/install.php on line 61, referer: http://192.168.1.90/ona/
[Wed Dec 06 21:28:40.689551 2017] [:error] [pid 10715] [client 192.168.1.26:51366] PHP Notice:  Undefined variable: mainstyle in /opt/ona/install/install.php on line 157, referer: http://192.168.1.90/ona/
[Wed Dec 06 21:28:40.689562 2017] [:error] [pid 10715] [client 192.168.1.26:51366] PHP Notice:  Undefined variable: upgrade in /opt/ona/install/install.php on line 214, referer: http://192.168.1.90/ona/
[Wed Dec 06 21:28:40.689691 2017] [:error] [pid 10715] [client 192.168.1.26:51366] PHP Fatal error:  Uncaught Error: Call to undefined function mysql_connect() in /opt/ona/www/include/adodb5/drivers/adodb-mysql.inc.php:363\nStack trace:\n#0 /opt/ona/www/include/adodb5/drivers/adodb-mysql.inc.php(394): ADODB_mysql->_connect('localhost', 'username', 'password', '')\n#1 /opt/ona/www/include/adodb5/adodb.inc.php(523): ADODB_mysql->_nconnect('localhost', 'username', 'password', '')\n#2 /opt/ona/www/include/adodb5/adodb.inc.php(562): ADOConnection->Connect('localhost', 'username', 'password', '', true)\n#3 /opt/ona/install/install.php(416): ADOConnection->NConnect('localhost', 'username', 'password', '')\n#4 /opt/ona/www/config/config.inc.php(185): require_once('/opt/ona/instal...')\n#5 /opt/ona/www/index.php(7): require_once('/opt/ona/www/co...')\n#6 {main}\n  thrown in /opt/ona/www/include/adodb5/drivers/adodb-mysql.inc.php on line 363, referer: http://192.168.1.90/ona/
mattpascoe commented 6 years ago

The fatal error here looks as though you do not have the php_mysql modules installed on your system.

Also please note that the main body of code on the master branch does not fully work with newer linux systems. You will want to run off of the 'newinstaller' branch or run a slightly older OS version.. I'm still in the midst of finalizing the installer to work on later versions of OS and mysql.

It would help to know which version of Ubuntu you are using. I know 14.04 would work fine.. 16.04 needs the newinstaller branch.

oldfart101 commented 6 years ago

Yes - Ubuntu 16.04 and yes php_mysql modules installed tried newinstaller - no screen output....

[Tue Dec 12 20:02:05.208375 2017] [:error] [pid 9649] [client 192.168.1.26:14073] PHP Warning: require_once(/opt/ona/www/include/adodb/adodb.inc.php): failed to open stream: No such file or directory in /opt/ona/www/include/functions_db.inc.php on line 24, referer: http://192.168.1.90/ [Tue Dec 12 20:02:05.208428 2017] [:error] [pid 9649] [client 192.168.1.26:14073] PHP Fatal error: require_once(): Failed opening required '/opt/ona/www/include/adodb/adodb.inc.php' (include_path='.:/usr/share/php') in /opt/ona/www/include/functions_db.inc.php on line 24, referer: http://192.168.1.90/

directory is /opt/ona/www/include/adodb5

mattpascoe commented 6 years ago

I neglected to mention a key part on the 'newinstaller' branch. The GUI install still suffers from issues. You will need to execute the cli option php install/installcli.php

Maybe that'll work.. and one of these days I hope to get time to do the proper testing to fix the installer.

oldfart101 commented 6 years ago

nope - that didn't work

tuXitbe commented 6 years ago

Hi, I think this issue is the same as the one i started just a couple of minutes ago. The error: "Call to undefined function mysqlconnect() in /opt/ona/www/include/adodb5/drivers/adodb-mysql.inc.php:363\nStack trace:\n#0" is the same as I get after upgrading my os. Standard under Debian Stretch and Ubuntu 16 is PHP 7.0 which aparently does no longer support all mysql calls. I'v been trying to change all mysql_ calls to mysql_calls, but without success, my PHP knowledge is too limited. However, by doing that, i did manage to get something working again.

Erland.

mattpascoe commented 6 years ago

@oldfart101 so you should probably try the new version.. I believe it has fixed the issues.

You will probably want to edit your www/local/config/database_settings.inc.php file and set the DB_TYPE value to mysqli however... That is assuming it is not already set to that.

Hope that works for you.

Thanks

mattpascoe commented 6 years ago

Through other testing and a similar bug report I believe this issue to be resolved.. closing for now.. If the new version does not solve the issue, please open a new issue. Thanks