Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
Can't upload images in 4.0.5
I just created a new site using 4.0.5 and everything was going smoothly until I tried to upload an image. When I try to upload an image I get a message that the temporary directory is undefined and that I should set it in the advanced preferences. Well, there is an entry for the temporary directory in the advanced preferences and the diagnostics find it just fine. I tried opening the permissions up (777) on the location and that didn’t help, but then I took away write permissions (555) on the location and the diagnostics correctly reported that the location was not writable. Here is the relevant snip of my diagnostics output:
Textpattern version: 4.0.5 (r2466)
Last Update: 2007-07-27 01:58:38/2007-07-27 01:52:37
Document root: /home/users/web/b966/pow.elw/htdocs (/hermes/web07/b966/pow.elw/htdocs)
$path_to_site: /hermes/web07/b966/pow.elw/htdocs
Textpattern path: /hermes/web07/b966/pow.elw/htdocs/textpattern
Permanent link mode: year_month_day_title
Temporary directory path: /home/users/web/b966/pow.elw/htdocs/textpattern/tmp
Any thoughts or suggestions?
Thanks,
- Marc
Offline
Re: Can't upload images in 4.0.5
What happens if you set the temporary directory path to /hermes/web07/b966/pow.elw/htdocs/textpattern/tmp ?
Offline
Re: Can't upload images in 4.0.5
Same thing. That is actually what the path was set to originally, but I’ve got another site with the same hosting company running 4.0.4 that works with the /home… path so I changed it to see if that would fix it. It just seems odd that the diagnostics would find the correct path but the image upload would not.
- Marc
Offline
Re: Can't upload images in 4.0.5
What is the exact error message you get when uploading an image and does that occur as soon as you press the ‘upload’ button when uploading a new image?
Offline
Re: Can't upload images in 4.0.5
I just tried to upload a file as well and it failed saying just: “Failed to upload file test.txt”
I’m thinking these two problems are related.
- Marc
Offline
Re: Can't upload images in 4.0.5
Is that the complete error message? And what exact error message do you get when uploading images?
Offline
Re: Can't upload images in 4.0.5
Yes, that is the complete error message for the file upload. The actual error message from the image upload is: “Temporary directory undefined, please update your Advanced Preferences.”, and yes, it happens as soon as I click the upload button.
- Marc
Offline
Re: Can't upload images in 4.0.5
I think this is problem with uploading through PHP in general on your website, not related to TXP.
Can you put the code below in a file called upload.php, save it on your website, open it in your browser, try to upload a file and tell us what it shows at the top of the page.
<html><head><title>upload test</title></head><body>
<pre><?php echo var_dump($_FILES); ?></pre>
<form enctype="multipart/form-data" action="" method="POST">
<input name="myfile" type="file" />
<input type="submit" value="Upload" />
</form>
</html>
And try if putting this in your .htaccess file helps:
php_value upload_tmp_dir /home/users/web/b966/pow.elw/htdocs/textpattern/tmp
Last edited by ruud (2007-07-29 18:06:33)
Offline
Re: Can't upload images in 4.0.5
Oh, I really hate when I’m the “user” in “user error”. ;-)
I created the upload.php as you suggested and it gave me error code 6 (UPLOAD_ERR_NO_TMP_DIR), so I started looking into that. Then I decided to try the upload.php script on my other site, just to see what would happen. Well, it was successful and when it showed me the ‘temp_name’ value I realized what I had done. It pointed to ‘/…/htdocs/cgi-bin/tmp’. Long story short, I had deleted the ‘cgi-bin/tmp’ directory when I was cleaning up files from a previous site thinking it was just something I didn’t need any more.
Sorry for wasting all of your time on my mistake. I really appreciate all of your help though.
Thanks,
- Marc
Offline
Pages: 1