• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.

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