Saving work and after a little time it reverts back to original

Two files open saving my work and after a little time it reverts back to original

0
2 comments
Hello,

Could you share the log files so I'll have a look into this?

Help | Collect Logs and Diagnostic Data

Logs can be uploaded directly to our server - https://uploads.jetbrains.com (make sure to share the id of the upload here so that I can find it).
0

Hello Atransaction647,

The log shows that Windows does not let PhpStorm write to the project folder, C:\inetpub\wwwroot\ProjectName. Every save fails, so your edits exist only in the editor. When PhpStorm reloads the file from disk, or after a restart, the old content comes back. That is why your changes appear to revert.

Every save failure in the log is an AccessDeniedException in this folder, e.g.:

com.intellij.openapi.diagnostic.UnhandledException: Cannot save C:\inetpub\wwwroot\yourDirectoryName\fileName.php.
Unable to create a backup file (fileName.php~).
The file left unchanged.
...
Caused by: java.nio.file.AccessDeniedException: C:\inetpub\wwwroot\yourDirectoryName\fileName.php -> C:\inetpub\wwwroot\yourDirectoryName\fileName.php~

PhpStorm also cannot write the .idea folder of the project, so it does not keep your project settings between sessions.

C:\inetpub\wwwroot is the IIS web root, and Windows usually restricts write access to it for standard user accounts. To fix the permissions:
1. Move the project to a folder in your user profile, for example C:\Users\<your user>\Projects\ProjectName. Then point the IIS site to that folder, or set up a deployment configuration that uploads the files to the web root.
2. Alternatively, give your Windows account the Modify permission on C:\inetpub\wwwroot\ProjectName.
In addition, please make sure that Windows Defender or any other antivirus does not block phpstorm64.exe.

0

Please sign in to leave a comment.