Page 1 of 1
Internal Server Error 500 when using copy()
Posted: Mon Sep 19, 2005 8:39 am
by mattcooper
Hi,
I'm having trouble getting some - but not all - files to copy from one folder to another upon a mkdir() command. Most copy over fine, but even though all files in the source folder are chmod777, they will not copy. Two are .php files, one is an .inc file.
Code contains sensetive URL's, so I'm afraid I can't post it here without serious editing, but everything appears to be fine, so I'm guessing the problem does indeed lie with the server.
Anyone have any tips?
Thanks in advance.
Posted: Mon Sep 19, 2005 8:42 am
by Jenk
As far as I am aware, the E500 error code is a very generic, essentially saying "Something broke on the backend"
My first guesses would be to
1.check the user permissions (which you have)
2.is the file in use and thus locked?
3.drive space?
And other such troubleshooting

Posted: Mon Sep 19, 2005 8:43 am
by feyd
Are the files it fails to copy consistent, through renaming, changing of source location, number of files? If it does, it's a server issue most often.
I'd like to understand why you need to copy the files.
Posted: Mon Sep 19, 2005 8:49 am
by mattcooper
Thanks guys.
I need to copy the files following the creation of a new folder, to keep things simple for the system my customer has requested. There is an admin page int he root folder of their site which gices the facility to create or delete files and folders. Each time a folder is created, several important files for the running of the admin suite need to be placed into it, and I'm doing that by copying generic files from a seperate folder.
I haven't checked that the location of the files is causing the problem yet, but most likely isn't. I know that the files are not currently in use, because nobody knows they exist yet!
Drive space is not an issue as our server has loads and loads left, and the files I'm copying are tiny anyway.
Posted: Mon Sep 19, 2005 8:52 am
by feyd
wouldn't it be better to keep those files in a central location and simply include them or something? Or are the "customized" to their new location? Even then, the customization can be performed by the file itself from a central location, most often.
Posted: Mon Sep 19, 2005 8:57 am
by mattcooper
OK, tried moving the files, and still a got an error on one in particular, which seems to crash the rest of the copying, so it seems to be that particular file. It has, however, been set to 744 - although when I try to set it to 777, I get the dreaded "Forbidden" or "500" message.
So what's up here?