Error messages after upgrading from 6.0.4 to 8.2.1

Ask all your questions regarding OC 8.2 Please read the Support Forum Rules
Forum rules
The forums were migrated over to https://central.owncloud.org which is based on the forum software Discourse. The forums here is put into read-only mode starting from today.

More background information about this move and the reasoning behind it is available in this blogpost:

https://daniel.molkentin.net/2016/07/20 ... d-central/
pedropt
Beginner
Posts: 45
Joined: Wed Dec 16, 2015 12:19 am
ownCloud version: 9.0.2
Webserver: nginx
Database: MySQL
OS: Linux
PHP version: 5.6.22

Error messages after upgrading from 6.0.4 to 8.2.1

Postby pedropt » Wed Dec 16, 2015 12:28 am

Hi everyone , this is my first post here .
I am running an openmediavault server , and i installed owncloud 6.0.4 from their webgui plugin options , but then i realize that they are still in 6.0.4 version of owncloud , so i downloaded the debian files for installing 8.2.1 version of owncloud .
Owncloud is working , and the version that it shows is the last one , but i got php errors that i was looking on the web for solutions to solve it without any success until now .

The messages i received was these 3 :

Security & setup warnings

php does not seem to be setup properly to query system environment variables. The test with getenv("PATH") only returns an empty response.
Please check the installation documentation ↗ for php configuration notes and the php configuration of your server, especially when using php-fpm.

Error occurred while checking server setup

The "Strict-Transport-Security" HTTP header is not configured to least "15768000" seconds. For enhanced security we recommend enabling HSTS as described in our security tips.


Transactional file locking is using the database as locking backend, for best performance it's advised to configure a memcache for locking. See the documentation ↗ for more information.

Please double check the installation guides ↗, and check for any errors or warnings in the log.


The php log shows this message :

session_name(): session.name cannot be a numeric or empty 'xxxxxxxxx406897400xxxxxx03409556xxxxxxx' at /var/www/owncloud/lib/private/session/internal.php#42


Any idea how to solve these issues ?
I am lost .
I am running nginx server in debian 8 .

pedropt
Beginner
Posts: 45
Joined: Wed Dec 16, 2015 12:19 am
ownCloud version: 9.0.2
Webserver: nginx
Database: MySQL
OS: Linux
PHP version: 5.6.22

Re: Error messages after upgrading from 6.0.4 to 8.2.1

Postby pedropt » Wed Dec 16, 2015 1:52 am

I solved already one problem , from the php log :
session_name(): session.name cannot be a numeric or empty 'xxxxxxxxx406897400xxxxxx03409556xxxxxxx' at /var/www/owncloud/lib/private/session/internal.php#42


To solve this error i had to change in the uuid folder where owncloud stores session data , by changing the directory :

From :
owncloud-xxxxxxxxx406897400xxxxxx03409556xxxxxxx

To :
owncloud-ocxxxxxxxx <- first 8 digits

and i had to change in /var/www/owncloud/config/config.php
the session on the top of the configuration to that new name : owncloud-ocxxxxxxxx

pedropt
Beginner
Posts: 45
Joined: Wed Dec 16, 2015 12:19 am
ownCloud version: 9.0.2
Webserver: nginx
Database: MySQL
OS: Linux
PHP version: 5.6.22

Re: Error messages after upgrading from 6.0.4 to 8.2.1

Postby pedropt » Wed Dec 16, 2015 2:14 am

Another issue solved :
The "Strict-Transport-Security" HTTP header is not configured to least "15768000" seconds. For enhanced security we recommend enabling HSTS as described in our security tips.


In Owncloud guides i only found the configuration for Apache Web Servers and not for nginx (my case) .
The solution for this issue is going to /etc/nginx/sites-enabled/owncloud virtual server config file

and add this line in the config :

add_header Strict-Transport-Security "max-age=15768000; includeSubdomains; preload";


and then restart nginx :
/etc/init.d/nginx restart

pedropt
Beginner
Posts: 45
Joined: Wed Dec 16, 2015 12:19 am
ownCloud version: 9.0.2
Webserver: nginx
Database: MySQL
OS: Linux
PHP version: 5.6.22

Re: Error messages after upgrading from 6.0.4 to 8.2.1

Postby pedropt » Wed Dec 16, 2015 2:44 am

In my last error :
php does not seem to be setup properly to query system environment variables. The test with getenv("PATH") only returns an empty response.
Please check the installation documentation ↗ for php configuration notes and the php configuration of your server, especially when using php-fpm.



i was looking in owncloud 8.2 manual , and they say :
System environment variables

When you are using php-fpm, system environment variables like PATH, TMP or others are not automatically populated in the same way as when using php-cli. A PHP call like getenv('PATH'); can therefore return an empty result. So you may need to manually configure environment varibles in the appropropriate php-fpm ini/config file.

