Install from command line

Steps to reproduce

  1. sudo -u www-data php /var/www/naspibagel/owncloud/occ maintenance:install --database ‘mysql’ --database-name ‘mysql’ --database-user ‘oc_BagelCloud1’ --database-pass ‘crazypassword’ --admin-user ‘BagelCloud’ --admin-pass ‘mypassword’

Expected behaviour

Tell us what should happen
OwnCloud should install

Actual behaviour

Tell us what happens instead
ownCloud is not installed - only a limited number of commands are available
An unhandled exception has been thrown:
Error: [] operator not supported for strings in /var/www/naspibagel/owncloud/lib/private/App/InfoParser.php:186
Stack trace:
#0 /var/www/naspibagel/owncloud/lib/private/App/InfoParser.php(188): OC\App\InfoParser->xmlToArray(Object(SimpleXMLElement))
#1 /var/www/naspibagel/owncloud/lib/private/App/InfoParser.php(59): OC\App\InfoParser->xmlToArray(Object(SimpleXMLElement))
#2 /var/www/naspibagel/owncloud/lib/private/legacy/app.php(662): OC\App\InfoParser->parse(’/var/www/naspib…’)
#3 /var/www/naspibagel/owncloud/lib/private/Installer.php(527): OC_App::getAppInfo(‘activity’)
#4 /var/www/naspibagel/owncloud/lib/private/Setup.php(379): OC\Installer::installShippedApps()
#5 /var/www/naspibagel/owncloud/core/Command/Maintenance/Install.php(84): OC\Setup->install(Array)
#6 /var/www/naspibagel/owncloud/3rdparty/symfony/console/Command/Command.php(259): OC\Core\Command\Maintenance\Install->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#7 /var/www/naspibagel/owncloud/3rdparty/symfony/console/Application.php(844): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#8 /var/www/naspibagel/owncloud/3rdparty/symfony/console/Application.php(192): Symfony\Component\Console\Application->doRunCommand(Object(OC\Core\Command\Maintenance\Install), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#9 /var/www/naspibagel/owncloud/3rdparty/symfony/console/Application.php(123): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#10 /var/www/naspibagel/owncloud/lib/private/Console/Application.php(146): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#11 /var/www/naspibagel/owncloud/console.php(94): OC\Console\Application->run()
#12 /var/www/naspibagel/owncloud/occ(11): require_once(’/var/www/naspib…’)
#13 {main}pi@Bagel:~ $

Server configuration

Operating system:
Raspbian
Web server:
Apache2.4.38
Database:
mysql
PHP version:
7.3
ownCloud version: (see ownCloud admin page)
9.1.0
Updated from an older ownCloud or fresh install:
Trying to fresh install
Where did you install ownCloud from:
Trying to install it from the command line
Signing status (ownCloud 9.0 and above):

Login as admin user into your ownCloud and access 
http://example.com/index.php/settings/integrity/failed 
paste the results into https://gist.github.com/ and puth the link here.

The content of config/config.php:
.<?php
$CONFIG = array (
‘instanceid’ => ‘occlil637dgz’,
‘passwordsalt’ => ‘’,
‘secret’ => '
’,
‘trusted_domains’ =>
array (
0 => ‘localhost’,
),
‘datadirectory’ => ‘/var/www/naspibagel/owncloud/data’,
‘overwrite.cli.url’ => ‘http://localhost’,
‘dbtype’ => ‘mysql’,
‘version’ => ‘9.1.0.15’,
‘dbname’ => ‘mysql’,
‘dbhost’ => ‘localhost’,
‘dbtableprefix’ => ‘oc_’,
‘dbuser’ => ‘oc_BagelCloud1’,
‘dbpassword’ => '
*******’,
);

Log in to the web-UI with an administrator account and click on
'admin' -> 'Generate Config Report' -> 'Download ownCloud config report'
This report includes the config.php settings, the list of activated apps
and other details in a well sanitized form.

or 

If you have access to your command line run e.g.:
sudo -u www-data php occ config:list system
from within your ownCloud installation folder

*ATTENTION:* Do not post your config.php file in public as is. Please use one of the above
methods whenever possible. Both, the generated reports from the web-ui and from occ config:list
consistently remove sensitive data. You still may want to review the report before sending.
If done manually then it is critical for your own privacy to dilligently
remove *all* host names, passwords, usernames, salts and other credentials before posting.
You should assume that attackers find such information and will use them against your systems.

List of activated apps:

If you have access to your command line run e.g.:
sudo -u www-data php occ app:list
from within your ownCloud installation folder.

