another file file upload question > please help

gordonling 26 Jun, 2007
Firstly, thank you for saving my life. But then again, I need another lifesaver(!) Attached the html codes that I have prepared in the Form Code Tab>Form HTML field.
<h3>You can submit your artwork online!</h3>
Personal Details<br />
  <br />
  Full Name<br /><input name="name" type="text" id="name" size="50" />
  <p>ID card no<br /><input name="ID_no" type="text" id="id_no" size="50" />
  </p>
  <p>Email add<br /><input name="email" type="text" id="email" size="50" />
  </p>
  <p>Contact Number<br /><input name="contact_no" type="text" id="contact_no" size="50" />
  </p>
  <p>college or university name<br />
    <input name="college_uni" type="text" id="college_university" size="50" />
  </p>
  <p>course name<br />
    <input name="course_name" type="text" id="course_name" size="50" />
  </p>
  <p>
    address (first line)
    <input name="address1" type="text" id="add_one" size="35" />

    <br />
    address (second line)
    <input name="address2" type="text" id="add_two" size="35" />
  </p>
  <p>
    <input name="postcode" type="text" id="postcode" value="postcode" size="10" maxlength="8" />
    <input name="town_city" type="text" id="town_city" value="town/city" size="21" />
    <input name="city" type="text" id="state" value="state" size="18" />
  </p>
  <p>
<input name="country" type="radio" id="malaysia" value="malaysia" />
Malaysia
<br />
<input name="country" type="radio" id="singapore" value="singapore" />
Singapore
    <br />
<input name="country" type="radio" id="thailand" value="thailand" />
Thailand</p>
  <hr />
  <p><b>Upload file </b></p>
  <p>
    Upload file
    <input name="file" type="file" size="50" />
  </p>
  <hr />
  <p>Submission</p>
  <p>1)	All image files must be in CMYK, 300dpi, tiff format, 16.5cm in width, 16cm in height.<br />
  2)	File name: name.tiff (e.g.: johndoe.tiff).<br />
  3)
  Send in your entries by September 10, 2007. </p>
  <p>
    <label>
    <input type="submit" name="Submit" value="Submit" />
     </label>
     <input type="reset" name="Submit2" value="Reset" />
    <br />
  </p>
The rest of the fields are empty and i have included the Element titles. While the Auto generated fields are as below:

<?php 
	global $database;
$database->setQuery( "INSERT INTO #__chronoforms_1 VALUES  (
'' , '". date('Y-m-d')." - ".date("H:i:«»s"«»)."' , '".$_POST['form1']."' , '".$_POST['name']."' , '".$_POST['ID_no']."' , '".$_POST['email']."' , '".$_POST['contact_no']."' , '".$_POST['college_uni']."' , '".$_POST['course_name']."' , '".$_POST['address1']."' , '".$_POST['address2']."' , '".$_POST['postcode']."' , '".$_POST['town_city']."' , '".$_POST['city']."' , '".$_POST['country']."' , '".$_POST['file']."' , '".$_POST['Submit']."' , '".$_POST['Submit2']."');" );
if (!$database->query()) {
echo "<script> alert('".$database->getErrorMsg()."'); window.history.go(-1); </script>
";
}
?>


I got the email with the results displayed in the tables from the form management tab. But I'm not sure where did the file uploads go. I have checked the upload directory via ftp for the chronocontact component but it is seen nowhere.

I'm quite new to this component. Can somebody please help me on this. I the checked the FAQs and throught this forum but it's nowhere to be seen. It's actually quite urgent this one. Any help is much appreciated.

Thanks a bunch to whoever!

Post edited by: gordonling, at: 2007/06/26 12:20

Edited to add code tags. Greyhead<br><br>Post edited by: GreyHead, at: 2007/08/14 17:10
Max_admin 26 Jun, 2007
Hi,

#1 - in the form attachement tag, u must put this : enctype="multipart/form-data"

#2- enable file uploads and configure it well then ur files should be at components/com_chronocontact/uploads/

Please let me know if the problem still there

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
gordonling 26 Jun, 2007
Hi,

Thank you for the fast respond! I have inserted #1 and have did #2 before this. However, it still isn't working. The uploaded files are still not included in the email and are not on the uploads folder... Is there anything else that I might have missed?

Thanks!
Max_admin 26 Jun, 2007
Could you please put here a screenshot of ur first tab and "uploads" tab at the form edit page ?

Thanks,

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
gordonling 26 Jun, 2007
another file file upload question > please help image 1

--------------

another file file upload question > please help image 2


Hi max,

There you go...

Post edited by: gordonling, at: 2007/06/26 15:58<br><br>Post edited by: gordonling, at: 2007/06/26 15:59
Max_admin 26 Jun, 2007
Hi,

