Attachments contain no data
bgregoire - May 1, 2009 - 17:29
| Project: | Job Posting |
| Version: | 6.x-1.10 |
| Component: | User interface |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Description
I have setup the job posting module and we can create jobs fine. While testing the resumes attached to the applications I find that when I use a pdf, doc or txt file the fine end up empty. a 36k doc file with some test data in it is received as a 2b file with no data within the file. I have attached examples and a copy of our status page.
| Attachment | Size |
|---|---|
| example.zip | 1.93 KB |
| status page.JPG | 48.28 KB |

#1
I just tested it using the attachment word doc you supplied and did not encounter any problems with the received attachment: they are of equal size and content appears to be full intact. This was tested on a Debian machine running stable with the latest Drupal 6, using default drupal settings, a default non-admin registered user, and no other extra modules except job_posting.
Can you confirm that the attachment is being uploaded to the 'sites/default/files' directory (or whereever you have this set to)? Also might want to verify that this directory actually has write perms for the apache/php user. It's odd that you wouldn't have any other logged errors to report. Do you have admin-level access to the server?
Also it wasn't clear to me from your post: are you saying that none of the file formats (pdf, doc, txt) are working properly. Can you upload files through other drupal modules?
#2
digging deeper I found that the resume is being uploaded to the tmp folder on the server fine, I find the attachment and two other files along with the resume. just when it is mailed out the file becomes damaged.
#3
I have full admin right to the server and I can upload file with other Drupal modules fine. I can even attach documents when I create the job and that works fine. I have tried send pdf txt and doc files without any luck. I have posted below that I can find the files that are being uploaded in the tmp folder. In the event log it just said it sent the message with any errors listed.
#4
Okay so uploads work but can you confirm that the content in the renamed uploaded files is intact. Does it work if you chmod the tmp folder to 0777? Not sure what else to suggest...
#5
The content in the tmp folder is intact and fine. I have also changed the permissions to 0777 to the tmp folder and changed the owner from root to www-data but still the email I receive with the resume attached still is damaged and missing its data.
#6
I am using the SMTP authentication module to send my mail out, does this module work with that?
#7
I don't know...never used it. What happens when you disable the smtp auth module and try? In general, since this is obviously a testing environment you might want to consider trying it first with only the job_posting module and then adding back one at a time until you find the breakage. Just a thought...
#8
If I disable it, I can no longer send any mail. Perhaps that is the whole issue itself, the site was not able to send mail out by default. I researched the issue and was pointed to install the smtp module.
#9
So that was it, I changed the mail feature in Drupal to use the phpmailer module instead of the SMTP module and the attachments I receive are the full documents. Thank you for your help.
#10
Glad it's working for you now and thanks for posting as someone else will undoubtedly discover this sooner or later and may benefit from your experience.
#11