Here are some example root paths for these ini/config files:
Ubuntu/Mint CentOS/Red Hat/Fedora
/etc/php5/fpm/ /etc/php-fpm.d/

In both examples, the ini/config file is called www.conf, and depending on the distro version or customizations you have made, it may be in a subdirectory.

Usually, you will find some or all of the environment variables already in the file, but commented out like this:

;env[HOSTNAME] = $HOSTNAME
;env[PATH] = /usr/local/bin:/usr/bin:/bin
;env[TMP] = /tmp
;env[TMPDIR] = /tmp
;env[TEMP] = /tmp


but when i call the environment paths from console i get :
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin


i wrote those variables in www.conf in /etc/php5/fpm/pool.d/www.conf but i still get the same error on owncloud admin tab .
I restarted nginx , php5-fpm and i cleaned the log files to check if everything was ok .

Anyone ?

tflidd
Forum Moderator
Posts: 7159
Joined: Sat Dec 07, 2013 7:27 pm
ownCloud version: 8.2.3
Webserver: Apache
Database: MySQL
OS: Linux

Re: Error messages after upgrading from 6.0.4 to 8.2.1

Postby tflidd » Wed Dec 16, 2015 3:36 pm

Did you restart php5-fpm? You can put a phpinfo() into you document root in order to verify which settings apply.

pedropt
Beginner
Posts: 45
Joined: Wed Dec 16, 2015 12:19 am
ownCloud version: 9.0.2
Webserver: nginx
Database: MySQL
OS: Linux
PHP version: 5.6.22

Re: Error messages after upgrading from 6.0.4 to 8.2.1

Postby pedropt » Wed Dec 16, 2015 3:52 pm

Hi , thanks for the reply on this issue .
Yes , i restarted php5-fpm service to apply the new settings , but i still get that error on the web interface of owncloud .

Could you give me more details in how to do that operation with phpinfo in document root ?

tflidd
Forum Moderator
Posts: 7159
Joined: Sat Dec 07, 2013 7:27 pm
ownCloud version: 8.2.3
Webserver: Apache
Database: MySQL
OS: Linux

Re: Error messages after upgrading from 6.0.4 to 8.2.1

Postby tflidd » Wed Dec 16, 2015 4:02 pm


pedropt
Beginner
Posts: 45
Joined: Wed Dec 16, 2015 12:19 am
ownCloud version: 9.0.2
Webserver: nginx
Database: MySQL
OS: Linux
PHP version: 5.6.22

Re: Error messages after upgrading from 6.0.4 to 8.2.1

Postby pedropt » Wed Dec 16, 2015 4:35 pm

PHP Version 5.4.45-0+deb7u2

PHP Variables
_SERVER["PATH_INFO"] no value

cgi-fcgi
php-fpm active


Directive Local Value Master Value
cgi.discard_path 0 0

pedropt
Beginner
Posts: 45
Joined: Wed Dec 16, 2015 12:19 am
ownCloud version: 9.0.2
Webserver: nginx
Database: MySQL
OS: Linux
PHP version: 5.6.22

Re: Error messages after upgrading from 6.0.4 to 8.2.1

Postby pedropt » Wed Dec 16, 2015 11:51 pm

The solution is editing "/etc/php5/fpm/pool.d/openmediavault-owncloud.conf"
and adding this line :
env[PATH] = /usr/local/bin:/usr/bin:/bin

then restart the php5-fpm service
/etc/init.d/php5-fpm restart

Note : Thanks to ENRA user on openmediavault forum .

lneib
Newbie
Posts: 6
Joined: Thu Dec 04, 2014 12:32 am
ownCloud version: 7.0.2
Webserver: proprietary
Database: SQLite
OS: Linux
PHP version: 5.4.45
Contact:

Re: Error messages after upgrading from 6.0.4 to 8.2.1

Postby lneib » Mon Jul 18, 2016 3:28 pm

I too am running owncloud on FreeNas and getting the same error message. I have had my owncloud server up and running since Version 7.x and just upgraded to 8.2.1 and running PHP 5.4.45. I am also getting the same error you are getting with the environment path.

My question is have you upgraded your PHP version and if you have did it break anything? I Think 5.6.xx is the newest and I would like to upgrade the PHP but I want know if you have upgraded, if it broke anything and can I backup the old PHP files in case I need to revert back.

I setup the OwnCloud Server following Dr. KK's video and guide and I have not done any maintenance on it in almost a year. I am a beginner at this stuff but learning.

thanks in Advance


  • Similar Topics
    Replies
    Views
    Last post

Return to “ownCloud Server 8.2”

Who is online

Users browsing this forum: No registered users and 1 guest