Closed b3wii closed 5 years ago
I have apache2 running, build and installed php7 cli and fpm. When i open a php page apache renders the code as text. How do i tell apache to use the newly installed php7? I'm on Wheezy btw.
Same issue here, using Debian 7 Wheezy. Did you, or anyone, ever resolve this?
@b3wii, @Ken-vdE See #9 and #49 for links and suggestions.
@b3wii, @Ken-vdE See #9 and #49 for links and suggestions.
Unfortunately not, everything seems installed and working... I've restarted all the important services and apache2 is still serving out php files as plain text. I already checked if I was using <?php instead of <?. Furthermore I am able to php -v, everything should work, it just doesn't...
apache2 is still serving out php files as plain text
It probably means that Apache isn't passing the file through the FPM processing.
Did you adjust the listen
directive in /usr/local/php7/etc/php-fpm.d/www.conf
to use an FPM socket listen = /run/php/php-fpm.sock
instead of a network port per this comment?
apache2 is still serving out php files as plain text
It probably means that Apache isn't passing the file through the FPM processing.
Did you adjust the
listen
directive in/usr/local/php7/etc/php-fpm.d/www.conf
to use an FPM socketlisten = /run/php/php-fpm.sock
instead of a network port per this comment?
I did now, it does not seem to work. If you want to reproduce the issue you can take the following steps:
vagrant box add debian/wheezy64
in consolevagrant init debian/wheezy64
in a folder with a php fileset the Vagrantfile to contain
config.vm.box = "debian/wheezy64"
config.vm.network "forwarded_port", guest: 80, host: 8080
config.vm.provision "shell", inline: <<-SHELL
set -x
# use the google dns because of error when resolving domain security.debian.org
echo -e "domain nice.lan\nsearch nice.lan\nnameserver 8.8.8.8\nnameserver 8.8.4.4\nnamerserver 10.0.2.3" > /etc/resolv.conf
apt-get install -y git apache2 curl
cd /tmp
git clone https://github.com/kasparsd/php-7-debian.git
cd php-7-debian/
./build.sh
./install.sh
apt-get -y update && apt-get -y upgrade if ! [ -L /var/www ]; then rm -rf /var/www ln -fs /vagrant /var/www fi SHELL
localhost:8080
or localhost:8080/your-php-file.php
and it serves the php content as plain text
I have apache2 running, build and installed php7 cli and fpm. When i open a php page apache renders the code as text. How do i tell apache to use the newly installed php7? I'm on Wheezy btw.