[2.5] Plugin update and temporary directories
-
I’ve tried to use the automatic plugin update script, but ran into some trouble which might be worth looking into.
I’m using a setup where the standard system temp dir ( for some reasons ) isn’t writable, so you get error like these:
Warning: tempnam() [function.tempnam]: open_basedir restriction in effect. File(/var/tmp/) is not within the allowed path(s): (/home/bla:/home/bla/public_html/include) in /home/bla/public_html/wp25/wp-admin/includes/file.php on line 321
For that I’ve set the WP_TEMP_DIR constant to a writable map. This takes me one step further to where the download is tried to be saved. Due to the $wp_filesystem _ $method this one is handled by the FTP class in wp-admin/includes. This one uses a different constant name FTP_BASE ( is that correct? ). Otherwise this step won’t work.
it both generates the error: ‘Unable to locate WordPress directory.’, but the error is generated firstly on file.php and in the second case on class-wp-filesystem-ftpext.php
The problem is when both are set the whole function (download goes correct – I checked ) stop when for some reason it cannot extract the zip file ( unable to copy zip-file ).
I cannot see why not, the zip-file is there. Both constants point to the same map and yet the function keeps on looking for /var/tmp as the map to go, while it uses get_tmp_dir() to get a temp location in any way. Both are outputting that correctly.
This perhaps might be something you want to document as well as probably more people will have problems with it 🙂
- The topic ‘[2.5] Plugin update and temporary directories’ is closed to new replies.