FOGProject / fogproject

An open source computer cloning & management system
https://fogproject.org
GNU General Public License v3.0
1.1k stars 221 forks source link

Unable to install FOG "working-1.6" (1.6.0-beta.1401) #618

Closed abotzung closed 1 month ago

abotzung commented 1 month ago

Describe the bug I am unable to install FOG Server "working-1.6" on Debian 12.5

To Reproduce Steps to reproduce the behavior:

  1. Install a fresh Debian 12.5
  2. Try to install FOG
  3. "Update Schema" fail with a "Generic error" (in interactive install mode) or : "* Updating Database...........................................Failed!" in automated install

Expected behavior FOG Server to install successfully

Screenshots / Logs (after trying to "Update the Schema" via a Web browser) :

tail -f /var/log/apache2/error.log 
[Fri Aug 09 22:39:25.334032 2024] [core:notice] [pid 9827:tid 9827] AH00094: Command line: '/usr/sbin/apache2'
[Fri Aug 09 22:39:25.526113 2024] [mpm_prefork:notice] [pid 9827:tid 9827] AH00170: caught SIGWINCH, shutting down gracefully
[Fri Aug 09 22:39:25.648296 2024] [mpm_prefork:notice] [pid 9870:tid 9870] AH00163: Apache/2.4.61 (Debian) configured -- resuming normal operations
[Fri Aug 09 22:39:25.648400 2024] [core:notice] [pid 9870:tid 9870] AH00094: Command line: '/usr/sbin/apache2'
[Fri Aug 09 22:42:54.602699 2024] [mpm_prefork:notice] [pid 9870:tid 9870] AH00170: caught SIGWINCH, shutting down gracefully
[Fri Aug 09 22:43:10.340725 2024] [mpm_prefork:notice] [pid 19386:tid 19386] AH00163: Apache/2.4.61 (Debian) OpenSSL/3.0.13 configured -- resuming normal operations
[Fri Aug 09 22:43:10.340785 2024] [core:notice] [pid 19386:tid 19386] AH00094: Command line: '/usr/sbin/apache2'
[Fri Aug 09 22:44:33.470721 2024] [proxy_fcgi:error] [pid 19395:tid 19395] [client 192.168.0.132:33592] AH01071: Got error 'PHP message: PHP Warning:  Undefined array key 0 in /var/www/fog/lib/fog/fogurlrequests.class.php on line 116; PHP message: PHP Warning:  Undefined array key 1 in /var/www/fog/lib/fog/fogurlrequests.class.php on line 113; PHP message: PHP Warning:  Undefined array key 2 in /var/www/fog/lib/fog/fogurlrequests.class.php on line 114; PHP message: PHP Warning:  Undefined array key 0 in /var/www/fog/lib/fog/fogcore.class.php on line 212; PHP message: PHP Warning:  Undefined array key 1 in /var/www/fog/lib/fog/fogcore.class.php on line 206; PHP message: PHP Warning:  Undefined array key 2 in /var/www/fog/lib/fog/fogcore.class.php on line 207; PHP message: PHP Warning:  Undefined array key 3 in /var/www/fog/lib/fog/fogcore.class.php on line 208; PHP message: PHP Warning:  Undefined array key 4 in /var/www/fog/lib/fog/fogcore.class.php on line 209; PHP message: PHP Warning:  Undefined array key 5 in /var/www/fog/lib/fog/fogcore.class.php on line 210'
[Fri Aug 09 22:44:33.809846 2024] [proxy_fcgi:error] [pid 19397:tid 19397] [client 192.168.0.132:33998] AH01071: Got error 'PHP message: PHP Warning:  Undefined array key 0 in /var/www/fog/lib/fog/fogurlrequests.class.php on line 116; PHP message: PHP Warning:  Undefined array key 1 in /var/www/fog/lib/fog/fogurlrequests.class.php on line 113; PHP message: PHP Warning:  Undefined array key 2 in /var/www/fog/lib/fog/fogurlrequests.class.php on line 114; PHP message: PHP Warning:  Undefined array key 0 in /var/www/fog/lib/fog/fogcore.class.php on line 212; PHP message: PHP Warning:  Undefined array key 1 in /var/www/fog/lib/fog/fogcore.class.php on line 206; PHP message: PHP Warning:  Undefined array key 2 in /var/www/fog/lib/fog/fogcore.class.php on line 207; PHP message: PHP Warning:  Undefined array key 3 in /var/www/fog/lib/fog/fogcore.class.php on line 208; PHP message: PHP Warning:  Undefined array key 4 in /var/www/fog/lib/fog/fogcore.class.php on line 209; PHP message: PHP Warning:  Undefined array key 5 in /var/www/fog/lib/fog/fogcore.class.php on line 210', referer: http://192.168.0.248/fog/management/index.php?node=schema
[Fri Aug 09 22:46:11.146891 2024] [proxy_fcgi:error] [pid 19395:tid 19395] [client 192.168.0.132:34022] AH01071: Got error 'PHP message: PHP Warning:  Undefined array key 0 in /var/www/fog/lib/fog/fogurlrequests.class.php on line 116; PHP message: PHP Warning:  Undefined array key 1 in /var/www/fog/lib/fog/fogurlrequests.class.php on line 113; PHP message: PHP Warning:  Undefined array key 2 in /var/www/fog/lib/fog/fogurlrequests.class.php on line 114; PHP message: PHP Warning:  Undefined array key 0 in /var/www/fog/lib/fog/fogcore.class.php on line 212; PHP message: PHP Warning:  Undefined array key 1 in /var/www/fog/lib/fog/fogcore.class.php on line 206; PHP message: PHP Warning:  Undefined array key 2 in /var/www/fog/lib/fog/fogcore.class.php on line 207; PHP message: PHP Warning:  Undefined array key 3 in /var/www/fog/lib/fog/fogcore.class.php on line 208; PHP message: PHP Warning:  Undefined array key 4 in /var/www/fog/lib/fog/fogcore.class.php on line 209; PHP message: PHP Warning:  Undefined array key 5 in /var/www/fog/lib/fog/fogcore.class.php on line 210; PHP message: PHP Fatal error:  Uncaught ArgumentCountError: file_exists() expects exactly 1 argument, 2 given in /var/www/fog/lib/pages/schemaupdaterpage.page.php:373\nStack trace:\n#0 /var/www/fog/lib/pages/schemaupdaterpage.page.php(373): file_exists()\n#1 /var/www/fog/lib/fog/fogpagemanager.class.php(167): SchemaUpdaterPage->indexPost()\n#2 /var/www/fog/management/index.php(53): FOGPageManager->render()\n#3 {main}\n  thrown in /var/www/fog/lib/pages/schemaupdaterpage.page.php on line 373', referer: http://192.168.0.248/fog/management/index.php?node=schema

