Closed nodecentral closed 3 years ago
Check the web server error logs.
Also make sure you are actually including the class (correct path).
Check the web server error logs.
Hi @malle-pietje , where do I find the web server error logs ?
/UniFi-API-browser # ls
LICENSE.md TODO.md collections.php composer.json config css index.php list_connected_users.php login.php templates
README.md ajax common.php composer.lock config.php favicon.ico js list_site_health.php logout.php vendor
/UniFi-API-browser #
And..
Also make sure you are actually including the class (correct path).
Sorry, where exactly do I need to do that ? All I’ve edited/created so far is the config.php - do I need to do something in each of the example scripts too ?
The location of error logs will differ based on how the container is configured. Can't help you with that.
Please reads the docs on how to include: https://github.com/Art-of-WiFi/UniFi-API-client#installation
I can't help you further with basic PHP questions I'm afraid...
The location of error logs will differ based on how the container is configured. Can't help you with that.
Ok, as an FYI - I am just using the one linked to on your GitHub page - https://hub.docker.com/r/scyto/unifibrowser
Please reads the docs on how to include: https://github.com/Art-of-WiFi/UniFi-API-client#installation
I can't help you further with basic PHP questions I'm afraid...
I did, but I literally have no php knowledge or experience at all, and it’s not 100% clear to me what i should do - :-(
it says the following for example ..
include the file containing the class in your code
I looked up what class
meant online and it said
Class is a programmer-defined data type, which includes local methods and local variables. Class is a collection of objects. Object has properties and behavior.
isn’t that the config.php?
It seems I’m obviously missing something obvious, but if I can ask one more thing - please can you confirm all I need to do is edit the example php files I want to use e.g list_connected_users.php
Really sorry for all the questions..
I’ve edited the list_connected_users.php
file and updated the site_id value to home
The only other thing I can think to change within that file, is the line require_once 'path/to/src/Client.php';
but I can’t find a file called Client.php
to point it to ?
Hi
I’m running the UniFi API Browser via Docker and I’m trying to get some of the example php scripts to work, but each one I run returns the word
false
so I can only assume my settings are wrong, but I’m not sure where. I’m hoping if I share what I’ve done someone can help ..To access the Docker’s command line
Next, I copied over the config template file to edit and also some of the examples to try out.
I then went on to edit the config.template.php file to access my controller. (Using a local account)
And then I saved it and also went on to rename it to the required config.php
Next I tried to run the examples via the url, all of which returned
false
All ideas/suggestions welcome.