[How-To] ownCloud using NGINX, PHP-FPM, and MySQL

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
So if I understand you correctly you are saying to run commands like this:

pkg info PHP module zip

or

pkg delete PHP module zip

for all the listed errors that showed up regarding PHP in the owncloud GUI.

Do I then do something like this?:

make reinstall PHP module zip

or possibly this;

pkg install PHP module zip

EDIT: How would I know what to compare the versions against?
just run pkg info
that will give you the package names and versions
 

mcolinp

Explorer
Joined
Jan 30, 2013
Messages
84
pkg info return this:

php55-5.5.16 PHP Scripting Language
php55-ctype-5.5.16 The ctype shared extension for php
php55-curl-5.5.16 The curl shared extension for php
php55-dom-5.5.16 The dom shared extension for php
php55-extensions-1.8 "meta-port" to install PHP extensions
php55-filter-5.5.16 The filter shared extension for php
php55-hash-5.5.16 The hash shared extension for php
php55-iconv-5.5.16 The iconv shared extension for php
php55-json-5.5.16 The json shared extension for php
php55-opcache-5.5.16 The opcache shared extension for php
php55-pdo-5.5.16 The pdo shared extension for php
php55-pdo_sqlite-5.5.16_1 The pdo_sqlite shared extension for php
php55-phar-5.5.16 The phar shared extension for php
php55-posix-5.5.16 The posix shared extension for php
php55-session-5.5.16 The session shared extension for php
php55-simplexml-5.5.16 The simplexml shared extension for php
php55-sqlite3-5.5.16_1 The sqlite3 shared extension for php
php55-tokenizer-5.5.16 The tokenizer shared extension for php
php55-xml-5.5.16 The xml shared extension for php
php55-xmlreader-5.5.16 The xmlreader shared extension for php
php55-xmlwriter-5.5.16 The xmlwriter shared extension for php
pkg-1.3.8 Package manager
sqlite3-3.8.6 SQL database engine in a C library

(There was other names listed above this; but these were all the pkgs related to php)
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
I don't see any issues. maybe you never restarted php after upgrading it?
service php-fpm restart
 

mcolinp

Explorer
Joined
Jan 30, 2013
Messages
84
I was having problems with creating a folder using mkdir;

There seems to be a permissions bug in freenas 9.2.1.7.

Because of that; I changed the references in your guide from mnt/files to /media; since this directory already exists and I have used it successfully before.

Wondering if this may have led to the php errors. I tried restarting; and no luck.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
I was having problems with creating a folder using mkdir;

There seems to be a permissions bug in freenas 9.2.1.7.

Because of that; I changed the references in your guide from mnt/files to /media; since this directory already exists and I have used it successfully before.

Wondering if this may have led to the php errors. I tried restarting; and no luck.
Those errors are not related to permissions. Two unrelated issues, you just happened to hit alot of issues during your setup.
 

mcolinp

Explorer
Joined
Jan 30, 2013
Messages
84
I went through everything fresh today; & it worked!

Not sure what nuance I fudged yesterday; but happy to have it working now . . .

Thanks for your help Joshua
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
no problem, glad you got it working
 

mcolinp

Explorer
Joined
Jan 30, 2013
Messages
84
I haven't started using sharing links with others yet; as it is not setup to truly be accessed other than on my local network.

I noticed this alert inthe admin page of owncloud:

URL generation in notification emails
If your installation is not installed in the root of the domain and uses system cron, there can be issues with the URL generation. To avoid these problems, please set the "overwritewebroot" option in your config.php file to the webroot path of your installation (Suggested: "/owncloud")

Is this the same for you? It's not a big deal; but it would be valuable to know what causes this as I will be looking to implement the SSL and fail2ban based on the guides that cyberjock and Rickle's guides.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
I haven't started using sharing links with others yet; as it is not setup to truly be accessed other than on my local network.

I noticed this alert inthe admin page of owncloud:

URL generation in notification emails
If your installation is not installed in the root of the domain and uses system cron, there can be issues with the URL generation. To avoid these problems, please set the "overwritewebroot" option in your config.php file to the webroot path of your installation (Suggested: "/owncloud")

Is this the same for you? It's not a big deal; but it would be valuable to know what causes this as I will be looking to implement the SSL and fail2ban based on the guides that cyberjock and Rickle's guides.
yup I got that too when I updated to 7.0.2
Ill add the fix to the guide.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
That would be great; Thank you.
Fix was added to the end of the second post.

