matiasdelellis / facerecognition

Nextcloud app that implement a basic facial recognition system.
GNU Affero General Public License v3.0
510 stars 46 forks source link

Unable to enable/install app after installing requirements through provided repos #604

Closed Nomcon closed 1 year ago

Nomcon commented 1 year ago

I just installed bz2 through the default repo, as well as pdlib through the provided repo for Ubuntu focal here.

Expected behaviour

Being able to install the face recognition app through the Nextcloud app store.

Actual behaviour

App store tells me, that the PDlib library is not avalible

Server configuration

Logs

Web server error log

Web server error log ``` Pls let me know what other logs u might need and where to find them ```

Nextcloud log (data/nextcloud.log)

Nextcloud log ``` {"reqId":"SBt9mGq8EbGyDA1jwyT3","level":2,"time":"2022-02-18T21:47:01+00:00","remoteAddr":"192.168.2.104","user":"--","app":"no app in context","method":"PROPFIND","url":"/index.php","message":"Could not detect any host in http:///data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows) mirall/3.4.0stable-Win64 (build 20211129) (Nextcloud, windows-10.0.22000 ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":""} {"reqId":"SBt9mGq8EbGyDA1jwyT3","level":2,"time":"2022-02-18T21:47:01+00:00","remoteAddr":"192.168.2.104","user":"--","app":"no app in context","method":"PROPFIND","url":"/index.php","message":"Could not detect any host in https:///data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows) mirall/3.4.0stable-Win64 (build 20211129) (Nextcloud, windows-10.0.22000 ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":""} {"reqId":"n3gNLEtDahFHfhcfleoF","level":2,"time":"2022-02-18T21:48:03+00:00","remoteAddr":"192.168.2.104","user":"--","app":"no app in context","method":"PROPFIND","url":"/index.php","message":"Could not detect any host in http:///data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows) mirall/3.4.0stable-Win64 (build 20211129) (Nextcloud, windows-10.0.22000 ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":""} {"reqId":"n3gNLEtDahFHfhcfleoF","level":2,"time":"2022-02-18T21:48:03+00:00","remoteAddr":"192.168.2.104","user":"--","app":"no app in context","method":"PROPFIND","url":"/index.php","message":"Could not detect any host in https:///data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows) mirall/3.4.0stable-Win64 (build 20211129) (Nextcloud, windows-10.0.22000 ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":""} {"reqId":"uQyQ6iZ3GWMHLT6Hbch8","level":2,"time":"2022-02-18T21:49:05+00:00","remoteAddr":"192.168.2.104","user":"--","app":"no app in context","method":"PROPFIND","url":"/index.php","message":"Could not detect any host in http:///data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows) mirall/3.4.0stable-Win64 (build 20211129) (Nextcloud, windows-10.0.22000 ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":""} {"reqId":"uQyQ6iZ3GWMHLT6Hbch8","level":2,"time":"2022-02-18T21:49:05+00:00","remoteAddr":"192.168.2.104","user":"--","app":"no app in context","method":"PROPFIND","url":"/index.php","message":"Could not detect any host in https:///data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows) mirall/3.4.0stable-Win64 (build 20211129) (Nextcloud, windows-10.0.22000 ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":""} {"reqId":"ccfVCG4WIfE378wg062Y","level":2,"time":"2022-02-18T21:50:07+00:00","remoteAddr":"192.168.2.104","user":"--","app":"no app in context","method":"PROPFIND","url":"/index.php","message":"Could not detect any host in http:///data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows) mirall/3.4.0stable-Win64 (build 20211129) (Nextcloud, windows-10.0.22000 ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":""} {"reqId":"ccfVCG4WIfE378wg062Y","level":2,"time":"2022-02-18T21:50:07+00:00","remoteAddr":"192.168.2.104","user":"--","app":"no app in context","method":"PROPFIND","url":"/index.php","message":"Could not detect any host in https:///data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows) mirall/3.4.0stable-Win64 (build 20211129) (Nextcloud, windows-10.0.22000 ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":""} {"reqId":"4yDLzHnuDgHPe6XQceOS","level":2,"time":"2022-02-18T21:51:09+00:00","remoteAddr":"192.168.2.104","user":"--","app":"no app in context","method":"PROPFIND","url":"/index.php","message":"Could not detect any host in http:///data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows) mirall/3.4.0stable-Win64 (build 20211129) (Nextcloud, windows-10.0.22000 ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":""} {"reqId":"4yDLzHnuDgHPe6XQceOS","level":2,"time":"2022-02-18T21:51:09+00:00","remoteAddr":"192.168.2.104","user":"--","app":"no app in context","method":"PROPFIND","url":"/index.php","message":"Could not detect any host in https:///data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows) mirall/3.4.0stable-Win64 (build 20211129) (Nextcloud, windows-10.0.22000 ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":""} {"reqId":"aD64l2JP1YgehumN4qMp","level":2,"time":"2022-02-18T21:51:30+00:00","remoteAddr":"192.168.2.104","user":"--","app":"no app in context","method":"POST","url":"/index.php","message":"Could not detect any host in http:///data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.45 Safari/537.36","version":""} {"reqId":"aD64l2JP1YgehumN4qMp","level":2,"time":"2022-02-18T21:51:30+00:00","remoteAddr":"192.168.2.104","user":"--","app":"no app in context","method":"POST","url":"/index.php","message":"Could not detect any host in https:///data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.45 Safari/537.36","version":""} {"reqId":"aD64l2JP1YgehumN4qMp","level":3,"time":"2022-02-18T21:51:30+00:00","remoteAddr":"192.168.2.104","user":"--","app":"PHP","method":"POST","url":"/index.php","message":"mkdir(): Permission denied at /var/www/nextcloud/lib/private/Setup.php#308","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.45 Safari/537.36","version":"","exception":{"Exception":"Error","Message":"mkdir(): Permission denied at /var/www/nextcloud/lib/private/Setup.php#308","Code":0,"Trace":[{"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::"},{"file":"/var/www/nextcloud/lib/private/Setup.php","line":308,"function":"mkdir"},{"file":"/var/www/nextcloud/core/Controller/SetupController.php","line":74,"function":"install","class":"OC\\Setup","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/base.php","line":939,"function":"run","class":"OC\\Core\\Controller\\SetupController","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/lib/private/Log/ErrorHandler.php","Line":92,"CustomMessage":"--"}} {"reqId":"fMEm751kkGFWX3ZdiQDe","level":2,"time":"2022-02-18T21:52:11+00:00","remoteAddr":"192.168.2.104","user":"--","app":"no app in context","method":"PROPFIND","url":"/index.php","message":"Could not detect any host in http:///data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows) mirall/3.4.0stable-Win64 (build 20211129) (Nextcloud, windows-10.0.22000 ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":""} {"reqId":"fMEm751kkGFWX3ZdiQDe","level":2,"time":"2022-02-18T21:52:11+00:00","remoteAddr":"192.168.2.104","user":"--","app":"no app in context","method":"PROPFIND","url":"/index.php","message":"Could not detect any host in https:///data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows) mirall/3.4.0stable-Win64 (build 20211129) (Nextcloud, windows-10.0.22000 ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":""} {"reqId":"1s5VN43NhTwpNGvsL6G5","level":2,"time":"2022-02-18T21:53:13+00:00","remoteAddr":"192.168.2.104","user":"--","app":"no app in context","method":"PROPFIND","url":"/index.php","message":"Could not detect any host in http:///data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows) mirall/3.4.0stable-Win64 (build 20211129) (Nextcloud, windows-10.0.22000 ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":""} {"reqId":"1s5VN43NhTwpNGvsL6G5","level":2,"time":"2022-02-18T21:53:13+00:00","remoteAddr":"192.168.2.104","user":"--","app":"no app in context","method":"PROPFIND","url":"/index.php","message":"Could not detect any host in https:///data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows) mirall/3.4.0stable-Win64 (build 20211129) (Nextcloud, windows-10.0.22000 ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":""} {"reqId":"GmaW4Qp4hHiwUT9LPguw","level":2,"time":"2022-02-18T21:54:15+00:00","remoteAddr":"192.168.2.104","user":"--","app":"no app in context","method":"PROPFIND","url":"/index.php","message":"Could not detect any host in http:///data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows) mirall/3.4.0stable-Win64 (build 20211129) (Nextcloud, windows-10.0.22000 ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":""} {"reqId":"GmaW4Qp4hHiwUT9LPguw","level":2,"time":"2022-02-18T21:54:15+00:00","remoteAddr":"192.168.2.104","user":"--","app":"no app in context","method":"PROPFIND","url":"/index.php","message":"Could not detect any host in https:///data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows) mirall/3.4.0stable-Win64 (build 20211129) (Nextcloud, windows-10.0.22000 ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":""} {"reqId":"B4ZfiuQ0fQ8lO3MvUCpT","level":2,"time":"2022-02-18T21:55:17+00:00","remoteAddr":"192.168.2.104","user":"--","app":"no app in context","method":"PROPFIND","url":"/index.php","message":"Could not detect any host in http:///data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows) mirall/3.4.0stable-Win64 (build 20211129) (Nextcloud, windows-10.0.22000 ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":""} {"reqId":"B4ZfiuQ0fQ8lO3MvUCpT","level":2,"time":"2022-02-18T21:55:17+00:00","remoteAddr":"192.168.2.104","user":"--","app":"no app in context","method":"PROPFIND","url":"/index.php","message":"Could not detect any host in https:///data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows) mirall/3.4.0stable-Win64 (build 20211129) (Nextcloud, windows-10.0.22000 ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":""} {"reqId":"tMzvXYaFz0fU5EQ39MHd","level":2,"time":"2022-02-18T21:55:54+00:00","remoteAddr":"192.168.2.104","user":"--","app":"no app in context","method":"POST","url":"/index.php","message":"Could not detect any host in http:///data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.45 Safari/537.36","version":""} {"reqId":"tMzvXYaFz0fU5EQ39MHd","level":2,"time":"2022-02-18T21:55:54+00:00","remoteAddr":"192.168.2.104","user":"--","app":"no app in context","method":"POST","url":"/index.php","message":"Could not detect any host in https:///data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.45 Safari/537.36","version":""} {"reqId":"7TpwVmnj9dltQhIF0ZNh","level":2,"time":"2022-02-18T22:28:37+00:00","remoteAddr":"192.168.2.104","user":"--","app":"no app in context","method":"GET","url":"/index.php","message":"Could not detect any host in http:///data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.45 Safari/537.36","version":""} {"reqId":"7TpwVmnj9dltQhIF0ZNh","level":2,"time":"2022-02-18T22:28:37+00:00","remoteAddr":"192.168.2.104","user":"--","app":"no app in context","method":"GET","url":"/index.php","message":"Could not detect any host in https:///data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.45 Safari/537.36","version":""} ```
pmarkoulidakis commented 1 year ago

