Comments (7)
The error message has a filename and a line number. What is the code in that line?
from slim-basic-auth.
The error message has a filename and a line number. What is the code in that line? Other way to ask this is, you mention above that error message is:
Uncaught TypeError: Return value of Tuupola\Middleware\HttpBasicAuthentication::uservoid, none returned in /var/www/html/api/vendor/tuupola/slim-basic-auth/src/HttpBasicAuthentication.php:236
What is the contents of the file /var/www/html/api/vendor/tuupola/slim-basic-auth/src/HttpBasicAuthentication.php
at line 236?
from slim-basic-auth.
First of all, thank you for your attention.
Here is the complete error line:
[:error] [pid 26751] [client 193.136.33.222:10400] PHP Fatal error: Uncaught TypeError: Return value of Tuupola\Middleware\HttpBasicAuthentication::uservoid, none returned in /var/www/html/api/vendor/tuupola/slim-basic-auth/src/HttpBasicAuthentication.php:236\nStack trace:\n#0 [internal function]: Tuupola\Middleware\HttpBasicAuthenticatiupola/slim-basic-auth/src/HttpBasicAuthentication.php(171): call_user_func(Array, Array)\n#2 /var/www/html/api/vendor/tuupola/slim-basic-auth/src/HttpBasicAuthentication.php(55): Tuupola\My)\n#3 /var/www/html/api/public/bootstrap.php(13): Tuupola\Middleware\HttpBasicAuthentication->__construct(Array)\n#4 /var/www/html/api/public/index.php(8): require('/var/www/html/a...')/tuupola/slim-basic-auth/src/HttpBasicAuthentication.php on line 236
Many thanks
from slim-basic-auth.
This is different error. In the original post the error you mentioned was:
Uncaught Error: Class 'Slim\Middleware\HttpBasicAuthentication' not found
This error message is above is.
PHP Fatal error: Uncaught TypeError: Return value of Tuupola\Middleware\HttpBasicAuthentication::uservoid, none returned in...
It looks like the output is garbled or there is a copy paste mistake. The HttpBasicAuthentication::uservoid
part does not make any sense. In any case the error message you posted in the last message looks similar to #60. Which PHP version you are running? Minimum requirement is PHP 7.1.
from slim-basic-auth.
Yeah, you're right. Sorry for the cross error!
The first one i've just solutionated :)
Now reggarding to the other :
PHP Fatal error: Uncaught TypeError: Return value of Tuupola\Middleware\HttpBasicAuthentication::uservoid, none returned in...
On my developer machine (xampp) it's working fine, when i put it on my server (LINUX - PHP 7.1.16-1+ubuntu16.04.1+deb.sury.org )
It gives me that error!!!
Can you please help me?
Im desesperated right now ....
from slim-basic-auth.
My bootstrap.php code is:
...
`$app->add(new Tuupola\Middleware\HttpBasicAuthentication([
// "users" => [
// "root" => "toor"
// ],
"path" => ["/"],
"secure" => false, // HTTPS -ATTENTION
"passthrough" => ["/auth", "/generatepass"],
"authenticator" => new PdoAuthenticator([
"pdo" => $pdo,
"table" => "user",
"user" => "username",
"hash" => "password"
])
]));`
from slim-basic-auth.
Thank you for your sugestion.
I've reinstaled the slim and Authentication on the linux server and all worked well.
from slim-basic-auth.
Related Issues (20)
- Access user/passwd from Authenticator within Slim route handler HOT 1
- Specify callback for the relaxed configuration parameter HOT 3
- Authenticator misinterpretation of "authorization" header HOT 5
- Ignore is not working as expected
- Accessing slim request/app from inside custom authenticator HOT 2
- Uncaught Error: Interface 'Psr\Http\Message\ResponseFactoryInterface' not found HOT 2
- HTTP_X_FORWARDED_PROTO HOT 1
- ignore list HOT 1
- After/Before Callbacks never called? HOT 3
- Class 'Tuupola\Middleware\HttpBasicAuthentication' not found HOT 32
- 401 error in postman HOT 3
- Interface ResponseFactoryInterface not found HOT 5
- Authentification error HOT 4
- Connecting over HTTP when I should not be able to HOT 1
- "final class" and CloudFlare proxification error HOT 1
- Why does local(HTTP) connection work but not online(HTTPS)? HOT 16
- Add request object back to the error handler. HOT 3
- Allow using any callable as a rule
- Do not assume callbacks are a closure
- Before & After Callbacks Never Triggered
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from slim-basic-auth.