Re: PHP-FPM, PHP code in browser
On 10/07/2018 08:04 PM, Benjamin Smith wrote: I've checked all of these to no avail. So I did a firm reset, not only removing RPMs but also deleting any and all stale config files in /etc. Now, after re-installing the RPMs, the default directory (/var/www/html/phpinfo.php) works fine. However, the site config file doesn't work, I get PHP code. Now starting with very basic configs and stepping forward, line by line, until I find the configuration lines that work. I forgot to add an eetsy beetsy detail :/ You need to tell apache *which* files to apply the handler to. (I just got bit by this today) SetHandler "proxy:unix:/var/run/php/php7.2-fpm.sock|fcgi://localhost/" ___ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-le...@lists.fedoraproject.org Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org
Re: PHP-FPM, PHP code in browser
Il giorno lun 8 ott 2018 alle 5:04, Benjamin Smith ha scritto: [...] I have apache/php-fpm running on an ubuntu vm. File layouts are different from fedora but enough is similar that this may help. Again, this is ubuntu... /etc/php/7.2/fpm/php.ini engine = On /etc/php/7.2/pool.d/www.conf listen = /run/php/php7.2-fpm.sock /etc/apache2/apache2.conf SetHandler "proxy:unix:/var/run/php/php7.2-fpm.sock|fcgi://localhost/" These three things are pretty straight forward. Enable the php-fpm engine, Specify where the php-fpm socket is to be created, Tell apache where to find the socket and how to access it On fedora these files may reside elsewhere. Use "locate" and "grep". On Fedora it's named differently. I use the following socket (with Caddy server): /run/php-fpm/www.sock ___ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-le...@lists.fedoraproject.org Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org
Re: PHP-FPM, PHP code in browser
I've checked all of these to no avail. So I did a firm reset, not only removing RPMs but also deleting any and all stale config files in /etc. Now, after re-installing the RPMs, the default directory (/var/www/html/phpinfo.php) works fine. However, the site config file doesn't work, I get PHP code. Now starting with very basic configs and stepping forward, line by line, until I find the configuration lines that work. Thanks On Sun, Oct 7, 2018 at 4:24 PM Mike Wright wrote: > On 10/07/2018 01:09 PM, Benjamin Smith wrote: > > I'm unable to get PHP too actually *run* instead of just downloading the > > PHP sources. Coming from years of experience with Mod PHP wand I know > > that PHP FPM is different. I've confirmed that both RPMs (native FC 27) > > are installed, and that PHP-FPM and Apache are installed. I tried moving > > /etc/https/conf.modules/PHP.conf. I've looked at /etc/https/php.conf and > > read all comments. I've restarted phpfpm and Apache via system ctl. I've > > restarted the system. How do I get Apache to connect to Phpfpm for PHP > > scripts? > > I have apache/php-fpm running on an ubuntu vm. File layouts are > different from fedora but enough is similar that this may help. > > Again, this is ubuntu... > > /etc/php/7.2/fpm/php.ini > > engine = On > > /etc/php/7.2/pool.d/www.conf > > listen = /run/php/php7.2-fpm.sock > > /etc/apache2/apache2.conf > > SetHandler "proxy:unix:/var/run/php/php7.2-fpm.sock|fcgi://localhost/" > > These three things are pretty straight forward. > > Enable the php-fpm engine, > Specify where the php-fpm socket is to be created, > Tell apache where to find the socket and how to access it > > On fedora these files may reside elsewhere. Use "locate" and "grep". > > hth, > :m > ___ > users mailing list -- users@lists.fedoraproject.org > To unsubscribe send an email to users-le...@lists.fedoraproject.org > Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html > List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines > List Archives: > https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org > ___ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-le...@lists.fedoraproject.org Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org
Re: PHP-FPM, PHP code in browser
On 10/07/2018 01:09 PM, Benjamin Smith wrote: I'm unable to get PHP too actually *run* instead of just downloading the PHP sources. Coming from years of experience with Mod PHP wand I know that PHP FPM is different. I've confirmed that both RPMs (native FC 27) are installed, and that PHP-FPM and Apache are installed. I tried moving /etc/https/conf.modules/PHP.conf. I've looked at /etc/https/php.conf and read all comments. I've restarted phpfpm and Apache via system ctl. I've restarted the system. How do I get Apache to connect to Phpfpm for PHP scripts? I have apache/php-fpm running on an ubuntu vm. File layouts are different from fedora but enough is similar that this may help. Again, this is ubuntu... /etc/php/7.2/fpm/php.ini engine = On /etc/php/7.2/pool.d/www.conf listen = /run/php/php7.2-fpm.sock /etc/apache2/apache2.conf SetHandler "proxy:unix:/var/run/php/php7.2-fpm.sock|fcgi://localhost/" These three things are pretty straight forward. Enable the php-fpm engine, Specify where the php-fpm socket is to be created, Tell apache where to find the socket and how to access it On fedora these files may reside elsewhere. Use "locate" and "grep". hth, :m ___ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-le...@lists.fedoraproject.org Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org
Re: PHP-FPM, PHP code in browser
I found thisdunno if it will help? https://stackoverflow.com/questions/15023540/how-to-determine-which-script-is-being-executed-in-php-fpm-process#15029578 Sorry if this posts in the wrong positionI'm sending from my phone while out and about! EGO II On Sun, Oct 7, 2018, 4:10 PM Benjamin Smith wrote: > I'm unable to get PHP too actually *run* instead of just downloading the > PHP sources. Coming from years of experience with Mod PHP wand I know that > PHP FPM is different. I've confirmed that both RPMs (native FC 27) are > installed, and that PHP-FPM and Apache are installed. I tried moving > /etc/https/conf.modules/PHP.conf. I've looked at /etc/https/php.conf and > read all comments. I've restarted phpfpm and Apache via system ctl. I've > restarted the system. How do I get Apache to connect to Phpfpm for PHP > scripts? > ___ > users mailing list -- users@lists.fedoraproject.org > To unsubscribe send an email to users-le...@lists.fedoraproject.org > Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html > List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines > List Archives: > https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org > ___ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-le...@lists.fedoraproject.org Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org
PHP-FPM, PHP code in browser
I'm unable to get PHP too actually *run* instead of just downloading the PHP sources. Coming from years of experience with Mod PHP wand I know that PHP FPM is different. I've confirmed that both RPMs (native FC 27) are installed, and that PHP-FPM and Apache are installed. I tried moving /etc/https/conf.modules/PHP.conf. I've looked at /etc/https/php.conf and read all comments. I've restarted phpfpm and Apache via system ctl. I've restarted the system. How do I get Apache to connect to Phpfpm for PHP scripts? ___ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-le...@lists.fedoraproject.org Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org