Is pdblib load on php cli? whats the output of php -m

Nomcon commented 1 year ago

Is pdblib load on php cli? whats the output of php -m

Here is the output of php -m

[PHP Modules]
apc
apcu
bcmath
bz2
calendar
Core
ctype
curl
date
dom
exif
FFI
fileinfo
filter
ftp
gd
gettext
gmp
gnupg
hash
iconv
imagick
intl
json
libxml
mbstring
mysqlnd
openssl
pcntl
pcre
pdlib
PDO
pdo_mysql
Phar
posix
readline
Reflection
session
shmop
SimpleXML
sockets
sodium
SPL
standard
sysvmsg
sysvsem
sysvshm
tokenizer
xml
xmlreader
xmlwriter
xsl
Zend OPcache
zip
zlib

[Zend Modules]
Zend OPcache

I guess bc its in that list, its loaded?

cyberpower678 commented 1 year ago

Having the same issues here but also with bzip2 library. Both are installed and showing under modules.

matiasdelellis commented 1 year ago

Hi @Nomcon @pmarkoulidakis @cyberpower678

Please, check the php configuration. Debian and Ubuntu split the cli and server configuration, and probably are enabled in the cli, but not on the server..

See: https://github.com/matiasdelellis/facerecognition/wiki/PDlib-Installation#pdlib-configuration

In my case.

matias@ecap:/tmp$ ls /etc/php/*/*/conf.d/20-pdlib.ini 
/etc/php/7.4/apache2/conf.d/20-pdlib.ini  /etc/php/7.4/cli/conf.d/20-pdlib.ini  /etc/php/7.4/fpm/conf.d/20-pdlib.ini

And all files are the same (usually just links)

matias@ecap:/tmp$ cat /etc/php/7.4/fpm/conf.d/20-pdlib.ini
extension=pdlib.so
cyberpower678 commented 1 year ago

It's all running on the same ini from what I gather.

A workaround is by simply installing it from the command line with php occ app:install facerecognition. If it doesn't enable automatically, you can then run php occ app:enable facerecognition. The PHP CLI will definitely get past the validation and successfully enable the app. Worked for me at least.

Nomcon commented 1 year ago

@matiasdelellis first of all, thanks for looking into my issue.

In the process of folIowing your install-guide I added the lines

[pdlib]
extension="pdlib.so"

to the top of my php.ini files as describes in https://github.com/matiasdelellis/facerecognition/wiki/PDlib-Installation#pdlib-configuration

However, /etc/php/7.4/apache2/conf.d/20-pdlib.ini doesnt exists on my system. My /etc/php/7.4/cli/conf.d/20-pdlib.ini and /etc/php/7.4/fpm/conf.d/20-pdlib.ini are both links to /etc/php/7.4/mods-avalible/20-pdlib.ini which includes extension=pdlib.so as the only un-commented line.

Since youre saying the latter three should be the same I copied /etc/php/7.4/cli/conf.d/20-pdlib.ini into /etc/php/7.4/apache2/conf.d/. This fixed the problem, i can now finally continue with the setup. Thanks alot ^^