-
Notifications
You must be signed in to change notification settings - Fork 345
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
PHP message: HTTP 404 (GET ) PHP message: [index.php:80] Base->run() #1025
Comments
Can confirm this, i get the same message. |
Weird, the only thing I recall regarding routing was
but that should only affect Sorry, I am not very familiar with docker. Do you have a list of commands I can run to build and spin up the container including changing the version? |
Sure, change ARG VERSION=2.18
ARG SHA256_HASH="0b3d46b0b25170f99e3e29c9fc6a2e5235b0449fecbdad902583c919724aa6ed" And in the same folder, build the docker image and then run it : docker build -t selfoss .
docker run -d --name selfoss -p 80:8888 -v /mnt/docker/selfoss:/selfoss/data selfoss
# Check http://127.0.0.1:80
# use the following command to open a shell in the container :
docker exec -ti selfoss sh
> tail -f /tmp/ngx_error.log
2018/03/10 11:58:45 [error] 25#25: *1 FastCGI sent in stderr: "PHP message: HTTP 404 (GET )
PHP message: [index.php:80] Base->run()" while reading response header from upstream, client: 172.17.0.1, server: , request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/tmp/php-fpm.sock:", host: "127.0.0.1" |
Maybe it is this bug. Not sure what could be causing it, though. For the record, selfoss 2.17 uses fatfree 3.6.0, selfoss 2.18 upgraded to 3.6.3. |
Or this : bcosca/fatfree#1060 The current nginx configuration causes fatfree (>= 3.6.2) routing to fail. @jtojnar can you share your $_SERVER variables ?
|
Adding
|
location ~* \.php$ {
try_files $uri =404;
include /etc/nginx/fastcgi_params;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SERVER_NAME localhost;
} Solution was to explicitly set the SERVER_NAME variable in my vhost conf. With docker, SERVER_NAME is of course equal to fatfree developers should handle this automatically if SERVER_NAME isn't defined. |
Will that work with domain names other than localhost? |
Yes, for people who do not use docker, location ~* \.php$ {
[...]
fastcgi_param SERVER_NAME $host;
} |
Ok, can confirm this is fatfree regression. It works with 3.6.0: FROM alpine:3.7
LABEL description "Multipurpose rss reader, live stream, mashup, aggregation web application" \
maintainer="Hardware <[email protected]>"
ARG VERSION=2.18
ENV GID=991 UID=991 CRON_PERIOD=15m
RUN echo "@community http://nl.alpinelinux.org/alpine/v3.7/community" >> /etc/apk/repositories \
&& apk -U upgrade \
&& apk add -t build-dependencies \
wget \
git \
nodejs \
curl \
openssl \
php7-phar@community \
&& apk add \
musl \
nginx \
s6 \
su-exec \
libwebp \
ca-certificates \
php7@community \
php7-fpm@community \
php7-gd@community \
php7-json@community \
php7-zlib@community \
php7-xml@community \
php7-dom@community \
php7-curl@community \
php7-iconv@community \
php7-mcrypt@community \
php7-pdo_mysql@community \
php7-pdo_pgsql@community \
php7-pdo_sqlite@community \
php7-ctype@community \
php7-session@community \
php7-mbstring@community \
tini@community \
&& git clone https://github.com/SSilence/selfoss.git /selfoss \
&& (cd /selfoss; git checkout 2.18) \
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
&& chmod +x /usr/local/bin/composer \
&& (cd /selfoss/public; npm install) \
&& (cd /selfoss; composer require bcosca/fatfree-core=3.6.0) \
&& (cd /selfoss; composer install) \
&& sed -i -e 's/base_url=/base_url=\//g' /selfoss/defaults.ini \
&& apk del build-dependencies \
&& rm /usr/local/bin/composer \
&& rm -rf /var/cache/apk/* /tmp/*
COPY rootfs /
RUN chmod +x /usr/local/bin/run.sh /services/*/run /services/.s6-svscan/*
VOLUME /selfoss/data
EXPOSE 8888
CMD ["run.sh"] |
I have bisected it further and it was caused by f3-factory/fatfree-core@4d70bb4 ~/selfoss-docker/DockerfileFROM alpine:3.7
LABEL description "Multipurpose rss reader, live stream, mashup, aggregation web application" \
maintainer="Hardware <[email protected]>"
ARG VERSION=2.18
ENV GID=991 UID=991 CRON_PERIOD=15m
RUN echo "@community http://nl.alpinelinux.org/alpine/v3.7/community" >> /etc/apk/repositories \
&& apk -U upgrade \
&& apk add -t build-dependencies \
wget \
git \
nodejs \
curl \
openssl \
php7-phar@community \
&& apk add \
musl \
nginx \
s6 \
su-exec \
libwebp \
ca-certificates \
php7@community \
php7-fpm@community \
php7-gd@community \
php7-json@community \
php7-zlib@community \
php7-xml@community \
php7-dom@community \
php7-curl@community \
php7-iconv@community \
php7-mcrypt@community \
php7-pdo_mysql@community \
php7-pdo_pgsql@community \
php7-pdo_sqlite@community \
php7-ctype@community \
php7-session@community \
php7-mbstring@community \
tini@community \
&& git clone https://github.com/SSilence/selfoss.git /selfoss \
&& (cd /selfoss; git checkout 2.18) \
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
&& chmod +x /usr/local/bin/composer \
&& composer config --global --auth github-oauth.github.com f27a8a7aa6c0e1deccb4e01022bfc9d84322e481 \
&& (cd /selfoss/public; npm install) \
&& (cd /selfoss; composer update)
RUN sed -i 's~"type": "project",~"type": "project", "repositories": [{"type": "vcs", "url": "https://github.com/bcosca/fatfree-core"}],~' /selfoss/composer.json \
&& sed -i 's~"^3.6"~"dev-master#2a2463f7f56baebe782958a652e757f6bbbb4264"~' /selfoss/composer.json \
&& (cd /selfoss; composer update) \
&& sed -i -e 's/base_url=/base_url=\//g' /selfoss/defaults.ini \
&& apk del build-dependencies \
&& rm /usr/local/bin/composer \
&& rm -rf /var/cache/apk/* /tmp/*
COPY rootfs /
RUN chmod +x /usr/local/bin/run.sh /services/*/run /services/.s6-svscan/*
VOLUME /selfoss/data
EXPOSE 8888
CMD ["run.sh"] ~/fatfree-core/bisect.sh#!/usr/bin/env bash
commit=$(git rev-parse HEAD)
echo "****************" $commit
pushd ~/selfoss-docker
sed -i "s/dev-master#[a-f0-9]\+/dev-master#$commit/" Dockerfile
docker build -t selfoss .
docker run -d -p 900:8888 -v /mnt/docker/selfoss:/selfoss/data selfoss
popd
failed=0
sleep 60
curl http://localhost:900 | grep "error occured" && failed=1
docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)
exit $failed $ git clone https://github.com/bcosca/fatfree-core.git
$ cd fatfree-core
$ git bisect start 3.6.2 3.6.1
Bisecting: 29 revisions left to test after this (roughly 5 steps)
[d2ebc80d31984bf84cf6ed2aed1d6fe05f7577aa] Assemble URL after ONREROUTE
$ bisect run ./bisect.sh
[...]
4d70bb4c6a1c30ecefc499a86dcaf54d3edc13fd is the first bad commit
commit 4d70bb4c6a1c30ecefc499a86dcaf54d3edc13fd
Author: xfra35 <[email protected]>
Date: Wed Apr 5 23:26:43 2017 +0200
Patched $_SERVER['REQUEST_URI'] to ensure it contains a relative URI.
It could otherwise contain an absolute form (scheme+domain) in very
specific cases. Cf. https://tools.ietf.org/html/rfc2616#section-5.1.2
:100644 100644 13f5ec2ac0486661ebf2e46c097e53c4554a4c57 72501b6f3a5de558b9260d62a9bd67bba3ab8202 M base.php
bisect run success
|
This was fixed in fatfree 3.6.4 to which we switched in a1f7112. |
Hi everyone,
I tried to update selfoss to version 2.18 but nginx report an error from php-fpm :
PHP message: HTTP 404 (GET ) PHP message: [index.php:80] Base->run()
I do not understand this error... it should work with my current setup.
Here my nginx configuration : https://github.com/hardware/selfoss/blob/master/rootfs/etc/nginx/nginx.conf
To reproduce this problem, you can build my docker image with selfoss 2.18 and look nginx logs with
docker exec -ti selfoss tail -f /tmp/ngx_error.log
I use this docker image since selfoss 2.16 without any problem.
Any ideas ?
The text was updated successfully, but these errors were encountered: