Open karkaletsi opened 2 years ago
Make sure that you have PHP 7.4 or above, and also check for any error.log files anywhere and if there are any logfiles in __UNAM_LIB\Logs
no log files. I have PHP 7.4.3 CLI
Make sure that you copied over all the files, you'll have to find out how to enable error logs for your specific host to see what causes the error 500.
I will try updating PHP
Can I make it so it auto logs me in?
Sure you can code it to do that but that wouldn't really be good, since then anyone that gets the URL won't have to log in either.
Ok tell me what to change sir
Well you can change it to that but you'll need to fix the error first since there's something wrong in your configuration. Are you just creating a local web panel for testing or a public web panel which external computers will connect to?
Public web panel which external computers will connect to.
I will try to add an old version of your webpanel to see if it still does that
still same error hmm
jquery.min.js line 2 is the error it says
It's a PHP error, the jquery line is just from the AJAX response. You'll have to check your PHP configurations since it's most likely the cause, the easiest would be to enable errors.
error_reporting(E_ALL); ini_set('display_errors', '1'); put this in login.php and index.php and display_errors = On on both of my php.ini
Where can i check for the errors, no file created on the logs folder
You should put it at the top of auth-ajax.php, then check all folders for an error.log
file.
Above the <?php right? I did that restarted apache tried logging in but no error.log anywhere
No below it.
still nothing
It will be easier if you just set up something like WAMP (or XAMPP) instead, you only need Apache from WAMP and it will work.
i guess i will leave the webpanel part, i remember the crypto miner startup didnt work did you manage to fix that?
I don't think it has ever not worked, except when you try to enter protected folders into "File Name" since it can't write to those.
same problem here, can't login, no log, just the error in the photo. I tried with apache+php and nginx+php. I'm running it on a rasperry pi 3b (just becasue it was there) on a lite (no screen) x64 OS (the defaoult one)
sorry for the bad english it's late for me and it isn't my primary language...
same problem here, can't login, no log, just the error in the photo. I tried with apache+php and nginx+php. I'm running it on a rasperry pi 3b (just becasue it was there) on a lite (no screen) x64 OS (the defaoult one) sorry for the bad english it's late for me and it isn't my primary language...
Make sure that you have PHP 8.0 or newer and that no files are missing.
updated it to 8.2, still not working
updated it to 8.2, still not working
Do you have any error logs inside the __UNAM_LIB\Logs
folder or next to the auth-ajax.php
file? Also, did you change config.php
in any way?
no error log anywhere, i changed only the password in config.php
no error log anywhere, i changed only the password in config.php
Then possibly it doesn't have permission to write the log, if you replace the config.php with a fresh one from the releases https://github.com/UnamSanctam/UnamWebPanel/releases then does it work?
nop
nop
Then please post more information about the error and your setup, since your setup is the issue then it's hard to guess what the problem is with it.
hardware:
software:
i think it's all
Can you check phpinfo() and see what it says regarding PHP version and such? And did you try fully removing all the files, then -re-extracting all the web panel files and then testing logging in with the default password?
Do you have php-sqlite installed or not? And can you enable error outputting and then look at the response from auth-ajax.php?
php-sqlite it's installed, how can i enable error outputting?
ok then?
Try to log in and see what auth-ajax.php responds with in the developer console (in the network tab).
Check the network tab for the auth-ajax.php.
code 200 all ok but other error here
What does auth-ajax.php return? The CSS file doesn't matter since it's only a stylesheet.
Warning: file_put_contents(/var/www/html/__UNAM_LIB/Logs/php-error-08-04-2023.html): Failed to open stream: Permission denied in /var/www/html/UNAM_LIB/unam_lib.php on line 235
Fatal error: Uncaught Error: Call to a member function prepare() on bool in /var/www/html/UNAM_LIB/unam_lib.php:29
Stack trace:
thrown in /var/www/html/__UNAM_LIB/unam_lib.php on line 29
Yes then it wasn't allowed to write the errors like I thought (which is why there's no log), seems like the problem is that you're not able to open the database. Make sure that the PDO SQLite extension is both installed and enabled and that the db/unamwebpanel.db
file and parent folder are both readable and writable.
db/unamwebpanel.db have the permission, and SQLite is up and running
Give write permissions to the __UNAM_LIB/Logs
folder so that it can write out any errors into that folder. But something is causing the database not to work, since I don't have access to the machine then it's hard to know why. Can you see the SQLite extension active inside phpinfo()?
sorry if i disappeared but i had health problems, the folder has all permissions (they were pre-set) the sqlite info i can find on phpinfo() is this:
tried on a different pi3, fresh install and all, this times an error comes out on auth-ajax.php
Your server is likely unable to start/connect the SQLite database. Can you set write permissions for both the class
and __UNAM_LIB/Logs
folders? Then try to login and check if there's an error log in either the class
folder or the __UNAM_LIB/Logs
folder.
this is the situation with permissions at the moment, no log files or anything
basically i set up the web panel all good and when im trying to login it says "error something went wrong" when i go in console and i see what the problem is its this: