• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

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