SamuelTallet / MongoDB-PHP-GUI

Open-source graphical interface for MongoDB database. Written in PHP, JavaScript, HTML & CSS.
142 stars 33 forks source link

Error: 404 Not Found #4

Closed akmalfikri closed 3 years ago

akmalfikri commented 3 years ago

Already installed everything needed, including composer install , but it displayed 404 not found. Am I missing something?

SamuelTallet commented 3 years ago

@akmalfikri What is your OS and Web server?

akmalfikri commented 3 years ago

Apache2 on Ubuntu 20.04

SamuelTallet commented 3 years ago

@akmalfikri What is your URL?

peterfromthehill commented 3 years ago

@akmalfikri maybe https://github.com/SamuelTS/MongoDB-PHP-GUI/pull/6 will help you?!

akmalfikri commented 3 years ago

@akmalfikri What is your URL? http://mongo.neuroware.io/login#

SamuelTallet commented 3 years ago

@akmalfikri maybe #6 will help you?! This fix worked on my Apache2.4 setup. Does it work for you @akmalfikri? ;-)

akmalfikri commented 3 years ago

Thanks guys. #6 worked for me.

Note : Make sure you enable mod_rewrite before applying the fix.

akmalfikri commented 3 years ago

Now, after login, it went back to URL not found again.

SamuelTallet commented 3 years ago

@akmalfikri Can you please login to the GUI then attach here the error log of your Apache virtual host?

akmalfikri commented 3 years ago

Here's the error after I logged in :

[Tue Nov 03 00:23:38.615400 2020] [php7:notice] [pid 15670] [client 162.158.166.253:50304] PHP Notice: Undefined variable: response in /var/www/mongodb.neuroware.io/index.php on line 69, referer: http://mongo.neuroware.io/login [Tue Nov 03 00:23:38.615547 2020] [php7:error] [pid 15670] [client 162.158.166.253:50304] PHP Fatal error: Uncaught TypeError: Argument 1 passed to Limber\\Application::send() must be an instance of Psr\\Http\\Message\\ResponseInterface, null given, called in /var/www/mongodb.neuroware.io/index.php on line 69 and defined in /var/www/mongodb.neuroware.io/vendor/nimbly/limber/src/Application.php:368\nStack trace:\n#0 /var/www/mongodb.neuroware.io/index.php(69): Limber\\Application->send(NULL)\n#1 {main}\n thrown in /var/www/mongodb.neuroware.io/vendor/nimbly/limber/src/Application.php on line 368, referer: http://mongo.neuroware.io/login [Tue Nov 03 00:23:39.400782 2020] [php7:notice] [pid 21401] [client 162.158.166.254:57832] PHP Notice: Undefined variable: response in /var/www/mongodb.neuroware.io/index.php on line 69, referer: http://mongo.neuroware.io/login [Tue Nov 03 00:23:39.400994 2020] [php7:error] [pid 21401] [client 162.158.166.254:57832] PHP Fatal error: Uncaught TypeError: Argument 1 passed to Limber\\Application::send() must be an instance of Psr\\Http\\Message\\ResponseInterface, null given, called in /var/www/mongodb.neuroware.io/index.php on line 69 and defined in /var/www/mongodb.neuroware.io/vendor/nimbly/limber/src/Application.php:368\nStack trace:\n#0 /var/www/mongodb.neuroware.io/index.php(69): Limber\\Application->send(NULL)\n#1 {main}\n thrown in /var/www/mongodb.neuroware.io/vendor/nimbly/limber/src/Application.php on line 368, referer: http://mongo.neuroware.io/login [Tue Nov 03 00:24:05.045054 2020] [negotiation:error] [pid 15829] [client 162.158.165.165:36842] AH00687: Negotiation: discovered file(s) matching request: /var/www/mongodb.neuroware.io/index (None could be negotiated)., referer: http://mongo.neuroware.io/login [Tue Nov 03 00:24:05.248962 2020] [php7:notice] [pid 20632] [client 162.158.166.254:37254] PHP Notice: Undefined variable: response in /var/www/mongodb.neuroware.io/index.php on line 69, referer: http://mongo.neuroware.io/index [Tue Nov 03 00:24:05.249066 2020] [php7:error] [pid 20632] [client 162.158.166.254:37254] PHP Fatal error: Uncaught TypeError: Argument 1 passed to Limber\\Application::send() must be an instance of Psr\\Http\\Message\\ResponseInterface, null given, called in /var/www/mongodb.neuroware.io/index.php on line 69 and defined in /var/www/mongodb.neuroware.io/vendor/nimbly/limber/src/Application.php:368\nStack trace:\n#0 /var/www/mongodb.neuroware.io/index.php(69): Limber\\Application->send(NULL)\n#1 {main}\n thrown in /var/www/mongodb.neuroware.io/vendor/nimbly/limber/src/Application.php on line 368, referer: http://mongo.neuroware.io/index

SamuelTallet commented 3 years ago

@akmalfikri I see in your error log that PHP fails but I dont know exactly why 😞

peterfromthehill commented 3 years ago

@akmalfikri Can you provide us the matched requests from the access.log? Can you double check your .htaccess? The .htaccess file should internaly redirect to the index.php file and no 404 should happen. I can provide the same error when i access an invalide route (e.g https://domain.com/aaa, but https://domain.com/aaa/queryDatabase is valid) but i always get a redirect to a valid url.

akmalfikri commented 3 years ago

After log in, the URL redirect to http://domain.com/index# .

So I had to manually direct the URL to http://domain.com/queryDatabase for the page to work. Here is the .htaccess file.

RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php/$1 [QSA,L]

SamuelTallet commented 3 years ago

@akmalfikri You can add a comment if you still need help.