[error] can't upload image with HTTPS
Posted: Tue May 03, 2016 4:41 pm
Hi everyone
Since I changed protocol from http to https some days ago, can't upload image. To solve the problem, I searched on the internet many times, but couldn't get an available answer at all. So post here.
Of course, when I have used http, any images could have been uploaded.
s9s says on admin panel>addmedia>brose.. and clicked [go] button.
" Unknown error occurred, file not uploaded. Maybe your filesize is larger than the maximum size allowed by your server installation. Check with your ISP or edit your php.ini file to allow larger file size uploads."
my environment:
Server: ubuntu 14.04.1
Apache 2.4.18
MySQL 5.6.30
PHP 5.6.20-1
php.ini :
file_uploads = On
;upload_tmp_dir = (commented out) probably used /var/tmp?
upload_max_filesize = 16M
max_file_uploads = 20
URL in s9y Configulation>Path>URL to blog ---> https://www.mydomain.org/news/
/news/ means s9y installed directory
Apache access log:
my.isp.jp - - [03/May/2016:23:03:32 +0900] "POST /news/serendipity_admin.php?serendipity[adminModule]=media&serendipity[sortorder][perpage]=8&serendipity[sortorder][order]=i.date&serendipity[sortorder][ordermode]=DESC& HTTP/1.1" 500 7597 "https://www.mydomain.org/news/serendipi ... =addSelect" "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:46.0) Gecko/20100101 Firefox/46.0"
Apache error.log:
[Tue May 03 23:11:07.687291 2016] [:error] [pid 2669] [client my.ip.addr.ess:55143] PHP Warning: Unknown: open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (/var/www/html/) in Unknown on line 0, refererer: https://www.mydomain.org/news/serendipi ... =addSelect
[Tue May 03 23:11:07.690349 2016] [:error] [pid 2669] [client my.ip.addr.ess:55143] PHP Warning: File upload error - unable to create a temporary file in Unknown on line 0, referer: https://www.mydomain.org/news/serendipi ... =addSelect
Directory permissions:
/news/uploads/ --> 777 owner me : group me
/var/tmp/ --> 777 owner root : group root
Surely this is Internal Server Error, but I don't know where I should tweak to solve this problem.
Any suggestions welcome
Thanks
Since I changed protocol from http to https some days ago, can't upload image. To solve the problem, I searched on the internet many times, but couldn't get an available answer at all. So post here.
Of course, when I have used http, any images could have been uploaded.
s9s says on admin panel>addmedia>brose.. and clicked [go] button.
" Unknown error occurred, file not uploaded. Maybe your filesize is larger than the maximum size allowed by your server installation. Check with your ISP or edit your php.ini file to allow larger file size uploads."
my environment:
Server: ubuntu 14.04.1
Apache 2.4.18
MySQL 5.6.30
PHP 5.6.20-1
php.ini :
file_uploads = On
;upload_tmp_dir = (commented out) probably used /var/tmp?
upload_max_filesize = 16M
max_file_uploads = 20
URL in s9y Configulation>Path>URL to blog ---> https://www.mydomain.org/news/
/news/ means s9y installed directory
Apache access log:
my.isp.jp - - [03/May/2016:23:03:32 +0900] "POST /news/serendipity_admin.php?serendipity[adminModule]=media&serendipity[sortorder][perpage]=8&serendipity[sortorder][order]=i.date&serendipity[sortorder][ordermode]=DESC& HTTP/1.1" 500 7597 "https://www.mydomain.org/news/serendipi ... =addSelect" "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:46.0) Gecko/20100101 Firefox/46.0"
Apache error.log:
[Tue May 03 23:11:07.687291 2016] [:error] [pid 2669] [client my.ip.addr.ess:55143] PHP Warning: Unknown: open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (/var/www/html/) in Unknown on line 0, refererer: https://www.mydomain.org/news/serendipi ... =addSelect
[Tue May 03 23:11:07.690349 2016] [:error] [pid 2669] [client my.ip.addr.ess:55143] PHP Warning: File upload error - unable to create a temporary file in Unknown on line 0, referer: https://www.mydomain.org/news/serendipi ... =addSelect
Directory permissions:
/news/uploads/ --> 777 owner me : group me
/var/tmp/ --> 777 owner root : group root
Surely this is Internal Server Error, but I don't know where I should tweak to solve this problem.
Any suggestions welcome
Thanks