Open keneohiaeri opened 6 years ago
What php version do you have on the shared environment?
PHP 5.6.x |
---|
I activated config settings to true, and clicked the DEBUG link, below is the full error:
@keneohiaeri Could you share the content of your composer.json
file ? It looks like it's not using the expected JSON format
{
"name": "flarum/flarum",
"description": "Delightfully simple forum software.",
"type": "project",
"keywords": ["forum", "discussion"],
"homepage": "http://flarum.org",
"license": "MIT",
"authors": [
{
"name": "Toby Zerner",
"email": "toby.zerner@gmail.com"
},
{
"name": "Franz Liedke",
"email": "franz@develophp.org"
}
],
"support": {
"issues": "https://github.com/flarum/core/issues",
"source": "https://github.com/flarum/flarum",
"docs": "http://flarum.org/docs"
},
"require": {
"flarum/core": "^0.1.0",
"flarum/flarum-ext-akismet": "^0.1.0",
"flarum/flarum-ext-approval": "^0.1.0",
"flarum/flarum-ext-auth-facebook": "^0.1.0",
"flarum/flarum-ext-auth-github": "^0.1.0",
"flarum/flarum-ext-auth-twitter": "^0.1.0",
"flarum/flarum-ext-bbcode": "^0.1.0",
"flarum/flarum-ext-emoji": "^0.1.0",
"flarum/flarum-ext-english": "^0.1.0",
"flarum/flarum-ext-flags": "^0.1.0",
"flarum/flarum-ext-likes": "^0.1.0",
"flarum/flarum-ext-lock": "^0.1.0",
"flarum/flarum-ext-markdown": "^0.1.0",
"flarum/flarum-ext-mentions": "^0.1.0",
"flarum/flarum-ext-pusher": "^0.1.0",
"flarum/flarum-ext-sticky": "^0.1.0",
"flarum/flarum-ext-subscriptions": "^0.1.0",
"flarum/flarum-ext-suspend": "^0.1.0",
"flarum/flarum-ext-tags": "^0.1.0",
"flagrow/bazaar": "^0.2.0"
},
"require-dev": {
"franzl/studio": "^0.11.0"
},
"config": {
"preferred-install": "dist"
},
"minimum-stability": "beta",
"prefer-stable": true
}
I found another composer.json file within the vendor folder:
{
"name": "composer/composer",
"description": "Composer helps you declare, manage and install dependencies of PHP projects, ensuring you have the right stack everywhere.",
"keywords": ["package", "dependency", "autoload"],
"homepage": "https://getcomposer.org/",
"type": "library",
"license": "MIT",
"authors": [
{
"name": "Nils Adermann",
"email": "naderman@naderman.de",
"homepage": "http://www.naderman.de"
},
{
"name": "Jordi Boggiano",
"email": "j.boggiano@seld.be",
"homepage": "http://seld.be"
}
],
"support": {
"irc": "irc://irc.freenode.org/composer",
"issues": "https://github.com/composer/composer/issues"
},
"require": {
"php": "^5.3.2 || ^7.0",
"justinrainbow/json-schema": "^3.0 || ^4.0 || ^5.0",
"composer/ca-bundle": "^1.0",
"composer/semver": "^1.0",
"composer/spdx-licenses": "^1.0",
"seld/jsonlint": "^1.4",
"symfony/console": "^2.7 || ^3.0",
"symfony/finder": "^2.7 || ^3.0",
"symfony/process": "^2.7 || ^3.0",
"symfony/filesystem": "^2.7 || ^3.0",
"seld/phar-utils": "^1.0",
"seld/cli-prompt": "^1.0",
"psr/log": "^1.0"
},
"require-dev": {
"phpunit/phpunit": "^4.5 || ^5.0.5",
"phpunit/phpunit-mock-objects": "^2.3 || ^3.0"
},
"config": {
"platform": {
"php": "5.3.9"
}
},
"suggest": {
"ext-zip": "Enabling the zip extension allows you to unzip archives",
"ext-zlib": "Allow gzip compression of HTTP requests",
"ext-openssl": "Enabling the openssl extension allows you to access https URLs for repositories and packages"
},
"autoload": {
"psr-4": { "Composer\\": "src/Composer" }
},
"autoload-dev": {
"psr-4": { "Composer\\Test\\": "tests/Composer/Test" }
},
"bin": ["bin/composer"],
"extra": {
"branch-alias": {
"dev-master": "1.5-dev"
}
},
"scripts": {
"test": "phpunit"
}
}
Thanks. The first one was the one I was thinking of.
But I can't see anything wrong that would trigger this error... Maybe @luceos will have other leads
Hint: you can use three backticks (```) before and after your code to keep its format (I reformatted your post above already for readability)
Oh ok. I've done the same to the second code block Thank you
Honestly I have no clue @clarkwinkelmann because the error in the log has no trace. This, by itself, is very, very odd already.
@keneohiaeri can you copy the output of ls -la
in the flarum installation path and tell us under which user Flarum is running?
Please how do I get the "ls-la" output?
Wooops sorry forgot to follow up with this issue. Are you still experiencing it @keneohiaeri ?
The ls -la
command is supposed to be run inside a shell (SSH) on Linux and will show folders and the related permissions.
However I just noticed you're running a Windows/IIS server, so this command is irrelevant I guess. @luceos could this be because we use some hardcoded Linux path separators and we're trying to read a non-existend or non-json file ?
That might well be the case, we'd have to check that.
Steps to reproduce
Expected behaviour
The extension, "Share Facebook" should install sucessfully
Actual behaviour
I get a "500 Internal Server Error" with an output "'The json file must be an object ({})'"
Configuration
Operating system:Microsoft-IIS/8.5
Version of Bazaar: 0.2.4 Version of Flarum: 0.1.0 -beta7 Other extensions: Flarum default extensions
**Logs**:
``` #32 {main} [2017-10-25 12:35:49] production.ERROR: The json file must be an object ({}) [2017-10-25 12:36:28] production.DEBUG: exception 'Flarum\Http\Exception\RouteNotFoundException' in H:\root\home\eugy45-001\www\mcc\vendor\flarum\core\src\Http\Middleware\DispatchRoute.php:62 Stack trace: #0 H:\root\home\eugy45-001\www\mcc\vendor\zendframework\zend-stratigility\src\Dispatch.php(212): Flarum\Http\Middleware\DispatchRoute->__invoke(Object(Zend\Stratigility\Http\Request), Object(Zend\Stratigility\Http\Response), Object(Zend\Stratigility\Next)) #1 H:\root\home\eugy45-001\www\mcc\vendor\zendframework\zend-stratigility\src\Dispatch.php(88): Zend\Stratigility\Dispatch->dispatchCallableMiddleware(Object(Flarum\Http\Middleware\DispatchRoute), Object(Zend\Stratigility\Next), Object(Zend\Stratigility\Http\Request), Object(Zend\Stratigility\Http\Response), NULL) #2 H:\root\home\eugy45-001\www\mcc\vendor\zendframework\zend-stratigility\src\Next.php(160): Zend\Stratigility\Dispatch->__invoke(Object(Zend\Stratigility\Route), NULL, Object(Zend\Stratigility\Http\Request), Object(Zend\Stratigility\Http\Response), Object(Zend\Stratigility\Next)) #3 H:\root\home\eugy45-001\www\mcc\vendor\flarum\core\src\Http\Middleware\SetLocale.php(51): Zend\Stratigility\Next->__invoke(Object(Zend\Stratigility\Http\Request), Object(Zend\Stratigility\Http\Response)) #4 H:\root\home\eugy45-001\www\mcc\vendor\zendframework\zend-stratigility\src\Dispatch.php(212): Flarum\Http\Middleware\SetLocale->__invoke(Object(Zend\Stratigility\Http\Request), Object(Zend\Stratigility\Http\Response), Object(Zend\Stratigility\Next)) #5 H:\root\home\eugy45-001\www\mcc\vendor\zendframework\zend-stratigility\src\Dispatch.php(88): Zend\Stratigility\Dispatch->dispatchCallableMiddleware(Object(Flarum\Http\Middleware\SetLocale), Object(Zend\Stratigility\Next), Object(Zend\Stratigility\Http\Request), Object(Zend\Stratigility\Http\Response), NULL) #6 H:\root\home\eugy45-001\www\mcc\vendor\zendframework\zend-stratigility\src\Next.php(160): Zend\Stratigility\Dispatch->__invoke(Object(Zend\Stratigility\Route), NULL, Object(Zend\Stratigility\Http\Request), Object(Zend\Stratigility\Http\Response), Object(Zend\Stratigility\Next)) #7 H:\root\home\eugy45-001\www\mcc\vendor\flarum\core\src\Http\Middleware\AuthenticateWithSession.php(36): Zend\Stratigility\Next->__invoke(Object(Zend\Stratigility\Http\Request), Object(Zend\Stratigility\Http\Response)) #8 H:\root\home\eugy45-001\www\mcc\vendor\zendframework\zend-stratigility\src\Dispatch.php(212): Flarum\Http\Middleware\AuthenticateWithSession->__invoke(Object(Zend\Stratigility\Http\Request), Object(Zend\Stratigility\Http\Response), Object(Zend\Stratigility\Next)) #9 H:\root\home\eugy45-001\www\mcc\vendor\zendframework\zend-stratigility\src\Dispatch.php(88): Zend\Stratigility\Dispatch->dispatchCallableMiddleware(Object(Flarum\Http\Middleware\AuthenticateWithSession), Object(Zend\Stratigility\Next), Object(Zend\Stratigility\Http\Request), Object(Zend\Stratigility\Http\Response), NULL) #10 H:\root\home\eugy45-001\www\mcc\vendor\zendframework\zend-stratigility\src\Next.php(160): Zend\Stratigility\Dispatch->__invoke(Object(Zend\Stratigility\Route), NULL, Object(Zend\Stratigility\Http\Request), Object(Zend\Stratigility\Http\Response), Object(Zend\Stratigility\Next)) #11 H:\root\home\eugy45-001\www\mcc\vendor\flarum\core\src\Http\Middleware\RememberFromCookie.php(39): Zend\Stratigility\Next->__invoke(Object(Zend\Stratigility\Http\Request), Object(Zend\Stratigility\Http\Response)) #12 H:\root\home\eugy45-001\www\mcc\vendor\zendframework\zend-stratigility\src\Dispatch.php(212): Flarum\Http\Middleware\RememberFromCookie->__invoke(Object(Zend\Stratigility\Http\Request), Object(Zend\Stratigility\Http\Response), Object(Zend\Stratigility\Next)) #13 H:\root\home\eugy45-001\www\mcc\vendor\zendframework\zend-stratigility\src\Dispatch.php(88): Zend\Stratigility\Dispatch->dispatchCallableMiddleware(Object(Flarum\Http\Middleware\RememberFromCookie), Object(Zend\Stratigility\Next), Object(Zend\Stratigility\Http\Request), Object(Zend\Stratigility\Http\Response), NULL) #14 H:\root\home\eugy45-001\www\mcc\vendor\zendframework\zend-stratigility\src\Next.php(160): Zend\Stratigility\Dispatch->__invoke(Object(Zend\Stratigility\Route), NULL, Object(Zend\Stratigility\Http\Request), Object(Zend\Stratigility\Http\Response), Object(Zend\Stratigility\Next)) #15 H:\root\home\eugy45-001\www\mcc\vendor\flarum\core\src\Http\Middleware\StartSession.php(48): Zend\Stratigility\Next->__invoke(Object(Zend\Stratigility\Http\Request), Object(Zend\Stratigility\Http\Response)) #16 H:\root\home\eugy45-001\www\mcc\vendor\zendframework\zend-stratigility\src\Dispatch.php(212): Flarum\Http\Middleware\StartSession->__invoke(Object(Zend\Stratigility\Http\Request), Object(Zend\Stratigility\Http\Response), Object(Zend\Stratigility\Next)) #17 H:\root\home\eugy45-001\www\mcc\vendor\zendframework\zend-stratigility\src\Dispatch.php(88): Zend\Stratigility\Dispatch->dispatchCallableMiddleware(Object(Flarum\Http\Middleware\StartSession), Object(Zend\Stratigility\Next), Object(Zend\Stratigility\Http\Request), Object(Zend\Stratigility\Http\Response), NULL) #18 H:\root\home\eugy45-001\www\mcc\vendor\zendframework\zend-stratigility\src\Next.php(160): Zend\Stratigility\Dispatch->__invoke(Object(Zend\Stratigility\Route), NULL, Object(Zend\Stratigility\Http\Request), Object(Zend\Stratigility\Http\Response), Object(Zend\Stratigility\Next)) #19 H:\root\home\eugy45-001\www\mcc\vendor\flarum\core\src\Http\Middleware\ParseJsonBody.php(31): Zend\Stratigility\Next->__invoke(Object(Zend\Stratigility\Http\Request), Object(Zend\Stratigility\Http\Response)) #20 H:\root\home\eugy45-001\www\mcc\vendor\zendframework\zend-stratigility\src\Dispatch.php(212): Flarum\Http\Middleware\ParseJsonBody->__invoke(Object(Zend\Stratigility\Http\Request), Object(Zend\Stratigility\Http\Response), Object(Zend\Stratigility\Next)) #21 H:\root\home\eugy45-001\www\mcc\vendor\zendframework\zend-stratigility\src\Dispatch.php(88): Zend\Stratigility\Dispatch->dispatchCallableMiddleware(Object(Flarum\Http\Middleware\ParseJsonBody), Object(Zend\Stratigility\Next), Object(Zend\Stratigility\Http\Request), Object(Zend\Stratigility\Http\Response), NULL) #22 H:\root\home\eugy45-001\www\mcc\vendor\zendframework\zend-stratigility\src\Next.php(160): Zend\Stratigility\Dispatch->__invoke(Object(Zend\Stratigility\Route), NULL, Object(Zend\Stratigility\Http\Request), Object(Zend\Stratigility\Http\Response), Object(Zend\Stratigility\Next)) #23 H:\root\home\eugy45-001\www\mcc\vendor\flarum\core\src\Http\Middleware\HandleErrors.php(61): Zend\Stratigility\Next->__invoke(Object(Zend\Stratigility\Http\Request), Object(Zend\Stratigility\Http\Response)) #24 H:\root\home\eugy45-001\www\mcc\vendor\zendframework\zend-stratigility\src\Dispatch.php(212): Flarum\Http\Middleware\HandleErrors->__invoke(Object(Zend\Stratigility\Http\Request), Object(Zend\Stratigility\Http\Response), Object(Zend\Stratigility\Next)) #25 H:\root\home\eugy45-001\www\mcc\vendor\zendframework\zend-stratigility\src\Dispatch.php(88): Zend\Stratigility\Dispatch->dispatchCallableMiddleware(Object(Flarum\Http\Middleware\HandleErrors), Object(Zend\Stratigility\Next), Object(Zend\Stratigility\Http\Request), Object(Zend\Stratigility\Http\Response), NULL) #26 H:\root\home\eugy45-001\www\mcc\vendor\zendframework\zend-stratigility\src\Next.php(160): Zend\Stratigility\Dispatch->__invoke(Object(Zend\Stratigility\Route), NULL, Object(Zend\Stratigility\Http\Request), Object(Zend\Stratigility\Http\Response), Object(Zend\Stratigility\Next)) #27 H:\root\home\eugy45-001\www\mcc\vendor\zendframework\zend-stratigility\src\MiddlewarePipe.php(111): Zend\Stratigility\Next->__invoke(Object(Zend\Stratigility\Http\Request), Object(Zend\Stratigility\Http\Response)) #28 H:\root\home\eugy45-001\www\mcc\vendor\flarum\core\src\Http\AbstractServer.php(55): Zend\Stratigility\MiddlewarePipe->__invoke(Object(Zend\Diactoros\ServerRequest), Object(Zend\Diactoros\Response), Object(Zend\Stratigility\NoopFinalHandler)) #29 H:\root\home\eugy45-001\www\mcc\vendor\zendframework\zend-diactoros\src\Server.php(157): Flarum\Http\AbstractServer->__invoke(Object(Zend\Diactoros\ServerRequest), Object(Zend\Diactoros\Response), Object(Zend\Stratigility\NoopFinalHandler)) #30 H:\root\home\eugy45-001\www\mcc\vendor\flarum\core\src\Http\AbstractServer.php(36): Zend\Diactoros\Server->listen(Object(Zend\Stratigility\NoopFinalHandler)) #31 H:\root\home\eugy45-001\www\mcc\index.php(16): Flarum\Http\AbstractServer->listen() #32 {main} [2017-10-25 12:37:15] production.ERROR: The json file must be an object ({}) ```