Re: nginx + php = system() not working?

2024-05-25 Thread Noth
On 25/05/2024 17:51, F Bax wrote: I tried a few things with nginx not in chroot; but got permission errors. The message provided no clue as to which file/directory might be causing it; so eventually I gave up. After some brainstorming; we decided to run inside chroot; use php functions other th

Re: nginx + php = system() not working?

2024-05-25 Thread F Bax
I tried a few things with nginx not in chroot; but got permission errors. The message provided no clue as to which file/directory might be causing it; so eventually I gave up. After some brainstorming; we decided to run inside chroot; use php functions other than system() and use a cron job to do t

Re: nginx + php = system() not working?

2024-05-18 Thread Stuart Henderson
On 2024-05-17, Martijn van Duren wrote: > On Thu, 2024-05-16 at 21:58 -0400, F Bax wrote: >> I think I missed something simple? I installed 7.5 release in a VM. I then >> installed nginx and PHP 8.3.3; with pkg_add. I then ran these two commands: >> # rcctl enable php83_fpm >> # rcctl start php83

Re: nginx + php = system() not working?

2024-05-17 Thread Dan
"Souji Thenria" wrote: > Another issue might be that nginx is still running as www and doesn't > have access to /home/Testing. As per above suggestion double check that the user by which you run nginx (usually www) has access almost by the group to to the prefix directory declared by the -p fl

Re: nginx + php = system() not working?

2024-05-17 Thread Souji Thenria
On Fri May 17, 2024 at 2:56 PM BST, F Bax wrote: In /etc/rc.conf.local - I changed nginx_flags="-u -p /home/Testing" (home directory of a real user). reboot system and now browser is refused connection This site can’t be reached 192.168.1.131 refused to connect. Neither /var/www/logs/{access|erro

Re: nginx + php = system() not working?

2024-05-17 Thread Martijn van Duren
On Thu, 2024-05-16 at 21:58 -0400, F Bax wrote: > I think I missed something simple? I installed 7.5 release in a VM. I then > installed nginx and PHP 8.3.3; with pkg_add. I then ran these two commands: > # rcctl enable php83_fpm > # rcctl start php83_fpm > I found an issue with php system() funct

Re: nginx + php = system() not working?

2024-05-17 Thread F Bax
Thanks for the tips and security warnings Mike, Souji and Dan, In php-fpm.conf - I changed "; chroot = /var/www" to comment. In /etc/rc.conf.local - I changed nginx_flags="-u -p /home/Testing" (home directory of a real user). reboot system and now browser is refused connection This site can’t be re

Re: nginx + php = system() not working?

2024-05-17 Thread Dan
It can even help to run nginx in "unsecure mode" if you want to stay not chrooted: nginx_flags="-u -p /home/mytests" man nginx ; while php-fpm.conf should remain with the default values ; in this case.. -dan Mike Fischer wrote: > > > Am 17.05.2024 um 03:58 schrieb F Bax : > > > > I t

Re: nginx + php = system() not working?

2024-05-17 Thread Dan
May 17, 2024 11:30:25 Souji Thenria : > -u   By default nginx will chroot(2) to the home > directory of the user running the daemon, typically > "www", or to the home directory of user in > nginx.conf.  The -u option di

Re: nginx + php = system() not working?

2024-05-17 Thread Souji Thenria
On Fri May 17, 2024 at 4:38 AM BST, Mike Fischer wrote: OpenBSD httpd would be a different situation because it runs in a chroot(2) environment by default. You can’t call on a PHP-FPM process that is not also running in the chroot(2) environment. The communication between httpd(8) and PHP-FPM fai

Re: nginx + php = system() not working?

2024-05-16 Thread Mike Fischer
> Am 17.05.2024 um 03:58 schrieb F Bax : > > I think I missed something simple? I installed 7.5 release in a VM. I then > installed nginx and PHP 8.3.3; with pkg_add. I then ran these two commands: > # rcctl enable php83_fpm > # rcctl start php83_fpm > I found an issue with php system() functio

nginx + php = system() not working?

2024-05-16 Thread F Bax
I think I missed something simple? I installed 7.5 release in a VM. I then installed nginx and PHP 8.3.3; with pkg_add. I then ran these two commands: # rcctl enable php83_fpm # rcctl start php83_fpm I found an issue with php system() function; so created this simple script which produces "HiThere"