Open davidak opened 4 years ago
@davidak I'm not a maintainer of this nor listed as one. I think you might have the wrong person.
@aanderse yes, but you edited the module before, so i hoped that you can help here.
Note:
this does not help:
"php_admin_value[upload_tmp_dir]" = "${stateDir}/tmp";
"php_admin_value[soap.wsdl_cache_dir]" = "${stateDir}/tmp";
"php_admin_value[opcache.lockfile_path]" = "${stateDir}/tmp";
i still get the error:
An error occurred uploading your file. This may be caused by incorrect permissions for the application /tmp folder.
there is no single /tmp
in phpinfo anymore...
where the hell does /tmp
come from???
adding /tmp
to this makes no difference:
systemd.tmpfiles.rules = [
"d /tmp 0777 ${user} ${group} - -"
"d ${stateDir} 0750 ${user} ${group} - -"
"d ${stateDir}/tmp 0750 ${user} ${group} - -"
];
another idea was that they might use sys_get_temp_dir()
, so i set it
"php_admin_value[sys_temp_dir]" = "${stateDir}/tmp";
again same error
i updated to the latest minor version (3.23.0+200813), but it does not solve the problem
OK, going deeper. from watching PHP with strace, i think with /tmp
they actualy mean /var/lib/limesurvey/tmp
lstat("/var/lib/limesurvey/tmp", {st_mode=S_IFDIR|0750, st_size=4096, ...}) = 0
lstat("/var/lib/limesurvey", {st_mode=S_IFDIR|0750, st_size=4096, ...}) = 0
lstat("/var/lib", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/var", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
getpid() = 922
openat(AT_FDCWD, "/var/lib/limesurvey/tmp/phpRRkKES", O_RDWR|O_CREAT|O_EXCL, 0600) = 5
does it want to write in the nix store?
rename("/var/lib/limesurvey/tmp/phpNTxFfU", "/nix/store/gdv8nq1bjqm2gqa798xs7iysy656zd61-limesurvey-3.23.0+200813/share/limesurvey/upload/themes/survey/generalfiles/EfnxmnFXsAYPznq.jpeg") = -1 EXDEV (Invalid cross-device link)
stat("/var/lib/limesurvey/tmp/phpNTxFfU", {st_mode=S_IFREG|0600, st_size=1585118, ...}) = 0
lstat("/nix/store/gdv8nq1bjqm2gqa798xs7iysy656zd61-limesurvey-3.23.0+200813/share/limesurvey/upload/themes/survey/generalfiles/EfnxmnFXsAYPznq.jpeg", 0x7ffe086587d0) = -1 ENOENT (No such file or directory)
Here a full trace: https://gist.github.com/davidak/aca78ba4ab6c64beb4092619b401e9bc
Filename was SparenGoldPK_Header_tablet_970x340.jpg
@offlinehacker can you continue? i don't know how to fix this.
We would like to use limesurvey for NixCon and the next NixOS release.
@davidak is there a real possibility you'll be using limesurvey
on httpd
for NixCon, or just an idea to do so? Who is hosting this instance of httpd
? Does anyone have any training on building surveys with limesurvey
(or time/motivation to learn it)?
@aanderse i'm working on a community survey with the marketing team the last weeks. that's why one of the nixcon organizers asked me if we have an instance ready to host their survey too. i don't have yet and hoped to be able to fix this. but it would still be OK without or just hack in the nixos logo. the alternative is to use paid hosting, but i would find it kind of embarrassing if nixos is not able to host a basic php app
i'm not a fan of httpd (aka apache2) and i guess nginx is now the preferred webserver for nixos modules, but it should be ok for the time the survey runs
The easiest and quickest course of action may be to configure a NixOS server with nginx
, php-fpm
, and mariadb
then imperatively install limesurvey
as a regular php
web application - if you're under time constraints.
After for banging my head on this for a few minutes I'm left to believe this may be a bug upstream. To validate it would be easiest to imperatively install and run through the source code. Something like this may be the culprit...
I marked this as stale due to inactivity. → More info
Has anyone figured out a workaround or a fix for this? I can't import a survey.
Describe the bug
An image upload fails with:
To Reproduce Steps to reproduce the behavior:
nixos-container start foo
nixos-container show-ip foo
http://<IP>/admin
and login withadmin/password
Expected behavior image upload works
Screenshots
Notify maintainers
Metadata
"x86_64-linux"
Linux 5.4.35, NixOS, 20.03.1577.74a80c5a9ab (Markhor)
yes
yes
nix-env (Nix) 2.3.4
"nixos-20.03.1577.74a80c5a9ab"
/nix/var/nix/profiles/per-user/root/channels/nixos
Maintainer information: