php - Error when unzipping a group of images -
I am importing public domain books from archive.org to my site, and a php import set to do this Script is however, when I import and run images
exec ("unzip $ images_file_arg -d $ book_dir_arg", $ output, $ position); This will sometimes give me back a $ 1 status. Is this okay? I have not had any problems with imported images so far. I looked at the man page to open, but he did not tell me much, could it possibly cause problems, and do I have to check each picture individually or am I safe?
edit : oh I should have checked the manpage directly. They tell us what the error code means: The exit status (or error level) estimates the exhaust code defined by Pekwire and under VMS, the following values are taken:
-
General; No errors or warnings found.
-
One or more warning errors were encountered, but the resource was successfully completed in any way. Includes zipfiles, where one or more files were omitted due to an unsupported compression method or an encryption with unknown passwords.
-
A common error in the zipfile format was detected processing could be completed successfully in any way; Some broken zipfiles created by other archives have simple working environments.
-
A serious error was detected in the zipfile format. Processing probably failed immediately
(too much)
So, apparently in some archives, they had to have a file, but the zip was not broken down; It just did it all did it.
This should really work, but there are complications with some file names. Any of them are potentially difficult with unusual characters? Certainly there is something to look for if you get a bad return status, you should be worried because it means that some error or zip has gone out at the very least, I suggest. I want you to log in those files (file) ( error_log ($ filename) ) and see if any problems can arise. The zipper runs itself independently and if it passes the right arguments by the shell, then everything will be fine, and the files are actually ready to download and unzip.
Comments
Post a Comment