PHP message: PHP Fatal error: Uncaught ArgumentCountError: file_exists() expects exactly 1 argument, 2 given in /var/www/fog/lib/pages/schemaupdaterpage.page.php:373

When installing via an automated install :

(...)
 * Starting and checking status of web services................OK
 * Changing permissions on apache log files....................OK
 * Backing up database.........................................Done
 * Updating Database...........................................Failed!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! The installer was not able to run all the way to the end as   !!
!! something has caused it to fail. The following few lines are  !!
!! from the error log file which might help us figure out what's !!
!! wrong. Please add this information when reporting an error.   !!
!! As well you might want to take a look at the full error log   !!
!! in /opt/foginstall/installer/bin/error_logs/fog_error_1.6.0-beta.2061.log !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Software (please complete the following information):

Additional context After pinpointing the problem, i think it comes from this commit : https://github.com/FOGProject/fogproject/commit/f594d07299c08a7cd7a89f9803700d354707e104

A workaround can be made replacing the line 373, in file packages/web/lib/pages/schemaupdaterpage.page.php :

-        if (file_exists(BASEPATH . 'fog_schema_update_error.log', 0200)) {
+        if (file_exists(BASEPATH . 'fog_schema_update_error.log')) {

Thank you ! Alexandre

mastacontrola commented 1 month ago

Should be fixed in latest, thanks for letting us know and apologies for accidentally adding that.

abotzung commented 1 month ago

No stress, thank you ! FOG 1.6 installs successfully now.

Cheers, Alexandre