Giter VIP home page Giter VIP logo

Comments (11)

malle-pietje avatar malle-pietje commented on May 18, 2024 1

Or else have a look at your PHP error log (often this is your web server error log)?

from unifi-api-browser.

scottyp89 avatar scottyp89 commented on May 18, 2024 1

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.

malle-pietje avatar malle-pietje commented on May 18, 2024

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?
ssl
This controller is using a Letsencrypt cert and works fine with the API client class...

from unifi-api-browser.

scottyp89 avatar scottyp89 commented on May 18, 2024

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.

malle-pietje avatar malle-pietje commented on May 18, 2024

I see what you mean. I've never tried that myself, what does the browser console tell you?

from unifi-api-browser.

scottyp89 avatar scottyp89 commented on May 18, 2024

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.

malle-pietje avatar malle-pietje commented on May 18, 2024

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.

scottyp89 avatar scottyp89 commented on May 18, 2024

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.

malle-pietje avatar malle-pietje commented on May 18, 2024

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.

scottyp89 avatar scottyp89 commented on May 18, 2024

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.

malle-pietje avatar malle-pietje commented on May 18, 2024

Thanks for the feedback, can be useful for others running into the same issue:-)

from unifi-api-browser.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.