This only fixes links in notification emails automatically sent by cron, not links you generate or manually send.
 

antanas

Cadet
Joined
Nov 3, 2014
Messages
5
Hi,
everything seems to be working just fine except sending emails via smtp and ssl/tls. I can telnet to the smtp server and it looks ok from terminal, but trying example smtp script of phpmailer included in owncloud does not work as it does not work from owncloud itself. But when using smtp without ssl or tls, it actually works. I had owncloud installed as freenas plugin before and it worked with ssl/tls. I still have that installation on different ip and it still works so I can compare something if needed. Is there something specific to nginx or php-fpm as it was to make https working? Thanks a lot for any help on this.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Hi,
everything seems to be working just fine except sending emails via smtp and ssl/tls. I can telnet to the smtp server and it looks ok from terminal, but trying example smtp script of phpmailer included in owncloud does not work as it does not work from owncloud itself. But when using smtp without ssl or tls, it actually works. I had owncloud installed as freenas plugin before and it worked with ssl/tls. I still have that installation on different ip and it still works so I can compare something if needed. Is there something specific to nginx or php-fpm as it was to make https working? Thanks a lot for any help on this.
It works fine on my setup using GMail as my SMTP provider. I put the below in the settings/admin page.
Code:
Send mode = smtp
Encryption = SSL
Authentication method = Login
Authentication Required = Checked
Server address = smtp.gmail.com:465
 

antanas

Cadet
Joined
Nov 3, 2014
Messages
5
ok I tried to set up gmail smtp server now and it is the same: SMTP connect() failed.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Maybe I need some more libraries to install? Are you using php56?
Actually I am using php55 in my production machine. Just tested in my test environment (php56) and I got this error "A problem occurred while sending the email. Please revise your settings."
 

antanas

Cadet
Joined
Nov 3, 2014
Messages
5
Actually I am using php55 in my production machine. Just tested in my test environment (php56) and I got this error "A problem occurred while sending the email. Please revise your settings."
I see. So this is good news because it is the same for me and it narrows down the possible causes of the problem.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Last edited:

Marcus Ru

Cadet
Joined
Nov 17, 2014
Messages
2
Hi Joshua!

I followed your guide and stumbled in the very beginning:

Console in jail's userland
Code (text):

2.) make install clean -C /usr/ports/devel/pecl-APCu

===> Found saved configuration for m4-1.4.17_1,1
===> m4-1.4.17_1,1 depends on file: /usr/local/sbin/pkg - found
=> m4-1.4.17.tar.bz2 doesn't seem to exist in /usr/ports/distfiles/.
=> Attempting to fetch http://ftp.gnu.org/gnu/m4/m4-1.4.17.tar.bz2
m4-1.4.17.tar.bz2 100% of 1404 kB 695 kBps 00m02s
===> Fetching all distfiles required by m4-1.4.17_1,1 for building
===> Extracting for m4-1.4.17_1,1
=> SHA256 Checksum OK for m4-1.4.17.tar.bz2.
===> Patching for m4-1.4.17_1,1
===> Applying FreeBSD patches for m4-1.4.17_1,1
File to patch:

I don't know which file should be patched...

Thanks for your help!!!

Marcus
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Hi Joshua!

I followed your guide and stumbled in the very beginning:

Console in jail's userland
Code (text):

2.) make install clean -C /usr/ports/devel/pecl-APCu

===> Found saved configuration for m4-1.4.17_1,1
===> m4-1.4.17_1,1 depends on file: /usr/local/sbin/pkg - found
=> m4-1.4.17.tar.bz2 doesn't seem to exist in /usr/ports/distfiles/.
=> Attempting to fetch http://ftp.gnu.org/gnu/m4/m4-1.4.17.tar.bz2
m4-1.4.17.tar.bz2 100% of 1404 kB 695 kBps 00m02s
===> Fetching all distfiles required by m4-1.4.17_1,1 for building
===> Extracting for m4-1.4.17_1,1
=> SHA256 Checksum OK for m4-1.4.17.tar.bz2.
===> Patching for m4-1.4.17_1,1
===> Applying FreeBSD patches for m4-1.4.17_1,1
File to patch:

I don't know which file should be patched...

Thanks for your help!!!

Marcus
just skip building that broken port and continue the guide.
'pkg install m4'
 
Top