At screen 2, you must have minimum filesize

At screen 1, you must have " enctype=...etc", so you omitted the "enctype="

Cheers

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
gordonling 26 Jun, 2007
Hi,

Have inserted the minimum file size and enctype="multipart/form-data" at the tag attachment.. But it still doesnt work..😟

By the way, are there any element titles involved for the upload file field?

Thanks..
Max_admin 27 Jun, 2007
aha, of course, I though you are putting this to hide your real field name, you must replace field_name_1 with your file field name, which is "file" i think ?
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
gordonling 27 Jun, 2007
:woohoo:

Arghh!! It works now! Gwosh, Can't believe i missed that one.

Will be looking forward for more updates on this one in the future.

Thank you very much Max!:laugh:
Max_admin 27 Jun, 2007
Thank you sir, If you like it then it would be great if you can make a vote/review at the Joomla extensions dir!!🙂

cheers

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
chloe71 03 Jul, 2007
Hi

I have same problem too, but I dun understand how to solve it. Pls help

<form enctype="multipart/form-data" action="components/com_chronocontact/uploads/" method="POST">
<input type="hidden" name="MAX_FILE_SIZE" value="100000" />
Choose a file to upload: <input name="uploadedfile" type="file" /><br />
<input type="submit" value="Upload File" />
</form>


I received email without attachment. Izzit need a database?
I get the script from script site.

Please<br><br>Post edited by: chloe71, at: 2007/07/03 10:10
snadowitz 03 Jul, 2007
I have a similar problem however I do NOT even see the tab shown in the screenshot that allows "enable uploads" - I installed the latest release from the downloads screen
GreyHead 03 Jul, 2007
Hi chloe71,

I don't know where the hidden input for MAX_FILE_SIZE came from, that isn't needed for ChronoForms.

To have file uploads work you *must*:[list]
  • Enable uploads on the File Uploads tab
  • Put valid entries in *all three* input fields: allowable extensions, max size & min size
  • On the General tab put enctype="multipart/form-data" in the 'Form tag attachment' box
  • [/list]

    No, a database isn't needed for this to work.

    Bob
    chloe71 04 Jul, 2007
    Hi Bob,

    I think I did that, but still failed.

    I deleted this hidden input for MAX_FILE_SIZE, same too.<br><br>Post edited by: chloe71, at: 2007/07/04 02:59
    Max_admin 04 Jul, 2007
    Hi,

    Please post screenshots for general tab and uploads tab and the HTML you are using, I will check this🙂

    Max
    Max, ChronoForms developer
    ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
    ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
    chloe71 04 Jul, 2007
    Here are the screen shots another file file upload question > please help image 3
    chloe71 04 Jul, 2007
    Upload tab<br><br>Post edited by: chloe71, at: 2007/07/04 03:02
    chloe71 04 Jul, 2007
    Upload Tab resend another file file upload question > please help image 4<br><br>Post edited by: chloe71, at: 2007/07/04 03:04
    chloe71 04 Jul, 2007
    This is what is the html field

    <input type="hidden" name="uploadedfile"/>
    Choose a file to upload: <input name="uploadedfile" type="file" /><br />
    <input type="submit" value="Upload File" />

    Thank you
    Max_admin 04 Jul, 2007
    Hi,

    Ok, we have 2 problems :

    at the general tab :

    we need to write : enctype="multipart/form-data"

    at the uploads field, we have an example of how the 2nd field name contents should look like :

    field1:jpg|gif|png|zip

    where field1 is the name of the field of type file used to upload!

    Cheers

    Max
    Max, ChronoForms developer
    ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
    ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
    Max_admin 04 Jul, 2007
    so in this case : uploadedfile:jpg|gif|png|zip
    Max, ChronoForms developer
    ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
    ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
    chloe71 04 Jul, 2007
    I changed the html code to

    Choose a file to upload: <input name="uploadedfile:jpg|gif|png|zip" type="file" /><br />
    <input type="submit" value="Upload File" />


    But it still didnt work. Only blank email received.
    Max_admin 04 Jul, 2007
    uploadedfile:jpg|gif|png|zip -> this is the content of the 2nd field at the upload tab, your field name should be the same as you posted before!!

    Max
    Max, ChronoForms developer
    ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
    ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
    chloe71 04 Jul, 2007
    I changed it back. same problem. another file file upload question > please help image 5
    Max_admin 04 Jul, 2007
    at the above screenshot, the 2nd box should have: uploadedfile:jpg|gif|png|zip

    at your HTML, the file field should have the name : uploadedfile

    Please don't mix the 2
    Max, ChronoForms developer
    ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
    ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
    chloe71 04 Jul, 2007
    Yes.
    Here are my files

    Choose a file to upload: <input name="uploadedfile" type="file" /><br />
    <input type="submit" value="Upload File" />


    and jpg|gif|png|zip
    another file file upload question > please help image 6
    Max_admin 04 Jul, 2007
    No, replace : jpg|gif|png|zip

    with :

    uploadedfile:jpg|gif|png|zip
    Max, ChronoForms developer
    ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
    ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
    chloe71 04 Jul, 2007
    Changed. still the same.<br><br>Post edited by: chloe71, at: 2007/07/04 03:31
    Max_admin 04 Jul, 2007
    Please post your current HTML, general tab and upload tab screenshots!!

    Max
    Max, ChronoForms developer
    ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
    ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
    chloe71 04 Jul, 2007
    This one no changes another file file upload question > please help image 7
    chloe71 04 Jul, 2007
    Upload another file file upload question > please help image 9<br><br>Post edited by: chloe71, at: 2007/07/04 03:38
    Max_admin 04 Jul, 2007
    K, the one with no changes actually need to be changed :

    At the general tab :

    Please replace : multipart/form-data

    with :

    enctype="multipart/form-data"

    After you do this please repost your general tab screenshot

    Max
    Max, ChronoForms developer
    ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
    ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
    chloe71 04 Jul, 2007
    Max

    Thanks for your help.

    It done..


    Do u have any idea how to upload multiple file?
    Max_admin 04 Jul, 2007
    then u need multiple file fields with different unique names like the one you have above, at teh uploads tab put "," between the extensions line of each one!

    Max
    Max, ChronoForms developer
    ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
    ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
    chloe71 04 Jul, 2007
    o. thanks.

    Will try it later.

    I m going to give u a good rating.:)
    Max_admin 04 Jul, 2007
    Thank you!🙂
    Max, ChronoForms developer
    ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
    ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
    irerastaplatapus 14 Aug, 2007
    Hello,

    Love your component. Took me a while to figure everything out, but your forums are great, and you offer really good help... which is why I'm writing🙂

    I've got a form that's uploading and emailing several attachments.

    I'm receiving the first attachment, but the others are included in the email sent.

    Here are my tabs and code:
    http://leadershipfairfax.org/Images/general_tab.gif

    http://leadershipfairfax.org/Images/upload_tab.gif

    HTML:
    File to upload: <INPUT TYPE="FILE" NAME="tuition_assistance_app">
    File to upload: <INPUT TYPE="FILE" NAME="reference1">
    File to upload: <INPUT TYPE="FILE" NAME="reference2">


    Thanks in advance for any help. I'm really impressed w/ your component. Totally makes adding forms a cinch.

    Take care,

    Rob<br><br>Post edited by: irerastaplatapus, at: 2007/08/13 21:15
    Max_admin 14 Aug, 2007
    Hi Rob,

    you mean that you only get the first attachement ?

    at your first tab, pleae clear the "subject field" field, and make the "from name" = "Admin"

    could you please copy and paste the text in the uploads tab ? the image size is alittle small.

    Cheers

    Max
    Max, ChronoForms developer
    ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
    ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
    irerastaplatapus 14 Aug, 2007
    Hi Max,

    Thanks for the quick response.

    I've cleared the Subject field, and replaced the "from name" to Admin.

    Here is the text from the upload tabs:
    Enable Uploads: Yes
    
    Field names & allowed extensions for each: 
    tuition_assistance_app:doc|pdf, reference1:«»pdf|doc, reference1:«»pdf|doc
    
    Max allowable size: 100000
    
    Min allowable size: 5
    Thanks

    Edited to add code tags and remove misplaced emoticons. Greyhead<br><br>Post edited by: GreyHead, at: 2007/08/14 16:25
    GreyHead 14 Aug, 2007
    Hi irerastaplatapus,

    I notice that you have 'reference1' twice in the 'Field names' field - the second one should be 'reference2'.

    This may do the trick.

    Bob
    irerastaplatapus 14 Aug, 2007
    Wow - yeah... I totally didn't catch that at all :whistle:

    Thanks Bob

    It's working just fine now. I really appreciate the help. I'll be back soon to plunk down my $25 to support the cause. This component is great, and is going to be saving me mucho tiempo.

    Take care
    alynst 22 Aug, 2007
    Unbelievable!

    I was having trouble with the upload and followed your advice in this forum and wow! It works! Love the component and your help here! Now I can get some sleep! :woohoo:

    Thanks!

    I'll post positive comment at Joomla tomorrow!
    Max_admin 23 Aug, 2007
    Thanks!🙂

    Max
    Max, ChronoForms developer
    ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
    ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
    derekk 19 Sep, 2007
    ok i cant figure my issue out either.
    I can receive files.
    I can receive mp3 which is all i care about
    however i can not receive certain mp3 files?
    I have not been able to figure out why the only determinig difference i can see is that some are larger in file size than others?


    Just putt xx in name for privacy reasons.

    I tried changing the file size parameters to no avail.
    I s there a place in the config.php i need to adjust as well?

    Great component even if i cant get it to work yet.
    derekk 19 Sep, 2007
    another file file upload question > please help image 10
    hope this works this time here is image again
    Max_admin 19 Sep, 2007
    Hi Derekk,

    How much size is that mp3 file which wont upload, away from ChronoForms there is a PHP setting for setting the maximum allowed upload size, can you change it ? if you are at a shared host then ask your admin!!

    Just let us know and we can see, you still have some hope to change this PHP setting at the .htaccess file😉

    Cheers

    Max
    Max, ChronoForms developer
    ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
    ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
    derekk 19 Sep, 2007
    I would like to be able to upload at least 2mb files.
    Are you saying my host has a max upload size restriction?
    Where would I look for that?

    I have cpanel othrwise I could ask or what if i send it to my gmail account? who has a huge allotment over a gigabyte.

    I willl try those two first.

    Thanks for your fast response.

    So theres no where else in your program for adjusting size of uploaded files?

    Thank you,
    Derek
    Max_admin 19 Sep, 2007
    Hi Derek,

    No where else at ChronoForms to set this one, please send to your host admin asking about the maximum allowed upload file size, lets see how much is it, you wont be able to upload more than this size unless its changed or overridden in .htaccess !!

    Cheers

    Max
    Max, ChronoForms developer
    ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
    ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
    chihiro 26 Sep, 2007
    I've done and followed all instructions that I've read from this forum but I still cannot receive the attachments from my email and the upload folder is also empty. Can you help to check why?

    In my General Tab:
    Form Name: SubmitArticle
    Email the results ? Yes
    Email Address(es): [email]aprilsday@gmail.com[/email]
    Email Subject: Submitted Articles
    CC Email: field is empty
    BCC Email: field is empty
    Form tag attachment: enctype="multipart/form-data"
    Form method: Post
    Omitted fields names: field is empty
    Record and send users IP? No
    From Email: [email]admin@admin.com[/email]
    From name: Admin
    Reply to email: field is empty
    Reply to name: field is empty
    In which format to send the results email: Field Titles
    Debug: On
    MYSQL Statement ? ENGINE or TYPE: Engine
    Enable mambots? Yes

    File Uploads Tab:
    Field names & allowed Extensions for each: uploadfile:doc|zip
    Max allowable size: 10000
    Min allowable size: 5
    <?php 
    	global $database;
    	
    $database->setQuery( "INSERT INTO #__chronoforms_5 VALUES  (
    '' , '". date('Y-m-d')." - ".date("H:i:«»s"«»)."', '".$_SERVER['REMOTE_ADDR']."' , '".$_POST['first_name']."' , '".$_POST['last_name']."' , '".$_POST['article_title']."' , '".$_POST['article_message']."' , '".$_POST['company_name']."' , '".$_POST['company_url']."' , '".$_POST['company_description']."' , '".$_POST['email_address']."');" );
    if (!$database->query()) {
    echo "<script> alert('".$database->getErrorMsg()."'); window.history.go(-1); </script>
    ";
    }
    ?>

    
    <table cellpadding="0" cellspacing="2" border="0">
    <tr><td colspan="2" height="5"></td></tr>
    <tr><td><font face="Arial,Helvetica" size=2 color="#333333"><b>First name</b></font></td>
    	<td valign=top><font face="verdana" size="1" color="#cc0000">*</font> </td>
    	<td><input type=text name="first_name" size=35 maxlength=40></td>
    	<td>  </td>
    </tr>
    <tr><td><font face="Arial,Helvetica" size=2 color="#333333"><b>Last name</b></font></td>
    	<td valign=top><font face="verdana" size="1" color="#cc0000">*</font> </td>
    	<td><input type=text name="last_name" size=35 maxlength=40></td>
    	<td>  </td>
    </tr>
    <tr><td><font face="Arial,Helvetica" size=2 color="#333333"><b>Article title</b></font></td>
    	<td valign=top><font face="verdana" size="1" color="#cc0000">*</font> </td>
    	<td><input type=text name="article_title" size=35></td>
    	<td>  </td>
    </tr>
    <tr valign="top" nowrap><td>
    	<table border="0" cellspacing="0" cellpadding="0">
    	<tr><td><font face="Arial,Helvetica" size=2 color="#333333"><b>Article/message</b></font></td></tr>
    	</table>
    	<br></td>
    	<td></td>
    	<td valign="top"><textarea name="article_message" cols="35" rows="5" wrap="PHYSICAL" maxlength="250"></textarea></td>
    	<td align="left"> </td>
    </tr>
    <tr><td><font face="Arial,Helvetica" size=2 color="#333333"><b>Attach article</b></font></td>
    	<td></td>
    	<td valign=top><input type="file" name="uploadfile:doc|zip" size="25"><br><font face="Verdana" size="1" color="#808080">File must be in Word document or zip</font></td>
    	<td>  </td>
    </tr>
    <tr><td colspan="4" height="8"></td></tr>
    <tr><td><font face="Arial,Helvetica" size=2 color="#333333"><b>Company name</b></font></td>
    	<td></td>
    	<td valign=top><input type=text name="company_name" size=35 maxlength=40></td>
    	<td>  </td>
    </tr>
    <tr><td><font face="Arial,Helvetica" size=2 color="#333333"><b>Company URL</b></font></td>
    	<td></td>
    	<td valign=top><input type=text name="company_url"  size=35 maxlength=40></td>
    	<td>  </td>
    </tr>
    <tr><td><font face="Arial,Helvetica" size=2 color="#333333"><b>Company description</b></font> </td>
    	<td></td>
    	<td valign=top><textarea name="company_description" cols="35" rows="3" wrap="PHYSICAL" maxlength="250"></textarea></td>
    	<td>  </td>
    </tr>
    <tr><td nowrap><font face="Arial,Helvetica" size=2 color="#333333"><b>Your e-mail address</b></font> </td>
    	<td valign="top"><font face="verdana" size="1" color="#cc0000">*</font> </td>
    	<td><input type=text name="email_address" size=35 maxlength=40>
    	<br><font face="Verdana,Arial" size="1" color="gray">Format: yourname@address.com</font></td>
    	<td>  </td>
    </tr>	
    <tr><td nowrap></td>
    	<td></td>
    	<td>{imageverification}</td>
    	<td>  </td>
    </tr>	
    <tr><td colspan=4 align=center><input type="image" value="submit" src="http://www.globalsources.com/CUSTOMER/IMAGES/SUBMIT.GIF" alt="Send Email" border=0></td></tr>
    </table>
    
    Max_admin 26 Sep, 2007
    Hi,

    In your code you have this :

    
    <input type="file" name="uploadfile:doc|zip" size="25">
    


    this is wrong, it should be :

    <input type="file" name="uploadfile" size="25">


    Sincerely,

    Max
    Max, ChronoForms developer
    ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
    ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
    chihiro 27 Sep, 2007
    Thanks for your quick response. I have modified my code and it's now working:laugh: Thank you very much for your help!
    Max_admin 27 Sep, 2007
    Great news, Thanks Chihiro😉

    Max
    Max, ChronoForms developer
    ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
    ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
    yatoula 29 Oct, 2007
    It's not possible to post the last code for test in my website ,
    please
    yatoula 29 Oct, 2007
    Hello, the code
     <?php 
        global $database;
        
    $database->setQuery( "INSERT INTO #__chronoforms_5 VALUES  (
    '' , '". date('Y-m-d')." - ".date("H:i:«»s"«»)."', '".$_SERVER['REMOTE_ADDR']."' , '".$_POST['first_name']."' , '".$_POST['last_name']."' , '".$_POST['article_title']."' , '".$_POST['article_message']."' , '".$_POST['company_name']."' , '".$_POST['company_url']."' , '".$_POST['company_description']."' , '".$_POST['email_address']."');" );
    if (!$database->query()) {
    echo "<script> alert('".$database->getErrorMsg()."'); window.history.go(-1); </script>
    ";
    }
    ?>
    Wherever he goes?

    :blush:<br><br>Post edited by: yatoula, at: 2007/10/28 22:17
    Max_admin 29 Oct, 2007
    Hi yatoula,

    I have answered the other file upload issue you posted, you still have a problem with this ?🙂

    Sincerely

    Max
    Max, ChronoForms developer
    ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
    ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
    magli 30 Oct, 2007
    Max,

    thanks a lot for your work. Chronoforms is a great plugin which has saved me a tremendous amount of time. I just read through this thread, and also find commendable that you have consistently worked to solve other peoples problems. Cheers.

    Now - on to mine: Here is the relevant section of my HTML (my form is huge, no nead to post it all):
    <p><label><?php echo FILES; ?></label> <br />
    <div class="types">jpg png gif bmp dwg dia txt rtf doc xls ppt odp odt odf ods avi mpg jpeg zip rar tgz tar gz slx sxw sxl sxp pdf eps ps</div>
    <input type="file" name="file1" /> </p>
    <p><input type="file" name="file2" /> </p>
    <p><input type="file" name="file3" /> </p>
    <p><input type="file" name="file4" /> </p>
    
    <p class="submit"><input name="submit" value="Submit" type="submit" onClick="return confirm('Would You like to Submit the Form?')" /></p>



    Originally, I had the following in the second field of my "File Uploads" section:
    file1:jpg|png|gif|bmp|dwg|dia|txt|rtf|doc|xls|ppt|odp|odt|odf|ods|avi|mpg|jpeg|zip|rar|tgz|tar|gz|slx|sxw|sxl|sxp|pdf|eps|ps ,  file2:jpg|png|gif|bmp|dwg|dia|txt|rtf|doc|xls|ppt|odp|odt|odf|ods|avi|mpg|jpeg|zip|rar|tgz|tar|gz|slx|sxw|sxl|sxp|pdf|eps|ps, file3:jpg|png|gif|bmp|dwg|dia|txt|rtf|doc|xls|ppt|odp|odt|odf|ods|avi|mpg|jpeg|zip|rar|tgz|tar|gz|slx|sxw|sxl|sxp|pdf|eps|ps, file4:jpg|png|gif|bmp|dwg|dia|txt|rtf|doc|xls|ppt|odp|odt|odf|ods|avi|mpg|jpeg|zip|rar|tgz|tar|gz|slx|sxw|sxl|sxp|pdf|


    I was able to receive files fine with the above configuration.

    However, it seems that the extensions are case sensitive. I cannot add all combinations of cases for the extensions of each file, as I have already reached the maximum size of the "Field names & allowed Extensions for each:" field.

    I do not mind editing the php to make the extensions-check not case sensitive.. could you maybe point me to the file I need to edit?

    Otherwise, I tried simply allowing all extensions, using the "*": this does not work for me. I do not get any errors, but the files I submit are not attached in the resulting email.

    Any input would be appreciated. Cheers,

    Max
    Max_admin 30 Oct, 2007
    Hi Magli,

    Thank you very much, First, the file is : chronocontact.php

    #2- I suggest you hack the file to allow all extensions and at the same time ban those you choose, because its very dangerous to allow everything🙂

    Sincerely,

    Max
    Max, ChronoForms developer
    ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
    ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
    magli 30 Oct, 2007
    OK. Thanks. I edited the file, and it is working fine.

    In case anybody is interested, I added the following line:

     $allowed_s2[1]="jpg|png|gif|bmp|dwg|dia|txt|rtf|doc|xls|ppt|odp|odt|odf|ods|avi|mpg|jpeg|zip|rar|tgz|tar|gz|slx|sxw|sxl|sxp|pdf|eps|ps|JPG|PNG|GIF|BMP|DWG|DIA|TXT|RTF|DOC|XLS|PPT|ODP|ODT|ODF|ODS|AVI|MPG|JPEG|ZIP|RAR|TGZ|TAR|GZ|SLX|SXW|SXL|SXP|PDF|EPS|PS";


    In between the two following lines:
     $allowed_s2      = explode(":", trim($allowed_1));
    $allowed_s3      = explode("|", trim($allowed_s2[1]));
    

    Which currently correspond to lines 213 and 214 of /components/com_chronocontact/chronocontact.php

    Thanks again.

    Max
    Max_admin 31 Oct, 2007
    Thanks Magli, I will have a new option for this issue in the new release😉

    Sincerely,

    Max
    Max, ChronoForms developer
    ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
    ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
    makatsis 19 Nov, 2007
    Hello all,
    Could anyone help me? I have installed Joomla 1.5 RC3 and the ChronoContact component.
    I cannot upload files.
    Here is my html code
    <table>
      <tr>
        <td colspan="2" class="contentheading">Ηλεκτρονική Επικοινωνία</td> 
      </tr>
      <tr>
        <td colspan="2"></td>
      </tr>
      <tr>
        <td colspan="2"></td>
      </tr>
      <tr>
        <td>Όνομα: </td>
        <td width="200px"><input name="name" value="" type="text" ></td>
      </tr>
      <tr>
        <td colspan="2"></td>
      </tr>
      <tr>
        <td>E-mail: </td>
        <td width="200px"><input name="email" value="" type="text"><td/>
      </tr>
      <tr>
        <td colspan="2"></td>
      </tr> 
      <tr>
        <td valign="top">Παρατηρήσεις: </td>
        <td width="200px"><textarea name="Notes" rows=5></textarea><td/>
      </tr>
      <tr>
        <td colspan="2"></td>
      </tr>
      <tr>
        <td>File Upload: </td>
        <td><input name="upfile" type="file"  value=""></td>
      </tr>
      <tr>
        <td colspan="2"></td>
      </tr>
      <tr>
         <td colspan="2" align="right"><input name="submit" value="Υποβολή" type="submit"></td>
      </tr>
    <tr>
        <td colspan="2"></td>
      </tr>
    <tr>
        <td colspan="2"></td>
      </tr>
    
    </table>
    Thank you for your help<br><br>Post edited by: GreyHead, at: 2007/11/19 18:29
    makatsis 19 Nov, 2007
    And here is my File Uploads Tab another file file upload question > please help image 12
    GreyHead 19 Nov, 2007
    Hi makatsis,

    Mostly looks good - though I suspect that the 100Gb max upload is a bit big. Try bringing that back to something smaller like '500' and see if that works any better.

    Bob
    Max_admin 20 Nov, 2007
    Hi makatsis,

    and can you please rename your form in english ?

    Cheers

    Max

    PS Form GreyHead. Good catch! The form name mustn't use html entities like &#025;or it isn't consistent enough to work effectively.<br><br>Post edited by: GreyHead, at: 2007/11/20 11:36
    Max, ChronoForms developer
    ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
    ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
    makatsis 20 Nov, 2007
    Here is my form in English

    <table>
    <tr>
    <td colspan="2" class="contentheading">Contact</td>
    </tr>
    <tr>
    <td colspan="2"></td>
    </tr>
    <tr>
    <td colspan="2"></td>
    </tr>
    <tr>
    <td>Name: </td>
    <td width="200px"><input name="name" value="" type="text" ></td>
    </tr>
    <tr>
    <td colspan="2"></td>
    </tr>
    <tr>
    <td>E-mail: </td>
    <td width="200px"><input name="email" value="" type="text"><td/>
    </tr>
    <tr>
    <td colspan="2"></td>
    </tr>
    <tr>
    <td valign="top">Notes: </td>
    <td width="200px"><textarea name="Notes" rows=5></textarea><td/>
    </tr>
    <tr>
    <td colspan="2"></td>
    </tr>
    <tr>
    <td>File Upload: </td>
    <td><input name="upfile" type="file" value=""></td>
    </tr>
    <tr>
    <td colspan="2"></td>
    </tr>
    <tr>
    <td colspan="2" align="right"><input name="submit" value="Submit" type="submit"></td>
    </tr>
    <tr>
    <td colspan="2"></td>
    </tr>
    <tr>
    <td colspan="2"></td>
    </tr>

    </table>
    makatsis 20 Nov, 2007
    It didn't work, GreyHead. Thanks for your help.
    GreyHead 20 Nov, 2007
    Hi Makatsis,

    I think Max meant the 'Form Name' at the top of the General Tab where you have 'Ηλεκτρονική Επικινονία' needs to be in ASCII characters with no spaces like 'ilectroniki_epikinonia'

    Bob<br><br>Post edited by: GreyHead, at: 2007/11/20 11:06
    makatsis 20 Nov, 2007
    I have also debug:"ON"and you can see the result after a post in the following image

    another file file upload question > please help image 14
    GreyHead 20 Nov, 2007
    Hi makatsis,

    Hmmm . . . Please take a backup copy of the form and either upload it here or email to info at greyhead.net so I can take look.

    Bob
    makatsis 20 Nov, 2007
    Here you are [file name=Elektroniki_Epikoinonia.cfbak size=2987]http://www.chronoengine.com/components/com_fireboard/uploaded/files/Elektroniki_Epikoinonia.cfbak[/file]
    GreyHead 20 Nov, 2007
    Hi Makatsis,

    Hmmm . . . something odd is going on with the file upload. I think this is one for Max to look into. The form restores OK and the file upload appears to work but the temporary form doesn't seem to be being saved. Here are the messages I get.

    _POST: Array ( [name] => Bob [email] => [Notes] => [submit] => Υποβολή )
    _FILES: Array ( [upfile] => Array ( [name] => NoName01.txt [type] => text/plain [tmp_name] => D:\xampp\tmp\php70.tmp [error] => 0 [size] => 13860 ) )
    uploadedfile: D:\xampp\tmp\php70.tmp
    targetfile: /components/com_chronocontact/upload/20071120111948_NoName01.txt

    Warning: move_uploaded_file(/components/com_chronocontact/upload/20071120111948_NoName01.txt) [function.move-uploaded-file]: failed to open stream: No such file or directory in D:\xampp\htdocs\joomla1.5\components\com_chronocontact\chronocontact.php on line 531

    Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move 'D:\xampp\tmp\php70.tmp' to '/components/com_chronocontact/upload/20071120111948_NoName01.txt' in D:\xampp\htdocs\joomla1.5\components\com_chronocontact\chronocontact.php on line 531

    Checking the D:/xampp/tmp folder there is no php70.php file showing there at all.

    Bob
    GreyHead 20 Nov, 2007
    Hi Max,

    Changing the upload path removes the error messages but the file doesn't upload (the same form works OK in Joomla 1.0.x).

    Bob
    makatsis 20 Nov, 2007
    I have just changed the line, but I still cannot upload the file.

    Marios
    Max_admin 20 Nov, 2007
    hmmm, strange, the other user reported its fine after the change, and if the error message is gone then it should successed, what about the permissions ?

    Sincerely,

    Max
    Max, ChronoForms developer
    ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
    ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
    makatsis 20 Nov, 2007
    The upload folder of the com_chronocontact has 777 perms

    Marios
    Max_admin 20 Nov, 2007
    Hi Marios,

    Please try different file types and start with image types, small and large sizes, I have the same and its working here so there is something missing somewhere and could be related to the joomla 1.5!!

    Cheers

    Max
    Max, ChronoForms developer
    ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
    ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
    boxcarmib 26 Jan, 2008
    if file uploads are working for small files but not for large files you may well be having trouble with some of the php limits.

    the two configuration variables to look for are:

    max_execution_time and upload_max_filesize

    these are in your php.ini file, but you can quickly check their values through Joomla (1.0) through the System/System Info/PHP Info menu and tab.

    also keep in mind that the required MAX_FILE_SIZE hidden input field in your form is in BYTES, unless you use a letter modifier. so if you want to allow 3 megabyte files you need to write:

    <input type="hidden" name="MAX_FILE_SIZE" value="3000000" />


    or

    <input type="hidden" name="MAX_FILE_SIZE" value="3M" />


    if you want to find what the problem with your file uploads is, here's the best solution i worked out. first, make sure both of your Form URLs fields are blank, then put the following in your Form Code/On Submit code - after sending email:

    <?php
    global $mainframe;
    
    $custom_tag = '<meta http-equiv="refresh" content="30; url=www.example.com" >';
    $mainframe->addCustomHeadTag($custom_tag);
    print_r( $_FILES );
    ?>
    


    that will display the output of the $_FILES global and you can see from that output if you had an error and what the error is. you can go here:
    http://us2.php.net/features.file-upload">
    http://us2.php.net/features.file-upload

    if you want to decode the error numbers and get a little explanation on what went wrong as well as some indication of what php configuration variables you may need to adjust.

    you change the php configuration files by editing your php.ini file. if you don't know where to find it, just google "php.ini" and you find lots of links telling you how to find it on your system.

    now, a special note to godaddy users like me. in tracking down my problem, first i had to discover that if you're using php5 (as i am) then you'll have 2 php.ini files. there's php.ini for php4 and php5.ini for php5. you can copy php.ini to php5.ini and that will get you started, but there's a couple of things you have to watch out for. first of all, there's a default value in the php.ini file that will cause you no end of grief, so ensure that your php5.ini files has the following line:

    allow_url_fopen = on


    (the default value is "off" and that'll break a lot of things in your joomla installation.

    while there's already a line in the file for max_input_time (a default of 60 seconds... which may not be enough if you've got someone uploading on a slow link) there is no line to specify the maximum file size. i was worried for a bit that perhaps because it wasn't there, that maybe godaddy wouldn't let you change that value, but that appears not to be the case. just insert the following line in your php5.ini file (changing the maximum filesize to whatever you like)

    upload_max_filesize = 15M


    i hope this post is of use to some folks who have been experiencing problems.
    GreyHead 26 Jan, 2008
    Hi boxcarmib,

    That's a really useful not thank you.

    One little improvement, to show the $_FILES array you can put this in 'On Submit after email':
    <?php
    if ( $debug ) {
      echo "files: "; print_r($_FILES); echo <br />";
      echo "attachments: "; print_r($attachments); echo <br />";
      if ( !empty( $rows[0]->redirecturl ) {
        $link = $rows[0]->redirecturl;
        echo "Click <a href='$link'>here</a> to redirect<br />";
        $rows[0]->redirecturl = "";
    }
    ?>
    this will show you the $-FILES and attachment arrays and stop the file from redirecting so that the debug info is displayed.

    Bob

    PS Max: please will you add this snippet to the debug code in the next release. Tks Bob<br><br>Post edited by: GreyHead, at: 2008/01/26 12:44
    This topic is locked and no more replies can be posted.

    VPS & Email Hosting 20% discount
    hostinger