Fossology installation -php error
Hello,
When the installation of fossology was processed ,there is one issue related to php.
In the step of /usr/local/lib/fossology/fo-postinstall.
1.Then error shows:
*** Running postinstall for web-only actions***
*** Setting up the FOSSology database ***
NOTE: fossology database already exists, not creating
*** Checking for plpgsql support ***
NOTE: plpgsql already exists in fossology database, good
*** update the database and license_ref table ***
[color=crimson]PHP Warning: Invalid argument supplied for foreach() in /usr/local/lib/fossology/fossinit.php on line 58
X-Powered-By: PHP/5.4.16
Content-type: text/html[/color]
[color=crimson]FATAL! System Configuration Error, no SYSCONFDIR.
X-Powered-By: PHP/5.4.16
Content-type: text/html[/color]
##################################################################
2.I have seen the code but I still could not figure out how to solve it.
Code:
51 $sysconfdir = ‘’;
52 $delDbPattern = ‘the option -rfosstest will drop data bases with datname like “fosstest%”’;
53 /* command-line options /
54 $Options = getopt($AllPossibleOpts);
55
56
57
[color=crimson]58
59 foreach($Options as $optKey => $optVal)
60 {
61 switch($optKey)
62 {
63 case ‘c’: / set SYSCONFIDR /
64 $sysconfdir = $optVal;
65 break;
66 case ‘d’: / optional database name /
67 $DatabaseName = $optVal;
68 break;
69 case ‘f’: / schema file /
70 $SchemaFilePath = $optVal;
71 break;
72 case ‘h’: / help /
73 explainUsage();
74 case ‘l’: / update the license_ref table /
75 $UpdateLiceneseRef = true;
76 break;
77 case ‘v’: / verbose */
78 $Verbose = true;
79 break;
80 case ‘r’:
81 $delDbPattern = $optVal ? “$optVal%” : “fosstest%”;
82 break;
83 default:
84 echo “Invalid Option "$optKey".\n”;
85 explainUsage();
86 }
87 }
[/color]
#############################################
3.Here is the whole information about execute the scripts:
[color=crimson][root@localhost fossology]# /usr/local/lib/fossology/fo-postinstall
*** Running postinstall for everything ***
*** Running postinstall for common actions***
*** Creating user and group ***
NOTE: group ‘fossy’ already exists, good.
NOTE: user ‘fossy’ already exists, good.
*** Making sure needed dirs exist with right ownership/permissions ***
*** clearing file cache ***
NOTE: Repository already exists at /srv/fossology/repository
NOTE: Running the PostgreSQL vacuum and analyze command can result in a large database performance improvement. We suggest that you either configure postgres to run its autovacuum and autoanalyze daemons, or maintagent -D in a cron job, or run Admin > Maintenance on a regular basis. Admin > Dashboard will show you the last time vacuum and analyze have been run.
*** Running postinstall for web-only actions***
*** Setting up the FOSSology database ***
NOTE: fossology database already exists, not creating
*** Checking for plpgsql support ***
NOTE: plpgsql already exists in fossology database, good
*** update the database and license_ref table ***
PHP Warning: Invalid argument supplied for foreach() in /usr/local/lib/fossology/fossinit.php on line 58
X-Powered-By: PHP/5.4.16
Content-type: text/html
FATAL! System Configuration Error, no SYSCONFDIR.
X-Powered-By: PHP/5.4.16
Content-type: text/html
FATAL! System Configuration Error, no SYSCONFDIR.
FATAL: unable to connect to database, please check /usr/local/etc/fossology/Db.conf[/color]
#####################################################################################
Could you please provide any hint on this issue?
Thanks very much!
Best regards