I have tried the solution provided in stack overflow for this problem but could not really solve this problem. I am working on the code written by someone else. The code is as follows
The error I am getting is A PHP Error was encountered
Can someone help me with this.
Naftali 143k39 gold badges240 silver badges299 bronze badges asked Jun 26, 2012 at 15:02
The error you are receiving is letting you know that there is no such key for PHP_AUTH_USER not set? Note that the error level is a warning, so it isn't going to stop execution unless you have your error level set to strict. Since you say that you are working on someone else's code, I would say this means the code was originally intended to use native webserver authentication rather than an authentication model defined in the code using a database. You're going to need to find an alternative if you are deploying this somewhere else, like creating your own authentication mechanism using a persistency layer. Docs for HTTP auth under Apache: http://httpd.apache.org/docs/2.0/howto/auth.html
answered Jun 26, 2012 at 15:05
DeaconDesperadoDeaconDesperado 9,5798 gold badges44 silver badges77 bronze badges The PHP documentation for
So what this tells me, is that there is no HTTP authentication taking place. I suggest you read up on HTTP authentication with PHP. answered Jun 26, 2012 at 15:05
Jonathon ReinhartJonathon Reinhart 127k32 gold badges245 silver badges317 bronze badges 1 You're getting a notice because you aren't checking if $_SERVER["PHP_AUTH_USER"] is set before referencing it. It's only a notice though, so it's not that critical. answered Jun 26, 2012 at 15:07
Jon OwensJon Owens 761 silver badge6 bronze badges It tells you exactly what the error id in the error message.
answered Jun 26, 2012 at 15:04
NaftaliNaftali 143k39 gold badges240 silver badges299 bronze badges 1 If you installed Apache2 , try this command:
Obsidian 3,2708 gold badges16 silver badges29 bronze badges answered Jun 2 at 12:26
2 |