开发者

PHP includes stops file from uploading

开发者 https://www.devze.com 2023-03-18 01:31 出处:网络
I just transferred a website to a new server and have a strange problem. On all of the pages that have a PHP include command, the file stopped uploading, and cut off everything from that line of PHP d

I just transferred a website to a new server and have a strange problem. On all of the pages that have a PHP include command, the file stopped uploading, and cut off everything from that line of PHP down. Not just when executing, but when uploading the file via FTP. I can remove the include command, and it uploads the ful开发者_如何学Gol 4KB page, but with it, the page only uploads the 1KB before the command. What gives?

allow_url_include is turned on, the file that's included is just basic HTML, and it worked fine on the old server... I've never been unable to upload a file because of a problem in the code before. Any ideas?


That might be a security measure from the hosting company. It is a common attack vector to brute-force FTP passwords then add/modify PHP scripts to include() malicious code from another compromised server.

I would contact the hosting company and ask them. They may have to lower their security for you, add your IP address to a whitelist, or provide an alternative method for uploading files (SSH/SFTP for example).

If you can't contact the system administrator and have SSH access then try connecting by SFTP and uploading again.

0

精彩评论

暂无评论...
验证码 换一张
取 消