Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2010-09-24 04:23:23
- nemozob
- Member
- Registered: 2008-04-15
- Posts: 36
[Solved] Can't upload images or files, no errors in diagnostics
If I try to upload an image I get:
Warning: getimagesize() [function.getimagesize]: Filename cannot be empty in /usr/home/franto/www/htdocs/textpattern/include/txp_image.php on line 843
If I try to upload a file I get no error but the file doesn’t upload.
Based on other posts it seems like it’s an issue with the ‘tmp’ directory but I get no errors in the Diagnostics tests. Since /tmp didn’t work I’ve pointed the ‘tmp’ directory inside the /textpattern directory and have tried various permissions settings including 777.
Here’s the first few lines of output of the Diagnostics…
Textpattern version: 4.2.0 (r3275)
Last Update: 2010-07-17 17:33:06/2010-08-28 07:00:38
Document root: /usr/home/franto/www/htdocs
$path_to_site: /usr/home/franto/www/htdocs
Textpattern path: /usr/home/franto/www/htdocs/textpattern
Permanent link mode: section_title
Temporary directory path: /usr/home/franto/www/htdocs/textpattern/tmp
Any ideas?
Last edited by nemozob (2010-09-26 18:21:11)
Offline
#2 2010-09-26 18:20:15
- nemozob
- Member
- Registered: 2008-04-15
- Posts: 36
Re: [Solved] Can't upload images or files, no errors in diagnostics
I’m not sure if this was the best way to fix the problem but in my case I was able to edit the php.ini file and include:
upload_tmp_dir = /usr/home/franto/www/htdocs/textpattern/tmp
and this solved my problem. Hope it can help someone else.
Offline
Re: [Solved] Can't upload images or files, no errors in diagnostics
Another possible solution to this is to physically create a tmp directory in the web root or textpattern directory and point to this accordingly from the admin prefs. however, the idea is not elegant and a possible security risk, as the new tmp folder needs priviledges set to 777 and is therefore completely open to hacking.
NOT RECOMMENDED, just mentioning, if you need to work on for a minute.
A hole turned upside down is a dome, when there’s also gravity.
Offline