Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change php5-cgi to php-cgi #124

Merged
merged 3 commits into from
Nov 16, 2017
Merged

Change php5-cgi to php-cgi #124

merged 3 commits into from
Nov 16, 2017

Conversation

jrmhaig
Copy link
Collaborator

@jrmhaig jrmhaig commented Oct 22, 2017

Debian Stretch (and so also the latest Raspbian) has replaced php5 with php7.0 and so the installer will not work any more. I have changed it to use the generic php-cgi instead so that it will pick up the latest version. Is this the behaviour we want or do we want to fix the version and risk seeing it break again at the next upgrade?

Also, according to https://packages.debian.org/stretch/php-cgi we might want to use php-fpm instead. I do not know enough about the different versions of PHP. What are your thoughts.

@SirLagz
Copy link
Collaborator

SirLagz commented Oct 22, 2017

I've checked my Stretch Pi and both php5-cgi and php7-cgi is still available.
The php-cgi package points to php7.0-cgi.

Not sure where php-cgi points to on Jessie, but if Jessie points to php5-cgi and Stretch points to php7.0-cgi, we might get unexpected behaviour because of the different PHP versions...

@SirLagz
Copy link
Collaborator

SirLagz commented Oct 22, 2017

Looks like Jessie doesn't even have a php-cgi package.
https://packages.debian.org/search?suite=jessie&searchon=names&keywords=php-cgi
So to maintain backwards compatibility with Jessie, we'd need to keep using php5-cgi.

@jrmhaig
Copy link
Collaborator Author

jrmhaig commented Oct 22, 2017

I just created a completely new Stretch Pi with the latest (September) 'lite' Raspbian image and there is no package php5-cgi to install. Do you have extra repositories set up? And are there significant differences between 5 and 7 that will cause problems? I'm afraid I'm not a PHP developer so I don't know how much the versions change.

@SirLagz
Copy link
Collaborator

SirLagz commented Oct 23, 2017

I didn't have any extra Repos. I installed it straight via the script, however Raspbian may have updated package availability between when I installed it and now.
#109 and #118 also reference this issue.

Are we going to keep supporting Jessie with the install script? If so, perhaps we just have some logic in there to install php5-cgi for Jessie and php-cgi for Stretch

@michalfita
Copy link

I faced the same issue today on Raspbian Stretch (9.1):

Package php5-cgi is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'php5-cgi' has no installation candidate
RaspAP Install Error: Unable to install dependencies

@michalfita
Copy link

Update: I changed the script in /tmp/raspap manually to use php-cgi, but the installation fails, and lighttpd doesn't start the AP management app.

@jrmhaig
Copy link
Collaborator Author

jrmhaig commented Oct 28, 2017

I just tried this (OK, so I should have done this before creating the PR - sorry) and I got this:

RaspAP Install: Enabling PHP for lighttpd
Met dependency: fastcgi
Enabling fastcgi-php: ok
Enabling fastcgi: ok
Run "service lighttpd force-reload" to enable changes
RaspAP Install Error: Cannot enable fastcgi-php for lighttpd

I'm just having a look to see what is going on.

@cool2man
Copy link

As long as there is no generic solution available, I changed php5-cgi to php7.0-cgi. Installation and AP runs.

@SirLagz
Copy link
Collaborator

SirLagz commented Oct 31, 2017

@cool2man Thanks for letting us know

@jrmhaig
Copy link
Collaborator Author

jrmhaig commented Oct 31, 2017

I did get the interface working with php7 but encountered other (non-PHP related) problems so I cannot say for certain that there are no incompatibilities.

@billz
Copy link
Member

billz commented Oct 31, 2017

@jrmhaig curious what sort of non-PHP problems you found? If you have logs maybe I can debug.

@jrmhaig
Copy link
Collaborator Author

jrmhaig commented Oct 31, 2017

I didn't get much of a chance to look at it but essentially the wireless access point wouldn't start and failed silently. I was using a Raspberry Pi 2 with a usb wireless adapter.

@SirLagz
Copy link
Collaborator

SirLagz commented Nov 1, 2017

@jrmhaig hostapd will not start if wpa_supplicant is started...Can you check to see if you had the issue while wpa_supplicant was started?

@SirLagz
Copy link
Collaborator

SirLagz commented Nov 4, 2017

Just tested the install script on a Jessie RPi3 and it worked fine, hostapd was started on bootup.
I'll reflash this to a Stretch RPi 3 and have a go at modifying the install script to apply some logic to install on both Jessie and Stretch.

@billz
Copy link
Member

billz commented Nov 16, 2017

Installs cleanly on Stretch, will validate on a fresh install of Jessie shortly... unless someone beats me to it 😉

@SirLagz
Copy link
Collaborator

SirLagz commented Nov 16, 2017

Nice work @billz.

@billz billz merged commit 6e2c6de into master Nov 16, 2017
@billz
Copy link
Member

billz commented Nov 16, 2017

Tested successfully on fresh installs of Jessie & Stretch on an RPi2. Thanks @jrmhaig @michalfita @cool2man @SirLagz for your valuable input.

@billz billz deleted the new-php-pa branch November 16, 2017 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants