HTTPS problem on DELETE files

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
alliance8791
User
Posts: 49

HTTPS problem on DELETE files

Post by alliance8791 »

Hi all. I have this configuration:
Apache web server with HTTPS listening on port 5556 "h_t_t_p_s://mywebsite.xxx:5556/"

Everything works very well, but when i try to delete some files that i have uploaded, nothing happens and from the Chrome console i see this error:

Mixed Content: The page at *'h_t_t_p_s://xxxxxxxxxx:5556/tutoreedit.php?showdetail=&idtutore=1' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'h_t_t_p://xxxxxxxxxx:5556/ewupload13.php?rnd=1474829508&id=x_LinkDocumenti&table=tutore&x_LinkDocumenti=xxxxxxxxxxxxxx.pdf&method=DELETE'. This request has been blocked; the content must be served over HTTPS.

XMLHttpRequest cannot load "h_t_t_p://xxxxxxxxxx:5556/ewupload13.php?rnd=1474829508&id=x_LinkDocumenti&table=tutore&x_LinkDocumenti=xxxxxxxxxxxxxx.pdf&method=DELETE". Failed to start loading.

Why the requests to delete are not in HTTPS too ????

Tnx in advance


mobhar
User
Posts: 11660

Post by mobhar »

How did you delete the files? Did you use your own specific link or delete the files from Edit form?


alliance8791
User
Posts: 49

Post by alliance8791 »

mobhar wrote:
How did you delete the files? Did you use your own specific link or delete the files
from Edit form?

Hi mobhar, normal delete from edit form. Tnx


Webmaster
User
Posts: 9425

Post by Webmaster »

The generated codes should be able to detect https. Please add the following codes to the Page_Load server event. Show what you get.

echo "full url: " . ew_FullUrl() . "<br>";


alliance8791
User
Posts: 49

Post by alliance8791 »

Hi, this is the real page i am browsing: h_t_t_p_s://xxxxxx.noip.me:5556/login.php and this is what echo "full url: " . ew_FullUrl() . "<br>"; is showing:
full url: h_t_t_p
://xxxxxxx.noip.me:5556/login.php

Tnx in advance.


Webmaster
User
Posts: 9425

Post by Webmaster »

Upload a test script to your server and run phpinfo() (see http://php.net/manual/en/function.phpinfo.php), find $SERVER['HTTPS'] and $SERVER['SERVER_PORT'], what are the values?


alliance8791
User
Posts: 49

Post by alliance8791 »

This is the only thing i found:

_SERVER["HTTP_X_FORWARDED_PROTO"] https
_SERVER["HTTP_X_FORWARDED_PORT"] 5556

Tnx.


Webmaster
User
Posts: 9425

Post by Webmaster »

Missing $SERVER['HTTPS'] and therefore HTTPS cannot be detected. For the time being you need to customize ew_IsHttps() in the template to suit your server, e.g. check $SERVER["HTTP_X_FORWARDED_PROTO"].


alliance8791
User
Posts: 49

Post by alliance8791 »

I changed the weberver from APACHE 2.4 to APACHE 2.2 and everything now is working perfectly.
Problem was APACHE 2.4.

Ciao.


Post Reply