add this to wp-config.php
define(‘WP_TEMP_DIR’,’/tmp’);
should work
if not, replace it with
define('WP_TEMP_DIR', ini_get('upload_tmp_dir'));
Thread Starter
penfil
(@penfil)
@samboll
I already tried the second function you listed:
define('WP_TEMP_DIR', ini_get('upload_tmp_dir'));
The results are listed in my original post.
As for the first command you suggested:
define('WP_TEMP_DIR','/tmp');
I get even more errors, as follows:
Warning: touch(): open_basedir restriction in effect. File(/tmp/1233258421) is not within the allowed path(s): (/usr/local/pem/vhosts/154599) in /usr/local/pem/vhosts/154599/webspace/httpdocs/wordpress/wp-admin/includes/file.php on line 174
Warning: fileowner(): open_basedir restriction in effect. File(/tmp/1233258421) is not within the allowed path(s): (/usr/local/pem/vhosts/154599) in /usr/local/pem/vhosts/154599/webspace/httpdocs/wordpress/wp-admin/includes/file.php on line 628
Warning: unlink(): open_basedir restriction in effect. File(/tmp/1233258421) is not within the allowed path(s): (/usr/local/pem/vhosts/154599) in /usr/local/pem/vhosts/154599/webspace/httpdocs/wordpress/wp-admin/includes/file.php on line 630
Warning: touch(): open_basedir restriction in effect. File(/tmp/1233258421) is not within the allowed path(s): (/usr/local/pem/vhosts/154599) in /usr/local/pem/vhosts/154599/webspace/httpdocs/wordpress/wp-admin/includes/file.php on line 174
Warning: fileowner(): open_basedir restriction in effect. File(/tmp/1233258421) is not within the allowed path(s): (/usr/local/pem/vhosts/154599) in /usr/local/pem/vhosts/154599/webspace/httpdocs/wordpress/wp-admin/includes/file.php on line 628
Warning: unlink(): open_basedir restriction in effect. File(/tmp/1233258421) is not within the allowed path(s): (/usr/local/pem/vhosts/154599) in /usr/local/pem/vhosts/154599/webspace/httpdocs/wordpress/wp-admin/includes/file.php on line 630
AND
Warning: ftp_rawlist(): open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (/usr/local/pem/vhosts/154599) in /usr/local/pem/vhosts/154599/webspace/httpdocs/wordpress/wp-admin/includes/class-wp-filesystem-ftpext.php on line 203
Warning: ftp_rawlist(): Unable to create temporary file. Check permissions in temporary files directory. in /usr/local/pem/vhosts/154599/webspace/httpdocs/wordpress/wp-admin/includes/class-wp-filesystem-ftpext.php on line 203
And yes, I did go as far as to create the tmp directory and give it the appropriate permissions.
I think the problem is that the webhost (AllDomains) did not properly set up a tmp dir for this account, or something in the php.ini is wrong… But I don’t know how to fix it… or bypass it…
Any other suggestions? Anyone?
or they really have the restriction in effect
ask them – your host
Thread Starter
penfil
(@penfil)
@samboll – Are you kidding me?! I have called them before… Several times… They will not help with anything that is not specifically included with their “scripts” package. Since I installed WordPress 2.7 on my own (since they don’t offer it), they will not help with anything.
They had a server problem with .htaccess files and I called about that and I had to call 3 times just to speak to a manager so he would “look into it” and miraculously it was fixed the same hour (without any admission of fault on their part).
Isn’t there some other way I can get the auto-update to work without using the php.ini defined temp directory? Even if it requires hacking a few additional WP files… I can handle that… Just need to know what I’m looking for.
Thread Starter
penfil
(@penfil)
@samboll – Thank you for the link. I read it and it all makes much more sense now. It looks like unless I can find a work around, I’m just out of luck. This webhost is really not very friendly or helpful.
Thanks again.
If anyone knows a way around this, I’d be happy to know. Meanwhile I’ll be wasting my time on the phone with a tech support who pretty much refuses to budge.
You could do what I do: Pretend the auto-upgrade feature was never added. It’s broken on a mega-ton of Web hosting sites and it’s broken if you implement strong file permissions security on your site.
Better to manually handle upgrades. For now anyway. Until somebody gets the idea to fix the WP upgrade code so that it actually tests for compatibility FIRST before proceeding to break stuff and generate a lot of support requests….
Thread Starter
penfil
(@penfil)
@wpsec – You make a great point. I guess I don’t have much else of an option at this point. I guess I was just getting spoiled with that feature when updating some other peoples blogs for them… manual it is.
If they tested for compatibility first as you mentioned, at least then they could allow a link to the actual plugin repository page for the plugin in need of an upgrade. Have to go search for it manually to download it now, can’t even click on the link to it as it’s only setup for the auto-update.
Well thanks for your help.
Thread Starter
penfil
(@penfil)
I’m going to mark this “resolved” even though the problem really isn’t resolved… Not much the community can do to help at this point, so no sense in keeping this in limbo.
Thanks guys for all your help.
I had a quick google around, and the culprit seems to be the php function ftp_rawlist() which in turn ignores WP_TEMP_DIR completely.
Here is my workaround:
putenv('TMPDIR=' . ini_get('upload_tmp_dir'));
Added to wp-config.php.
It seems to work, I got updates to finally work.
Cheers,
Mike
Mark
(@codeispoetry)
Thanks lightwolf, that saved me a lot of headaches!
Thanks guys for all your help. Special to lightwolf. That’s tip working for me fine now:)
Thanks Lightwolf! It worked for me:)
i still get this
Warning: ftp_rawlist() [function.ftp-rawlist]: Unable to create temporary file. Check permissions in temporary files directory. in /is/htdocs/wp1090696_F7DLCX6X2Y/www/wp-admin/includes/class-wp-filesystem-ftpext.php on line 203 even after Lightwolf’s hack.
any ideas?
thanks.
c
Thanks Lightwolf…you saved me some time and bald spots…