-
Notifications
You must be signed in to change notification settings - Fork 447
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
404 after framework upgrade #1084
Comments
Looks like a malformed rewrite rule. The |
You came from 3.6.2 or an older version @v2k ? AFAIK there were no path mechanics adjusted recently. 🤔 |
The working version was: 3.5.0-Release I'm using nginx.
|
Same problem here : fossar/selfoss#1025 Solution was to explicitly set the 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 rss.example.com; # or $host
} @ikkez I think you should handle that automatically. If |
I managed to reproduce this with 3.6.3 and 3.6.2 (see the selfoss issue), it works with 3.6.1. |
Ok then, here's the diff between Something must have changed... Similar issues: |
Hmmm the only change related to HTTP variables is: $_SERVER['REQUEST_URI']=$uri['path'].
(isset($uri['query'])?'?'.$uri['query']:'').
(isset($uri['fragment'])?'#'.$uri['fragment']:''); That should not affect |
bisecting confirms it started in f3-factory/fatfree-core@4d70bb4 Edit: Traceback points to https://github.com/bcosca/fatfree-core/blob/3.6.3/base.php#L1660:
|
Thanks for the investigation @jtojnar The reasoning behind that commit can be found in the discussion at f3-factory/fatfree-core@575cfda Can you dump the value of |
@xfra35 Sorry, this is the right one: array(26) {
["HTTP_ACCEPT"]=>
string(3) "*/*"
["HTTP_USER_AGENT"]=>
string(11) "curl/7.58.0"
["HTTP_HOST"]=>
string(13) "localhost:900"
["REDIRECT_STATUS"]=>
string(3) "200"
["SERVER_NAME"]=>
string(0) ""
["SERVER_PORT"]=>
string(4) "8888"
["SERVER_ADDR"]=>
string(10) "172.17.0.2"
["REMOTE_PORT"]=>
string(5) "58836"
["REMOTE_ADDR"]=>
string(10) "172.17.0.1"
["SERVER_SOFTWARE"]=>
string(12) "nginx/1.12.2"
["GATEWAY_INTERFACE"]=>
string(7) "CGI/1.1"
["REQUEST_SCHEME"]=>
string(4) "http"
["SERVER_PROTOCOL"]=>
string(8) "HTTP/1.1"
["DOCUMENT_ROOT"]=>
string(8) "/selfoss"
["DOCUMENT_URI"]=>
string(10) "/index.php"
["REQUEST_URI"]=>
string(1) "/"
["SCRIPT_NAME"]=>
string(10) "/index.php"
["CONTENT_LENGTH"]=>
string(0) ""
["CONTENT_TYPE"]=>
string(0) ""
["REQUEST_METHOD"]=>
string(3) "GET"
["QUERY_STRING"]=>
string(0) ""
["SCRIPT_FILENAME"]=>
string(18) "/selfoss/index.php"
["FCGI_ROLE"]=>
string(9) "RESPONDER"
["PHP_SELF"]=>
string(10) "/index.php"
["REQUEST_TIME_FLOAT"]=>
float(1520892074.8389)
["REQUEST_TIME"]=>
int(1520892074)
} |
Ok thanks. Can you try one last thing? |
string(12) "3665e2ad6430" That seems to be the container id: $ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
3665e2ad6430 selfoss "run.sh" 2 minutes ago Up About a minute 0.0.0.0:900->8888/tcp nostalgic_hermann |
Apparently, |
It is |
The framework expects If this variable is not set, the framework falls back to the host name: $_SERVER['SERVER_NAME']=gethostname(); In your case, the variable is set to an empty string, in which case the fallback doesn't apply. Tell me if f3-factory/fatfree-core@8bf3b4c fixes the issue. |
@xfra35 can confirm it works. |
Hi, i writed a controller function to return path on windows directories and files, but after c: read, all return this error: URL: http://localhost/costa/api/v1/dados/dir/c:/windows Error: [C:/desenv/lib/fatfree/3.6.3/base.php:1660] Base->error() function code:
What i have to do, to correct this??? |
Upgraded framework and can't seem to get by this 404; not sure where the extra "/" is coming from. Rolling back the upgrade works fine.
Tried this in index.php:
Also tried adding a
$f3->clear('CACHE');
The text was updated successfully, but these errors were encountered: