Forums

Strange attachments issue

antigeek 13 Dec, 2013
Hi

I am having a strange issue with form attachments working when site is hosted on one domain and not the other. First a bit of history...

The site/form attachments were working fine on my local server...moved it to a live testing server, still working....moved it to my live site and while the form sends ok the attachments just seem to disappear
...moved that site to the local server again and attachments no longer work?....but still working at the live testing site

Here is the debug of my local site
Data Array:

Array
(
    [chronoform] => test
    [event] => submit
    [Itemid] => 223
    [option] => com_content
    [view] => article
    [id] => 20
    [nametest] => Greg
    [emailtest] => greg@someaddress.com
    [phonetest] => 0404858693
    [subjecttest] => Test2
    [messagetest] => Test with debugger
    [file_uploadtest] => 
    [file_upload2test] => 
    [file_upload3test] => 
    [chrono_verification] => E8vVt
    [input_submit_7] => Submit
    [88d1ed4817fed16b0050e4035850e8ab] => 1
    [layout] => default
    [igsource] => plugin
    [_PLUGINS_] => 
    [chronoform_data] => Array
        (
            [cf_uid] => c0beb75d314178890e22093908513166
            [cf_created] => 2013-12-13 15:12:17
            [cf_created_by] => 0
            [cf_ipaddress] => 127.0.0.1
            [cf_user_id] => 0
            [chronoform] => test
            [event] => submit
            [Itemid] => 223
            [option] => com_content
            [view] => article
            [id] => 20
            [nametest] => Greg
            [emailtest] => greg@someaddress.com
            [phonetest] => 0404888888
            [subjecttest] => Test2
            [messagetest] => Test with debugger
            [file_uploadtest] => 
            [file_upload2test] => 
            [file_upload3test] => 
            [chrono_verification] => E8vVt
            [input_submit_7] => Submit
            [88d1ed4817fed16b0050e4035850e8ab] => 1
            [layout] => default
            [igsource] => plugin
            [_PLUGINS_] => 
            [cf_id] => 4
        )

    [chronoform_data_cf_id] => 4
)

Validation Errors:

Array
(
)

Thank you for your enquiry.
One of our staff will be in touch soon.

Kind Regards
Earthlift
Debug Data

    Core Captcha
        Passed the core captcha check!
    email
        10
            Result An email has been SENT successfully from (Earthlift)enquiries@someaddress.com to greg@someaddress.com
            Body
            Name 	Greg
            Email 	greg@someaddress.com
            Phone 	0404888888
              	 
            Subject 	Test2
            Message 	Test with debugger
              	 
            Upload a file 	
            Upload a file 	
            Upload a file 	


            Submitted by 127.0.0.1
            Attachments array ( )
    redirect_user
        Error: No Redirect URL found



Fields configuration (file upload action):

file_uploadtest:jpg-jpeg-png-gif-doc-docx-pdf-xls-rtf-txt,file_upload2test:jpg-jpeg-png-gif-doc-docx-pdf-xls-rtf-txt,file_upload3test:jpg-jpeg-png-gif-doc-docx-pdf-xls-rtf-txt

Attachments field name (email action)
file_uploadtest,file_upload2test,file_upload3test

Template(email action)
<table border="0" cellspacing="5" cellpadding="5">
<tbody>
<tr>
<td><strong>Name</strong></td>
<td>{nametest}</td>
</tr>
<tr>
<td><strong>Email</strong></td>
<td>{emailtest}</td>
</tr>
<tr>
<td><strong>Phone</strong></td>
<td>{phonetest}</td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td><strong>Subject</strong></td>
<td>{subjecttest}</td>
</tr>
<tr>
<td><strong>Message</strong></td>
<td>{messagetest}</td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td><strong>Upload a file</strong></td>
<td>{file_uploadtest}</td>
</tr>
<tr>
<td><strong>Upload a file</strong></td>
<td>{file_upload2test}</td>
</tr>
<tr>
<td><strong>Upload a file</strong></td>
<td>{file_upload3test}</td>
</tr>
</tbody>
</table>


And heres the screens of my setup are attached
[attachment=1]Screen Shot 2013-12-13 at 3.25.32 pm.png[/attachment]
[attachment=0]Screen Shot 2013-12-13 at 3.25.24 pm.png[/attachment]


Ive been pulling my hair out trying to solve this and even my server hosts are unable to shed any light (both live and testing sites are hosted with the same company) So any assistance or suggestions you can provide greatly appreciated!

Let me know if you need further info
GreyHead 22 Dec, 2013
Hi antigeek,

It sounds as though there may be a Permissions problem with the uploaded files folder (or the temporary folder that PHP uses). Please add Custom Code action to the form On Submit event with this code in it and see what output it gives when you try to upload file.
<?php
echo'<div>$_FILES: '.print_r($_FILES, true).'</div>';
?>

Bob
This topic is locked and no more replies can be posted.