Nextcloud on GhostBSD

Need support for GhostBSD. Ask here if your question does not fit elsewhere.
dhenzler

Nextcloud on GhostBSD

Post by dhenzler »

I loaded Nextcloud and couldn't make it start the install. I'm sure that MySQL PHP and Apache2 are running correctly as I was able to configure WordPress just fine. Wonder if Nextcloud has some 32bit stuff in it that GhostBSD can't handle.

As well I was notified that Firefox was outdated, and after updating it, I get an error when trying to use just about any search engine to find info. Browsers were Waterfox and Chromium. Firefox just plain wouldn't configure.... I used the software update on GhostBSD to perform the update, so it wasn't from Softcom or some other 3rd party outfit...

Anyway the PHP files inside Nextcloud folder just aren't read by PHP. I tried #localhost/nextcloud/index.html and it forwards to index.php as it should. No graphics show... blank white screen.

I was able to configure Nextcloud on FreeBSD 11.1 Figured this would work as well... maybe NOT.
dhenzler

Re: Nextcloud on GhostBSD

Post by dhenzler »

Turns out that php56-xmlwriter is not available on GhostBSD and is required by Nextcloud 12.x

Downloaded a copy of php56-xmlwriter from web... that was compiled on amd64, but likely linux.. the .so file didn't work.
User avatar
ericbsd
Developer
Posts: 2052
Joined: Mon Nov 19, 2012 7:54 pm

Re: Nextcloud on GhostBSD

Post by ericbsd »

You could try to compile from ports /textproc/php56-xmlwriter.

Code: Select all

portsnap fetch extract

Code: Select all

cd /usr/ports/textproc/php56-xmlwriter

Code: Select all

make config-recursive reinstall clean
dhenzler

Re: Nextcloud on GhostBSD

Post by dhenzler »

no joy. results think that I am running php70
here is what is loaded
GhostBSD is 64 bit only code... is this ports 32/64 or 64bit only

root@ghostbsd:/usr/ports/textproc/php56-xmlwriter # make config-recursive install clean
===> Setting user-specified options for php56-xmlwriter-5.6.33 and dependencies
===> php56-xmlwriter-5.6.33 cannot be installed: doesn't work with lang/php70
port (doesn't support PHP 7.0).

*** Error code 1

Stop.
make: stopped in /usr/ports/textproc/php56-xmlwriter


root@ghostbsd:/usr/ports/textproc/php56-xmlwriter # pkg info | grep php
mod_php56-5.6.32_1 PHP Scripting Language
php56-5.6.33 PHP Scripting Language
php56-bz2-5.6.32_1 The bz2 shared extension for php
php56-ctype-5.6.33 The ctype shared extension for php
php56-curl-5.6.33 The curl shared extension for php
php56-dom-5.6.33 The dom shared extension for php
php56-fileinfo-5.6.33 The fileinfo shared extension for php
php56-filter-5.6.33 The filter shared extension for php
php56-ftp-5.6.33 The ftp shared extension for php
php56-gd-5.6.33 The gd shared extension for php
php56-gettext-5.6.33 The gettext shared extension for php
php56-gmp-5.6.33 The gmp shared extension for php
php56-hash-5.6.33 The hash shared extension for php
php56-iconv-5.6.33 The iconv shared extension for php
php56-json-5.6.33 The json shared extension for php
php56-mbstring-5.6.33 The mbstring shared extension for php
php56-mcrypt-5.6.33 The mcrypt shared extension for php
php56-mysql-5.6.33 The mysql shared extension for php
php56-mysqli-5.6.33 The mysqli shared extension for php
php56-opcache-5.6.33 The opcache shared extension for php
php56-openssl-5.6.33 The openssl shared extension for php
php56-pcntl-5.6.33 The pcntl shared extension for php
php56-pdo-5.6.33 The pdo shared extension for php
php56-pdo_mysql-5.6.33 The pdo_mysql shared extension for php
php56-phar-5.6.33 The phar shared extension for php
php56-posix-5.6.33 The posix shared extension for php
php56-session-5.6.33 The session shared extension for php
php56-simplexml-5.6.33 The simplexml shared extension for php
php56-snmp-5.6.33 The snmp shared extension for php
php56-soap-5.6.33 The soap shared extension for php
php56-sockets-5.6.33 The sockets shared extension for php
php56-tokenizer-5.6.33 The tokenizer shared extension for php
php56-wddx-5.6.33 The wddx shared extension for php
php56-xml-5.6.33 The xml shared extension for php
php56-xmlreader-5.6.33 The xmlreader shared extension for php
php56-xmlrpc-5.6.33 The xmlrpc shared extension for php
php56-zip-5.6.33 The zip shared extension for php
php56-zlib-5.6.33 The zlib shared extension for php
phpMyAdmin-4.7.7 Set of PHP-scripts to manage MySQL over the web
Harion
Posts: 17
Joined: Sat Dec 30, 2017 3:30 pm

Re: Nextcloud on GhostBSD

Post by Harion »

Just for fun, I managed to install NextCould on GhostBSD with php56. It's not really easy but possible.

If you want, I can post the problems I encountered (at least the ones I remember) and how I solved them.
dhenzler

Re: Nextcloud on GhostBSD

Post by dhenzler »

I'd appreciate learning how to get it operational
Harion
Posts: 17
Joined: Sat Dec 30, 2017 3:30 pm

Re: Nextcloud on GhostBSD

Post by Harion »

As a starting point, you must have apache24 + php56 + mysql 5.7 (there are other database systems but this is the one I installed).

I put the nextcloud folder in /usr/local/www/apache24/data/. At this point, if you try http://localhost/nextcloud/ in your browser, you get a blank page, no matter what are the settings of php.ini. It's a permission problem. You have to change the owner to www of all the content of nextcloud folder (chown -R www:www /usr/local/www/apache24/data/nextcloud/).

Then, http://localhost/nextcloud/ shows some errors:

1) No driver for the database: with the help of OctoPkg, I installed php56-pdo_mysql.
2) php XMLwriter not installed: ericbsd showed us how to install it (that works with php56).
3) php XMLreader not installed: it's merely the same than above. The port location is textproc/php56-xmlreader/. Use exactly the same command (make config-recursive reinstall clean).

