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

removed PHP 5 dependencies and added php7.0-mbstring dependancy #40

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

dotps1
Copy link

@dotps1 dotps1 commented Nov 19, 2017

Removed the php 5.0 dependencies from the install.sh script. I also added the php7.0-mbstring dependency that was being called by the index.php. The missing dependency would cause a 500 error and throw and error in the /var/log/apache2/error.log

PHP Fatal error:  Uncaught Error: Call to undefined function mb_convert_encoding() in /var/www/html/index.php:53\nStack trace:\n#0 /var/www/html/index.php(24): prepareJSON('{"beerName": "S...')\n#1 {main}\n  thrown in /var/www/html/index.php on line 53

This can all be found in issue #39.

dotps1 and others added 3 commits November 19, 2017 10:51
Removed the php5 dependencies that was suggested in BrewPi#39.  The script now runs fine, however, the website is still unavailable after it completes.
There was a missing dependency, `php7.0-mbstring` that was causing the `/index.php` to not display, and throwing an error in the `/var/log/apache2/error.log`:

```
PHP Fatal error:  Uncaught Error: Call to undefined function mb_convert_encoding() in /var/www/html/index.php:53\nStack trace:\n#0 /var/www/html/index.php(24): prepareJSON('{"beerName": "S...')\n#1 {main}\n  thrown in /var/www/html/index.php on line 53
```
@elcojacobs
Copy link
Member

Thanks for the PR :)
I have not had time to test this yet, but will merge this later.

Regarding configobj, it's already installed a few lines down using pip, why is the apt install needed?

@dotps1
Copy link
Author

dotps1 commented Nov 26, 2017

here is the output from running the brewpi.py

pi@brewpi:~ $ sudo -u brewpi python /home/brewpi/brewpi.py
BrewPi requires ConfigObj to run, please install it with 'sudo apt-get install python-configobj
pi@brewpi:~ $ sudo apt-get install python-configobj
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
  python-configobj-doc
The following NEW packages will be installed:
  python-configobj
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
Need to get 35.2 kB of archives.
After this operation, 166 kB of additional disk space will be used.
Get:1 http://mirrors.syringanetworks.net/raspbian/raspbian stretch/main armhf python-configobj all 5.0.6-2 [35.2 kB]
Fetched 35.2 kB in 1s (24.6 kB/s)
Selecting previously unselected package python-configobj.
(Reading database ... 123716 files and directories currently installed.)
Preparing to unpack .../python-configobj_5.0.6-2_all.deb ...
Unpacking python-configobj (5.0.6-2) ...
Setting up python-configobj (5.0.6-2) ...
pi@brewpi:~ $ sudo -u brewpi python /home/brewpi/brewpi.py
BrewPi requires psutil to run, please install it via pip: 'sudo pip install psutil --upgrade
pi@brewpi:~ $ sudo pip install psutil --upgrade
Collecting psutil
  Using cached psutil-5.4.1.tar.gz
Building wheels for collected packages: psutil
  Running setup.py bdist_wheel for psutil ... done
  Stored in directory: /root/.cache/pip/wheels/05/a2/2a/2015d6af91fb5a4cc5bcdfa9699034e2f624fc9cc5acde7ab9
Successfully built psutil
Installing collected packages: psutil
Successfully installed psutil-5.4.1
pi@brewpi:~ $ sudo -u brewpi python /home/brewpi/brewpi.py
 Nov 26 2017 10:10:30   Notification: Script started for beer 'My First BrewPi Run'
 Nov 26 2017 10:10:30   Connecting to controller...
 Nov 26 2017 10:10:30   Opening serial port
 Nov 26 2017 10:10:30   Checking software version on controller...
 Nov 26 2017 10:10:40   Warning: Cannot receive version number from controller. This could be because your controller is not programmed or running a very old version of BrewPi.This script will now exit.
pi@brewpi:~ $

this is a fresh install, so when I run the python script, it appears to be missing both python-configobj and psutil from pip.

@RacerEvan55
Copy link

Has this been merged yet? I'm still getting exactly the same error as in #39

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.

3 participants