robert_gsfame Posted July 15, 2010 Share Posted July 15, 2010 I got this error suddenly! ERROR Warning: copy() [function.copy]: Filename cannot be empty i try to put upload_max_filesize = 2M in php.ini but error still there i need some helps thx Quote Link to comment https://forums.phpfreaks.com/topic/207789-need-helps-error-warning-copy-functioncopy-filename-cannot-be-empty/ Share on other sites More sharing options...
dezkit Posted July 15, 2010 Share Posted July 15, 2010 Post code, error occurs because copy() is empty Quote Link to comment https://forums.phpfreaks.com/topic/207789-need-helps-error-warning-copy-functioncopy-filename-cannot-be-empty/#findComment-1086238 Share on other sites More sharing options...
Pikachu2000 Posted July 15, 2010 Share Posted July 15, 2010 "Filename cannot be empty" is what the error says. Why do you think it has something to do with the php.ini file? Please post the relevant code. Quote Link to comment https://forums.phpfreaks.com/topic/207789-need-helps-error-warning-copy-functioncopy-filename-cannot-be-empty/#findComment-1086239 Share on other sites More sharing options...
robert_gsfame Posted July 15, 2010 Author Share Posted July 15, 2010 error occurs on line 916, and this is my code for that line if (copy($HTTP_POST_FILES['ufile']['tmp_name'][0], $path1)){ echo "<b>Logo Uploaded</b>"; Quote Link to comment https://forums.phpfreaks.com/topic/207789-need-helps-error-warning-copy-functioncopy-filename-cannot-be-empty/#findComment-1086241 Share on other sites More sharing options...
robert_gsfame Posted July 15, 2010 Author Share Posted July 15, 2010 i already run my website for more than 1 year n nothing went wrong...no error, but suddenly i got this kind of error this morning Quote Link to comment https://forums.phpfreaks.com/topic/207789-need-helps-error-warning-copy-functioncopy-filename-cannot-be-empty/#findComment-1086243 Share on other sites More sharing options...
PFMaBiSmAd Posted July 15, 2010 Share Posted July 15, 2010 $HTTP_POST_FILES was depreciated really long ago in php4.1, turned off by default in php5.0, finally throws a depreciated error if turned on in php5.3, and has been completely eliminated in upcoming php6. Is there some reason why you have not updated your code to use $_FILES? In addition to that, it would appear that your code likely does not have any error checking logic in it to prevent accessing a non-existent uploaded file or to tell you when an upload fails. Quote Link to comment https://forums.phpfreaks.com/topic/207789-need-helps-error-warning-copy-functioncopy-filename-cannot-be-empty/#findComment-1086245 Share on other sites More sharing options...
robert_gsfame Posted July 15, 2010 Author Share Posted July 15, 2010 so which part should be modified then??? Quote Link to comment https://forums.phpfreaks.com/topic/207789-need-helps-error-warning-copy-functioncopy-filename-cannot-be-empty/#findComment-1086253 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.