We’ve been experiencing a really weird error where if you install or upgrade DukaPress via FTP it seems to break the whole site and gives an error like this one:
Parse error: syntax error, unexpected T_IF in /home/duka1/public_html/demo2/wp-content/plugins/dukapress/php/dp-payment.php on line 1
The problem seems to be that as the FTP client uploads dp-payment.php, it corrupts that file.
The problem comes about because the FTP client is using the ASCII transfer type. This sometimes causes files to be corrupted.
- Change your FTP transfer type to “Binary” and re-upload
- Upload your plugin via a method other than FTP (The WordPress internal installer works GREAT)
Another solution: you need to find a way to replace the broken dp-payment.php with a copy that works. This can be done easily via “File Manager” type of programs on your server or via the WordPress plugins editor.
Hint: If this happens, you can quickly “restore” your website by renaming the DukaPress folder on your server. This disables the DukaPress plugin without forcing you to delete it from your server.