i'm writing a php script here and i've run into one nasty problem.
essentially, the user will upload a file, and after some checking the file
will be copied to a spot in the file system and some info about it stored in
a mysql db.
but here's the kicker: what if the mysql insert dies for some reason? maybe
the guy did some bad formatting, or maybe the additional checks i run after
the file copy turn up negative.... the file's already been copied.
sure i can just write it so that it copies the file, then deletes it, then
copies the file again when all is ok, but there has to be a better way.
isn't there a way i can *test* to see if a cp will work withought acutally
copying the file?
since i can't move around the processes in my script, my only option is to
delete the file locally if there's an error... so i'm hoping for a better
alternative.
thanks for any help to the linux geeks out there.
--
things fall apart;
the centre cannot hold;
mere anarchy is loosed apon the world,
the blood-dimmed tide is loosed,
and everywhere the ceremony of innocence is drowned;
- w.b.yeats
--
[EMAIL PROTECTED] mailing list