View Full Version : WP Thicko needs help
Dawg
1st April 2009, 21:22
I'm trying to upload a table using the WP-Table plugin and keep getting this:
Warning: move_uploaded_file(/mounted-storage/home15c/sub002/sc12994-SOJG/ketsu.co.uk//mounted-storage/home15c/sub002/sc12994-SOJG/ketsu.co.uk/wp-content/uploads/contacts-tester.csv) [function.move-uploaded-file]: failed to open stream: No such file or directory in /mounted-storage/home15c/sub002/sc12994-SOJG/ketsu.co.uk/wp-content/plugins/wp-table/wp-table-admin.php on line 170
Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/shared/upload_tmp/phpBVeLrG' to '/mounted-storage/home15c/sub002/sc12994-SOJG/ketsu.co.uk//mounted-storage/home15c/sub002/sc12994-SOJG/ketsu.co.uk/wp-content/uploads/contacts-tester.csv' in /mounted-storage/home15c/sub002/sc12994-SOJG/ketsu.co.uk/wp-content/plugins/wp-table/wp-table-admin.php on line 170
Can someone shed some light please, (or suggest another way of putting a table (for membership) in a WP site?
Thanks.
Can't be certain, Dawg, 'cos I don't know and can't see your setup. But it looks like a permissions problem. Not convinced it's a DB one. More likely file system. What access do you have to reset them?
Dawg
1st April 2009, 21:36
I can change any permissions via the hosts CP filemanager.
OK. Change the whole ownership with something like chown -R myusername:www-data dir-name/ {dir-name=WP root directory} if it' a Debian Linux based system. Change or keep www-data for other distributions. Provided you have root access /etc/apache2/apache2.conf will show the default user and group.
Uploading, you need the file permissions for access to your web space or you will not be allowed in, so you won't be able to run databse commands from there.
There is a problem with the filename being repeated and I'm just too tired, it's too late, to think abot whether it's a symptom of the same thing.
Interconnect IT
1st April 2009, 22:40
Odd.
Can you upload images OK?
On some hosts it's necessary to set the uploads folder as 777. Others 655 is enough. Really does depend. It's hard to be precise without a good look at your setup, sadly.
Dawg, it gets confusing to explain in this sort of environment. I was about to start explaining about permissions and realised that was more likely to confuse than enliighten. Tell us which distro your server is running and which versions of PHP and MySQL, assuming you're running a standard WP install, and we'll help you sort it out. :)
But tomorrow, please. I'm cream crackered and off to bed. G'night. ;)
Dawg
2nd April 2009, 09:00
MKE:
I'm sorry but I tripped over my level of competence and floundered after your post, #4. The permissions I thought you were referring to were the 665/777 type settings for access.
Anyway:
Distro: all I find is Linux, it's on Servage (http://www.servage.net/)
mySQL: 5, (5.0.51a ?)
PHP: 5.2
The problem happens on two themes, Dovetail and Redoable, so I'm thinking (see below) it is me not setting the permissions correctly.
I have set the
wp-content/plugins/wp-table/wp-table-admin.php
wp-content/plugins/wp-table/wp-table-import.php
wp-content/plugins/wp-table/wp-table-install.php
all to 777
Interconnect IT:
Please sit down, v. newb Q: Where do I find the wp-content/uploads folder to check/change permissions?
I can't see it Dashboard/editor on WP, in the CP of the Servage host, or in either FTP window, (Filezilla).
Thanks.
Interconnect IT
2nd April 2009, 09:25
Eeek - never set any php code to 777. Set it right back to what it was!
If you can't find the uploads folder, then you need to create it, then set it to 777. You can do that easily in FileZilla.
If your server's permissions are relatively strong, then WP won't have been able to create the uploads folder.
Whatever you do, that should be the only folder or file that can be 777 on any WP install. However, you can always ratchet up the permissions. Starting with the default on your server and seeing what happens.
Dawg
2nd April 2009, 10:09
OK, permissions back to sanity, wp-content/uploads folder created with 777 permissions, (created in CP, checked in FTP): still no joy.
Message reads:
"Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/shared/upload_tmp/phpU3CJpi' to '/mounted-storage/home15c/sub002/sc12994-SOJG/ketsu.co.uk//mounted-storage/home15c/sub002/sc12994-SOJG/ketsu.co.uk/wp-content/uploads/contacts-tester.csv' in /mounted-storage/home15c/sub002/sc12994-SOJG/ketsu.co.uk/wp-content/plugins/wp-table/wp-table-admin.php on line 170"
ERROR : File cannot be saved. Check the permission of the wordpress upload folder
Lines 168-177, (as above), read:
if($_FILES['csv_file']['error']== 0) {
// if($_FILES['csv_file']['type'] == 'text/plain') {
move_uploaded_file($_FILES['csv_file']['tmp_name'], $csv_file); // save temp file
if (file_exists($csv_file)) {
show_csv_preview($csv_file, $import_table, $delimiter);
$mode ='none';
} else $text = '<font color="red">'.__('ERROR : File cannot be saved. Check the permission of the wordpress upload folder','wpTable').'</font>';
// } else $text = '<font color="red">'.__('ERROR : This is not a plain text file. Your server said this is a ','wpTable').$_FILES['csv_file']['type'].'</font>';
} else $text = '<font color="red">'.__('ERROR : File not found :','wpTable').$csv_file.'</font>';
break;
Please don't go too far with this: I would like to know as it's a learning curve and getting things right is always good...but I can always copy/paste the table in. Not elegant but...:)
...from the code is the csv not being recognized? Thats what (a csv) the plugin asks for..
Interconnect IT
2nd April 2009, 10:13
Could be a problem with /shared/upload_tmp/ what are the permissions on that?
Also, can you actually attach an image to a post?
Dawg
2nd April 2009, 10:27
Sorry Dave,
where do I find '/shared/upload_tmp/'? (/shared/upload_tmp/ as part of this thread is #3 in Google!)
Yes I can load pics both to posts and to pages, and they are being stored in the new uploads folder.
Interconnect IT
2nd April 2009, 11:13
Oh that's interesting - looks like the plugin isn't using the correct paths. That may be something to do with your hosting, or something else. Can you find this path in the plugin's config screens? If so you might need to give it a different path name. Maybe.
Tricky one to debug. I suspect the code is doing something badly, or with a poor assumption made.
Dawg
2nd April 2009, 11:58
I think it might be best to discontinue for a couple of reasons:
This is an old plug-in which hasn't been supported since before WP2.6, let alone 2.7
A combination of my ignorance and working by forum interchange is going to/might waste a lot of other people's valuable time.
As mentioned, there is the copy/paste workaround, (which visually looks niftier), so with many thanks we'll detabulate this query..
(I'm a little surprised there isn't an alternative plugin to do this, or an easily found one at the least.)
Thanks again.
Interconnect IT
2nd April 2009, 12:17
If all you want to do is add a table in with raw data (not from a database) then better to get a plugin that extends the tinyMCE functionality and activates the table button. There's a few options out there, some better than others. We don't use any of them, to be honest.
Look for tinyMCE advanced - might be what you need. Not sure whether it interferes with captions and the like though.
Rags
2nd April 2009, 14:59
I've been happy with (the dubious-sounding) fckeditor plugin - produces tables in a snap. (not database-populated ones of course)
Just a note on permissions. 1 is execute. Only directories (folders) ever require execute permissions so if you ever find a file, which is usually anything with a dot and a three digit suffix, e.g. myfile.php or mypic.jpg, reduce its permissions by one. That goes for first second or third in the row. e.g.665 is all, all, read+execute. Get it down to read only.
Yes, Dawg, I looked on the host's site and no mention of distruibution. Not to worry, if you're using their control panel and ftp rather than command line there's no real need for you to know.
Other than that it seems you're being looked after. Sorry, been busy all day. First time I've logged in.
kozrak
1st May 2009, 21:24
thicko ? i am more polite and call myself a novice