CADOJRP / FiveM-AdministrationPanel

Administration Panel for FiveM Servers
MIT License
32 stars 10 forks source link

Index downlaods #19

Closed Wolf1911 closed 5 years ago

Wolf1911 commented 5 years ago

Instead of opening up the page, it downloads a file.

Here's the site.

I believe I set up the config correctly.

avery1227 commented 5 years ago

You'll need to create a different .htaccess as it doesn't seem to be working with your web server.

Wolf1911 commented 5 years ago

That was fast! I don't have an .htaccess, at least I can't see one.

avery1227 commented 5 years ago

It might be hidden due to the file name not technically existing.

If so try this: https://github.com/CADOJRP/FiveM-AdministrationPanel/blob/master/web/.htaccess

avery1227 commented 5 years ago

Also, are you using PHP 7 or newer?

Wolf1911 commented 5 years ago

No clue, I'm on cPanel with a hosting company.

avery1227 commented 5 years ago

Try this .htaccess:

Options -MultiViews

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
AddType application/x-httpd-php .php
AddType application/x-httpd-php5 .php
AddType application/x-httpd-ea-php70 .php .php7 .phtml
AddHandler application/x-httpd-php .php
Wolf1911 commented 5 years ago

I cannot see the file to edit it, sadly.

avery1227 commented 5 years ago

Alrighty, below is a zip file which inside will have the .htaccess file, you should be able to view it in the zip, if you upload the .htaccess from there or upload the zip through the cPanel file manager and unzip it, this might resolve the issue.

file inside here.zip

Wolf1911 commented 5 years ago

Alright, thanks a bunch. I'll try it now.

Wolf1911 commented 5 years ago

Still seems to do it.

Wolf1911 commented 5 years ago

I am able to rewrite them now, but none of the files worked.

Wolf1911 commented 5 years ago

I got it to work, the php was a couple versions behind on my end. Completely my idiocy! Thanks a whole lot for the help, even if it was a slight waste of time!

Huntsleyjr commented 4 years ago

Hello, I appear to be having the same issue, i have fresh installs of MySQL, php 7.4, and Apache24. I have tried to edit the .htaccess but it still downloads a file

Huntsleyjr commented 4 years ago

I tried to upload the panel.sql again and recive this error

Restoring C:\Users###\Downloads\FiveM-AdministrationPanel-master\FiveM-AdministrationPanel-master\web\fivemad1_panel.sql Running: mysql.exe --defaults-file="c:\users###\appdata\local\temp\tmpr1xsth.cnf" --protocol=tcp --host=localhost --user=root --port=3306 --default-character-set=utf8 --comments --database=fivem < "C:\Users\###\Downloads\FiveM-AdministrationPanel-master\FiveM-AdministrationPanel-master\web\fivemad1_panel.sql" ERROR 1060 (42S21) at line 291: Duplicate column name 'active'

Operation failed with exitcode 1 11:37:26 Import of C:\Users###\Downloads\FiveM-AdministrationPanel-master\FiveM-AdministrationPanel-master\web\fivemad1_panel.sql has finished with 1 errors