Closed scottyp89 closed 7 years ago
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...
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.
I see what you mean. I've never tried that myself, what does the browser console tell you?
Or else have a look at your PHP error log (often this is your web server error log)?
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.
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?
Trying a different browser (now using FireFox in Private mode) I can't even select a site from the Sites drop down.
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.
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.
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!
Thanks for the feedback, can be useful for others running into the same issue:-)
I have this setup with a valid wildcard SSL certificate, but when accessing on HTTPS the only return I get is:
false
However I have just noticed that list sites on this controller does actually return information.