Once I reached this point, I restarted GhostBSD but I guess you only need to restart apache.

Some warnings about security and configuration appeared but I didn't have the time nor the desire to settle that. It seems to work anyway.
dhenzler

Re: Nextcloud on GhostBSD

Post by dhenzler »

Thanks for the info... Yes... PHP71 has the required xmlwriter file, but is incompatible with phpmyadmin. Which is an invaluable tool. Unfortunately seems you can't have multiple versions of php running for different apps. In Solaris 11 you can have multiple instances of mysql and I believe php running concurrently.

My quest is for a ZFS file system platform. As ZFS is reportedly faster for Cloud transfers than the competition. I currently have a Cloud up using Linux Mint 18.2 and BTRFS. Unsolicited comments from my users was "boy that is a lot faster". I have a 10Mbps up network service so speed is noticable. Burried under a T1 or typical 1Mbps up service you'd probably never see the difference. I share some video content and so the fellas notice it.

Anyway.... the Linux system runs php 57, but the phpmyadmin version on that doesn't care if it's over 5.6.

It's all fun and a terrible waste of time.

Dave
Harion
Posts: 17
Joined: Sat Dec 30, 2017 3:30 pm

Re: Nextcloud on GhostBSD

Post by Harion »

I understand your point. Seems it's your job and/or your responsibility to have a proper running NextCloud server.
As for me, it's not the case.The more I learn, the more it's fun.

I finally tried to solve the security & configuration problems. One of them was the file index.php which was reported as non-genuine. Well, I actually modified it to understand why it displayed a blank page but I reversed the changes in the meantime. Probably, I left an empty line more or less than the original file had. Wow, it checks all files for integrity? It's a good improvement for security (for instance, there is nothing comparable in the current version of phpBB).

NextCloud also reported that .htaccess wasn't functioning in nextcloud/data/, arguing that anyone can read files inside this folder. It was right. For example, nextcloud.log could be displayed in a browser. I had to change a setting in httpd.conf ("AllowOverride All" for the DocumentRoot directory). Again, something that phpBB didn't see although it's a serious security concern.

After that, it remained php56_fileinfo to install and set some parameters php.ini as NextCloud recommended. It's not really complete as I did not configure a memory cache nor I set the server to use HTTPS.
Hecktor
Posts: 27
Joined: Thu Dec 21, 2017 2:43 pm

Re: Nextcloud on GhostBSD

Post by Hecktor »

If your goal is having it run on a system with ZFS and it currently works on Mint, why not just install ZFS on mint?
Post Reply