Issue in modifying php agi file

Facing issue whenever we modify php agi file it does not work in asterisk and this is intermittent.

So I copy all the data and paste it to another file and rename that file to the existing one and then it works fine

FYI, I use dreamviewer editor to edit or modify the file

Without no logs or any cli output it is hard to debug and help, but this seems to be an issue not related to Asterisk verify your script runs from the php cli just fine

It’s probably due to the security on the file. If the asterisk user isn’t able to execute it, it probably won’t run. You can either “chown” to the same user asterisk runs as, make sure the z flag is on for that user or group, or (not recommended but would work), “chmod 777 filename.php” after it gets edited. I don’t use dreamweaver, but there’s probably somewhere in it that lets you choose the username/password to connect to the asterisk server as. If you can, just connect as that user.