JoeGandy / ShareX-Custom-Upload

A little PHP script created for uploading custom sharex files to your own webserver
MIT License
165 stars 50 forks source link

login page 404 error/no panel #113

Open NullRien opened 3 years ago

NullRien commented 3 years ago

when i set password login to true the page is keep giving me a 404 not found error for the register page. also when i only used ip whitelisting all i saw was the page name and not the panel itself.

theaquarium commented 3 years ago

I'm not entirely sure what's wrong here but it's likely that you don't have all of your Apache and PHP modules enabled. Could you send your error log?

NullRien commented 3 years ago

https://pastebin.com/juXpNUnW

theaquarium commented 3 years ago

I'm not entirely sure what's causing the 404 error but the error on the main page is being caused by not having the fileinfo extension enabled in your php.ini configuration file. Make sure to remove the semicolon before any lines that look like extension=fileinfo.so or extension=php_fileinfo.dll or extension=fileinfo in your php.ini.

Takepy commented 3 years ago

I'm having the same issue when setting enable_password_login to true. @NullRien Did you ever find a solution to this?

theaquarium commented 3 years ago

I have a theory about what might be causing this and I believe there was a fix for this pushed to the repo, I'm just waiting for @JoeGandy to accept the most recent PR so I can release a new version.

theaquarium commented 3 years ago

Based on your error log, I’m pretty sure this is actually an error with your configuration and not the uploader. As I mentioned before, I believe the issue is that the fileinfo extension is not enabled. Here’s a guide on how to turn it on: https://stackoverflow.com/questions/3579072/php-fileinfo-is-undefined-function

Takepy commented 3 years ago

I hope it's okay if I reply here since I'm having the same issue. I decided to reinstall PHP (now running on 7.4.11) and checked to see if the modules are loading using php -m

root@PJSalt:~# php -m
[PHP Modules]
...
fileinfo
...

Furthermore, I created a file that invokes phpinfo(); Running that shows as well that fileinfo is being loaded. fileinfo support enabled

So it doesn't seem to be a fileinfo issue.

Takepy commented 3 years ago

I found out what was causing the issue for me. Inside /etc/apache2/apache2.conf I had to change the AllowOverride from None to All for <Directory /var/www/> This is what it should look like.

<Directory /var/www/>
    Options Indexes FollowSymLinks
    AllowOverride All
    Require all granted
</Directory>

After then restarting apache (service apache2 restart) it has been working without a problem and I'm now able to use the login.

theaquarium commented 3 years ago

Great, that might be the problem too. However, I think for @NullRien, based on the error log they sent, it's the issue with fileinfo. However they should still check both.