• Plesk Uservoice will be deprecated by October. Moving forward, all product feature requests and improvement suggestions will be managed through our new platform Plesk Productboard.
    To continue sharing your ideas and feedback, please visit features.plesk.com

Question File Manager => Edit a php file doesn't work

PaulDurand

New Pleskian
Hi,

I downloaded php files of my website from my server 1 (Centos 6 - Release 3 OVH) to my server 2 (Centos 7 - Plesk Onyx 17.8.11) and I can't edit my php files from my server 2 "File Manager => Edit", my screen stay white below "Code Editor: my-domain.com / httpdocs / my_file.php" and I don't see my php code.

If I create a new php file from "File Manager => New => Create File", I can edit this file.

I tried to modify "Permissions", "Users" and "Group" same as the new php file created but I can't always edit my php files downloaded from my server 1, why?

My PHP version is 5.3.29 on my server 2 (Centos 7 - Plesk Onyx 17.8.11). Yes I say that it's an old PHP version outdated but I don't have the time for the moment to modify the PHP code of my website with a new PHP version.

Thank you for your help.

Paul
 
The symptom can be caused by the character encoding of the file content. It is possible that the .php file looks like a simple text file, but in reality, things are a bit weirder. Although two files seem to have the same content, their character encoding can be different. You might want to experiment a bit with iconv as described in this article to check what encodings the files have, maybe for testing purposes try to convert the problematic files to another encoding:
How to Convert Files to UTF-8 Encoding in Linux
 
Back
Top