Are you using external storage, if yes which one: local/smb/sftp/…

Are you using encryption: yes/no
Yes

With access to your command line run e.g.:
sudo -u www-data php occ ldap:show-config
from within your ownCloud installation folder

ownCloud is not installed - only a limited number of commands are available

[Symfony\Component\Console\Exception\CommandNotFoundException]
There are no commands defined in the “ldap” namespace.

Without access to your command line download the data/owncloud.db to your local
computer or access your SQL server remotely and run the select query:
SELECT * FROM oc_appconfig WHERE appid = ‘user_ldap’;

Eventually replace sensitive data as the name/IP-address of your LDAP server or groups.


### Client configuration
**Browser:**

**Operating system:**

### Logs
#### Web server error log

Insert your webserver log here
A lot of this action here

[Sun Dec 13 16:28:53.056505 2020] [mpm_prefork:notice] [pid 693] AH00169: caught SIGTERM, shutting down
[Sun Dec 13 16:29:09.188632 2020] [ssl:warn] [pid 596] AH01906: naspibagel.page:443:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20180731/pdo_mysql.so' (tried: /usr/lib/php/20180731/pdo_mysql.so (/usr/lib/php/20180731/pdo_mysql.so: undefined symbol: mysqlnd_allocator), /usr/lib/php/20180731//usr/lib/php/20180731/pdo_mysql.so.so (/usr/lib/php/20180731//usr/lib/php/20180731/pdo_mysql.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
[Sun Dec 13 16:29:12.474955 2020] [ssl:warn] [pid 698] AH01906: naspibagel.page:443:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Sun Dec 13 16:29:12.500823 2020] [mpm_prefork:notice] [pid 698] AH00163: Apache/2.4.38 (Raspbian) OpenSSL/1.1.1d configured -- resuming normal operations
[Sun Dec 13 16:29:12.501230 2020] [core:notice] [pid 698] AH00094: Command line: '/usr/sbin/apache2'
#### ownCloud log (data/owncloud.log)

Insert your ownCloud log here
Many many of what looks like these 2 repeating lines

"reqId":"ZQBG9edlMY3LKu1meQYc","remoteAddr":"**.**.***.**","app":"PHP","message":"PHP Startup: Unable to load dynamic library 'pdo_mysql' (tried: \/usr\/lib\/php\/20180731\/pdo_mysql (\/usr\/lib\/php\/20180731\/pdo_mysql: cannot open shared object file: No such file or directory), \/usr\/lib\/php\/20180731\/pdo_mysql.so (\/usr\/lib\/php\/20180731\/pdo_mysql.so: undefined symbol: mysqlnd_allocator)) at Unknown#0","level":3,"time":"2020-12-06T18:41:50+00:00","me$0","method":"POST","url":"\/owncloud\/index.php","user":"--"}

{"reqId":"qNGdLuTy9xFLG7mpLKHJ","remoteAddr":"**.**.***.**","app":"PHP","message":"ini_set(): A session is active. You cannot change the session module's ini settings at this time at \/var\/www\/naspibagel\/owncloud\/lib\/base.php#583","level":3,"time":"2020-12-06T18:42:10+00:00","method":"POST","url":"\/owncloud\/index.php","user":"--"}

#### Browser log

Insert your browser log here, this could for example include:

a) The javascript console log
b) The network log
c) …
``

Please help, I’ve run out of storage on my Google Drive and my family demands that I upload a new Spaghettios recipe thrice per day. I’ve uploaded over 600 so far but I need this cloud to allow more room for recipes. The last 2 years have been a haze of flow charts and O’s. I’ve been slightly altering cooking times and baking temperatures but they are beginning to notice. Their hunger cannot be satiated. They crave the O’s. My next recipe will involve bagels. I’m running out of options, I’ve asked Boy R D for inspiration but he is convinced I’m a Campbell’s informant.

ownCloud 9.1 is not compatible with PHP 7.3: https://doc.owncloud.org/server/10.4/admin_manual/release_notes.html#official-php-7-3-support

I hope you have a good reason to install such an old version of ownCloud, and just a hint, spaghettios recipes is not it. :wink:

If you have an old ownCloud db & files, you could just install the new 10.5 codebase and run an occ upgrade directly on the system (but obviously make sure you have proper backups). You might have to disable a few old apps for it to run through, and it could potentially take quite a while.

Make sure to read the article carefully: https://doc.owncloud.org/server/admin_manual/maintenance/upgrade.html

1 Like

Thank you for your help, I upgraded to 10.5 then had to disable a couple apps per the graphic installer but I got my cloud up and running!

2 Likes