PiPass / blockpage

A temporary unblock solution and blockpage for your Pi-Hole system
BSD 3-Clause "New" or "Revised" License
196 stars 14 forks source link

PHP Fatal error when installing v1.3 #4

Closed iroQuai closed 5 years ago

iroQuai commented 5 years ago

Hi there, Trying to install PiPas. I'm not that experienced with Linux, so i'm barely keeping up with the instructions. I think i've managed pretty well, did everything i had to do and came to stap 4: running the install script. All seemed to go well until i got a fatal error: "PHP Fatal error: Uncaught Error: Call to undefined function curl_init() in /home/pi/setup.php:97"

Any idea what went wrong? Can i do anything to install it correctly?

PiPass installer

[ / ] Root user check... [ + ] Root user check complete [ / ] DR check... Please enter your web document root. (e.g. /var/www/) /var/www/html/ [ / ] Is this the correct document root? (/var/www/html/) [y/n] y [ + ] DR check succeeded, now installing PiPass... [ / ] Getting current php user... [ + ] Current php user is pi. [ / ] Building /etc/sudoers line to add... [ / ] Checking if /etc/sudoers is already set up... [ / ] /etc/sudoers is already set up... not performing action. [ / ] Now making sure that your document root folder is clear... [ + ] In document root... downloading files. fatal: remote origin already exists. PHP Fatal error: Uncaught Error: Call to undefined function curl_init() in /home/pi/setup.php:97 Stack trace:

.0 /home/pi/setup.php(107): get_data('https://apps.ro...')

.1 /home/pi/setup.php(48): install()

.2 /home/pi/setup.php(24): preInstall()

.3 {main}

thrown in /home/pi/setup.php on line 97

nightah commented 5 years ago

I'm going to assume you're running the Docker container, you're missing the php-curl library, if you are using the Docker container run a bash shell within the container and execute the following: apt update && apt install php7.0-curl

iprak commented 5 years ago

I am also getting the same and am not using Docker container. My php version is "PHP 7.0.33-0+deb9u3 (cli) (built: Mar 8 2019 10:01:24) ( NTS )"

iroQuai commented 5 years ago

I do not use docker. I thought I didn't had curl installed so I installed and retried. Still the same.

If I put in your line (with sudo) I get the following:

@pihole:~ $ sudo apt update && apt install php7.0-curl Hit:1 http://archive.raspberrypi.org/debian stretch InReleas e Hit:2 http://raspbian.raspberrypi.org/raspbian stretch InRel ease Reading package lists... Done Building dependency tree Reading state information... Done All packages are up to date. E: Could not open lock file /var/lib/dpkg/lock - open (13: P ermission denied) E: Unable to lock the administration directory (/var/lib/dpk g/), are you root?

nightah commented 5 years ago

It needs to be sudo apt update && sudo apt install php7.0-curl

iroQuai commented 5 years ago

Aaaa the second sudo I missed! I'll try

iroQuai commented 5 years ago

It works! Case closed :)