Comments (11)
Or else have a look at your PHP error log (often this is your web server error log)?
from unifi-api-browser.
This was an Apache config issue after looking into the errors above, your code works fine :)
I've had to add the following to my https.conf file in Apache:
<DirectoryMatch "/full/path/to/site/dir">
php_admin_value open_basedir "/full/path/to/site/dir"
</DirectoryMatch>
Thanks for your help and sorry for wasting your time!
from unifi-api-browser.
Then probably the login is not successful. This tool should work with SSL without any issues.
Maybe you can enable the debug mode from the config.php file and share the relevant output from that?
This controller is using a Letsencrypt cert and works fine with the API client class...
from unifi-api-browser.
Enabling debug doesn't return anything additional. Having the controller on HTTPS is fine, but since I put the API browser on HTTPS, it doesn't work. I have the API browser site accessible on HTTP and HTTPS, it works fine in HTTP but not HTTPS.
from unifi-api-browser.
I see what you mean. I've never tried that myself, what does the browser console tell you?
from unifi-api-browser.
Just pulled this from the error log:
[Tue Nov 29 13:15:26.618268 2016] [:error] [pid 30205] [client [omitted]:64264] curl error: Failed to connect to 127.0.0.1 port 8443: Connection refused, referer: https://[omitted]/admin/index.php
Nothing showed up in the browser console unfortunately.
from unifi-api-browser.
Looks as if the controller details are not stored in the $_SESSION variable since 127.0.0.1 is the default url as defined in the class. Did you try to clean browser cookies or use a different browser?
from unifi-api-browser.
Trying a different browser (now using FireFox in Private mode) I can't even select a site from the Sites drop down.
from unifi-api-browser.
Weird. Unfortunately I don't have time at the moment to recreate this issue in my set up. I'll check as soon as I have the time and will report back.
from unifi-api-browser.
No problem, thanks!
Just to give you some more info I've checked the error log since using FireFox and get a few events logged simultaneously:
[Tue Nov 29 13:32:02.971068 2016] [:error] [pid 32176] [client [omitted]:65276] PHP Warning: is_readable(): open_basedir restriction in effect. File(config.php) is not within the allowed path(s): (/var/sentora/hostdata/[omitted]/public_html/[omitted]:/var/sentora/temp/) in /var/sentora/hostdata/[omitted]/public_html/[omitted]/admin/index.php on line 62, referer: https://[omitted]/admin/ [Tue Nov 29 13:32:02.971169 2016] [:error] [pid 32176] [client [omitted]:65276] PHP Notice: Undefined variable: controlleruser in /var/sentora/hostdata/[omitted]/public_html/[omitted]/admin/index.php on line 127, referer: https://[omitted]/admin/ [Tue Nov 29 13:32:02.971177 2016] [:error] [pid 32176] [client [omitted]:65276] PHP Notice: Undefined variable: controllerpassword in /var/sentora/hostdata/[omitted]/public_html/[omitted]/admin/index.php on line 128, referer: https://[omitted]/admin/ [Tue Nov 29 13:32:02.971181 2016] [:error] [pid 32176] [client [omitted]:65276] PHP Notice: Undefined variable: controllerurl in /var/sentora/hostdata/[omitted]/public_html/[omitted]/admin/index.php on line 129, referer: https://[omitted]/admin/ [Tue Nov 29 13:32:02.971185 2016] [:error] [pid 32176] [client [omitted]:65276] PHP Notice: Undefined variable: controllerversion in /var/sentora/hostdata/[omitted]/public_html/[omitted]/admin/index.php on line 132, referer: https://[omitted]/admin/ [Tue Nov 29 13:32:02.971472 2016] [:error] [pid 32176] [client [omitted]:65276] curl error: Failed to connect to 127.0.0.1 port 8443: Connection refused, referer: https://[omitted]/admin/ [Tue Nov 29 13:32:02.971562 2016] [:error] [pid 32176] [client [omitted]:65276] PHP Warning: usort() expects parameter 1 to be array, boolean given in /var/sentora/hostdata/[omitted]/public_html/[omitted]/admin/index.php on line 556, referer: https://[omitted]/admin/ [Tue Nov 29 13:32:02.971570 2016] [:error] [pid 32176] [client [omitted]:65276] PHP Warning: Invalid argument supplied for foreach() in /var/sentora/hostdata/[omitted]/public_html/[omitted]/admin/index.php on line 558, referer: https://[omitted]/admin/
Looks to me like a permissions issue but I've set all files to 777 and it is still coming back with the same problem.
from unifi-api-browser.
Thanks for the feedback, can be useful for others running into the same issue:-)
from unifi-api-browser.
Related Issues (20)
- 24hr usage HOT 2
- Any documentation available? HOT 2
- All devices HOT 3
- Removing users across all sites HOT 1
- UI Cloud Controller integration HOT 3
- Permission denied (13) when loading sites HOT 9
- Unable to get list of sites from local UCG Ultra HOT 1
- Default Site / Collection HOT 4
- Connection Error HOT 2
- How can I see all energy (watts) being usage on the network HOT 1
- UniFi controller login failure HOT 4
- Is there any way to display the results directly? HOT 4
- API IP from VPN HOT 7
- UDM Pro firmware beta version 1.11.0-14 and 1.11.0-15 HOT 2
- API does'nt work need help HOT 7
- Access to WLAN password HOT 15
- Possible issue with CORS HOT 3
- Demo not working HOT 2
- Unifi 7.0 Controller API Issue HOT 3
- Node lacks support for Ubiquiti power strips and plugs. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from unifi-api-browser.