mansj / enable-media-replace

***DEVELOPMENT DISCONTINUED*** Enable Media Replace, a WordPress plugin to make it possible to replace uploaded media files in a simple way.
GNU General Public License v2.0
28 stars 27 forks source link

chmod() warning #11

Closed eugenealegiojo closed 9 years ago

eugenealegiojo commented 9 years ago

I received a warning when I tried to 'Replace the file, use new file name and update all links'. Here is the exact warning message:

Warning: chmod(): No such file or directory in /xx/xx/public_html/wp-content/plugins/enable-media-replace/upload.php on line 125

Which results to another warning 'headers already sent' and unable to continue the process.

Do you know how to fix this? I tried to chmod the parent directory but still no luck. For the meantime I added a temporary fix by adding '@' before 'chmod' just to disable the warning message.

Please let me know if you have the fix. Thanks.

mansj commented 9 years ago

This would mean that your file is no longer residing in the location WordPress thinks it is - i.e. it has been moved after upload. The location is stored in the database, and if chmod() does not work, it's because it's attempting to chmod a file in the location the database claims it is in.