Hi. I am trying to load a page in local php in an iframe. The server that answers me is python since I access from port 8123. Did someone implement a local php and call it from an iframe?
configuration of the iframe card
url: /local/acuarioweb/htmls/mediciones.html
aspect_ratio: 100%
type: iframe
This html calls a php file from javascript. But this one responds to the php code because it is not interpreting apache but it is interpreting it python
The problem is that iframe does not allow http only allows https.
thought it was solved using python but I also did not
When I call the python file from a jquery ajax I receive the complete file code and not the json that should return
Thank you
Hi. In the iframe, load a local html that calls a python file with ajax. This should respond with a json as seen in the image but what answers me is all the code.
I set it up and running it outside of home assistant works. But not inside.
I assumed that it did not work with php and that’s why I decided to use python, but I do not know if I have to configure something to build an “apache” for python
in the iFrame I use the path /local/index.php and that does not work. Http sites inside mine which is https either. the only thing is to make my site https but I have not tried it yet.
I want from jQuery to call php to get back a JSON.
Sorry, i do not speak english. That makes my explanation difficult. What I try is to do a query to mysql and with that generate a JSON to see it in a table in html
Ok. But you don’t seem to get that php will not work on Home Assistant’s web server. You need a separate webserver for that. It doesn’t matter how you try to wrap it. If you’re trying to call a php script, unless it’s hosted on a different web service, IT WILL NOT WORK
yes. everything is installed. On the outside it works perfectly. the issue is when I change the root folder to sites-enables and I indicate the folder of the home assistant. There it continues to work but when I call it from home assistant it does not work
I’m sorry I do not understand. The home assistant folder is www. What I did is configure nginx so that the root is that folder.
Thanks for your helping