Welcome to OCS Inventory NG community support, where you can ask questions and receive answers from other members of the community.

Please ask questions only in English or French.

Release 2.11.1 available

The official documentation can be found on http://wiki.ocsinventory-ng.org. Read it before asking your question.

blank page after install ocs-server

Hi,

after a fresh installation of ocsinventory-server I get a blank page even if I call the servers IP. I only can see the php source file. My configuration as follows:

/etc/apache2/sites-available/000-default.conf

...

Alias / "/usr/share/ocsinventory-reports/ocsreports/"

<Directory "/usr/share/ocsinventory-reports/ocsreports/">

 Options Indexes MultiViews FollowSymLinks

 AllowOverride None

Order allow,deny

Allow from all

</Directory>

...

/etc/php/7.0/cli/php.ini

    max_execution_time = 180
    max_input_time = 180
    memory_limit = 256M
    upload_max_filesize = 300M   
    post_max_size = 300M

In /etc/apache2/conf-available/ there are the files ocsinventory-rports.conf, z-ocsinventory-server.conf and zz-ocsinventory-restapi.conf.
In /etc/apache2/conf-enabled/ there are the equivalent symbolic links.

Because it shouln't be that the php source file is shown, I think that is a problem with the Apache2 configuration.

Does anyone has an idea?

Greetings
in OCS Inventory NG server for Unix by (1.3k points)

5 Answers

0 votes

I have never seen a forum so unattended, really bad!

To try to help those who have had the same problem:

Check if there are other versions of php installed on the system (typically in / etc / php you see several subfolders, I had both /7.0 and /7.3) then as root give the command to disable the non-current version, in my case:

 a2dismod php7.0

Then restart apache:

systemctl restart apache2

 or 

service apache2 restart

If you are lucky you should have solved it!

by (140 points)
edited by
0 votes
Long time ago...

the same error occurs after moving an ocs vm (.vdhx) to another hyper V server. Only a blank page. It doesn't matter if server or client.

In this case the last tip wasn't helpful because there is only one version of php (7.2) on this system.

My system is an Ubuntu 19.04.

Has anyone an idea how to solve?
by (1.3k points)
0 votes
Hi,

any errors in apache error log file ?

Regards

Frank
by (88.5k points)
0 votes
This is a little view of my error.log:

[Thu Oct 15 11:27:30.972535 2020] [mpm_prefork:notice] [pid 2233] AH00169: caught SIGTERM, shutting down
ocsinventory-server: Bad setting. `IPDISCOVER_LINK_TAG_NETWORK` is not set. Default: `0`
ocsinventory-server: Bad setting. `IPDISCOVER_LINK_TAG_NETWORK` is not set. Default: `0`
[Thu Oct 15 11:27:55.898281 2020] [mpm_prefork:notice] [pid 1088] AH00163: Apache/2.4.38 (Ubuntu) mod_perl/2.0.10 Perl/v5.28.1 configured -- resuming normal operations
[Thu Oct 15 11:35:37.408996 2020] [php7:warn] [pid 1110] [client 10.35.80.64:59485] PHP Warning:  Use of undefined constant SSL_KEY - assumed 'SSL_KEY' (this will throw an Error in a future version of PHP) in /usr/share/ocsinventory-reports/ocsreports/require/header.php on line 97
[Thu Oct 15 11:35:37.409041 2020] [php7:warn] [pid 1110] [client 10.35.80.64:59485] PHP Warning:  Use of undefined constant SSL_CERT - assumed 'SSL_CERT' (this will throw an Error in a future version of PHP) in /usr/share/ocsinventory-reports/ocsreports/require/header.php on line 97
[Thu Oct 15 11:35:37.409064 2020] [php7:warn] [pid 1110] [client 10.35.80.64:59485] PHP Warning:  Use of undefined constant CA_CERT - assumed 'CA_CERT' (this will throw an Error in a future version of PHP) in /usr/share/ocsinventory-reports/ocsreports/require/header.php on line 97
[Thu Oct 15 11:35:37.409073 2020] [php7:warn] [pid 1110] [client 10.35.80.64:59485] PHP Warning:  Use of undefined constant SERVER_PORT - assumed 'SERVER_PORT' (this will throw an Error in a future version of PHP) in /usr/share/ocsinventory-reports/ocsreports/require/header.php on line 97
[Thu Oct 15 11:35:37.409083 2020] [php7:warn] [pid 1110] [client 10.35.80.64:59485] PHP Warning:  Use of undefined constant SSL_MODE - assumed 'SSL_MODE' (this will throw an Error in a future version of PHP) in /usr/share/ocsinventory-reports/ocsreports/require/function_commun.php on line 156
[Thu Oct 15 11:35:37.409091 2020] [php7:warn] [pid 1110] [client 10.35.80.64:59485] PHP Warning:  Use of undefined constant ENABLE_SSL - assumed 'ENABLE_SSL' (this will throw an Error in a future version of PHP) in /usr/share/ocsinventory-reports/ocsreports/require/function_commun.php on line 156
[Thu Oct 15 11:35:37.409151 2020] [php7:warn] [pid 1110] [client 10.35.80.64:59485] PHP Warning:  mysqli_real_connect() expects parameter 6 to be integer, string given in /usr/share/ocsinventory-reports/ocsreports/require/function_commun.php on line 177
[Thu Oct 15 11:35:37.409207 2020] [php7:error] [pid 1110] [client 10.35.80.64:59485] PHP Fatal error:  Uncaught Error: Call to a member function select_db() on null in /usr/share/ocsinventory-reports/ocsreports/require/function_commun.php:188\nStack trace:\n#0 /usr/share/ocsinventory-reports/ocsreports/require/header.php(97): dbconnect('localhost', '****', '****', 'ocsweb', 'SSL_KEY', 'SSL_CERT', 'CA_CERT', 'SERVER_PORT')\n#1 /usr/share/ocsinventory-reports/ocsreports/index.php(44): require('/usr/share/ocsi...')\n#2 {main}\n  thrown in /usr/share/ocsinventory-reports/ocsreports/require/function_commun.php on line 188
[Thu Oct 15 11:40:15.113796 2020] [php7:warn] [pid 1111] [client 10.35.80.64:59662] PHP Warning:  Use of undefined constant SSL_KEY - assumed 'SSL_KEY' (this will throw an Error in a future version of PHP) in /usr/share/ocsinventory-reports/ocsreports/require/header.php on line 97
[Thu Oct 15 11:43:29.693746 2020] [php7:notice] [pid 1112] [client 10.35.80.64:59838] phpmyadmin: Failed to load /etc/phpmyadmin/config-db.php Check group www-data has read access and open_basedir restrictions.

It seems that some settings were changed after moving.
by (1.3k points)
0 votes
Hi @ocs_user

Did you have resolve your problem?
by (320 points)
 
Powered by Question2Answer
...