在GoDaddy服务器上的虚拟主机ZenCart站,这几天发现不能上传图片,上传任何文件生成的小中大图都是空白的,而同一主机的ShopEx站批量上传(使用CSV)也一样无效,递交就返回:“无效文件”的提示。
经使用单独的PHP上传脚本测试,上传文件返回错误代码:6,与GoDaddy主机客服人员沟通,了解到是服务器没有将虚拟主机用户的临时目录添加权限,客服将虚拟主机的用户添加到上传用临时目录即解决。
给GoDaddy客服发邮件反馈问题:
Dear friend:
Thanks for your reply.
I repeatedly checked the coding and scripting. Finds no errors.
Now, the host still can not upload files via http mode.
Can you provide a short http upload code, test http mode can upload files
to prove whether the server is normal.My English is very bad
Thank you very much.
以下是GoDaddy客服的回信:
Dear Chen,Thank you for contacting Online Support.
Upon further review of the issue indicates the error was caused by a missing /tmp directory.
You currently have your script set to upload the images to this directory.
After adding the /tmp directory to your hosting account I am now able to upload a file.
Please let us know if you have any further questions, comments, or concerns.
Our service departments and telephone lines are open 24 hours a day,
365 days a year to accommodate your needs anytime.
You can reach us by phone at any time at (480) 505-8877,
or simply reply to this email.
Please let us know if we can assist you in any other way.
收到回信后测试下确实可以正常上传了。
需要注意的时,之前和GoDaddy主机的客服沟通过几次,都没有把问题解决,可能是邮件里没有把问题描述清楚,客服就一直说是我们站的脚本问题。