This forum is no longer open and is for reading/searching only.

Please use our new MachForm Community Forum instead.

MachForm Community Forums » MachForm 3

BUG? File uploads are not submitted when using PHP Embed Code


  1. peter4563
    Member

    I successfully created a form which has a default file upload field (advanced uploader is not selected).

    JPG files upload fine when previewing the form (via /form/view.php?id=# link), or when editing an entry.

    But when I use the PHP Embed Code, the entire form is submitted except the JPG file (which even is a required field).

    Is this a bug in 3.5?

    Posted 11 years ago #
  2. peter4563
    Member

    FYI: The described issue does not happen when using the Javascript code.

    Posted 11 years ago #
  3. yuniar

    Hi Peter,

    Can you let me know the URL of the page where you embed the form please?
    I'll check it.

    You can contact us directly if you don't want to post it in the forum.
    http://www.appnitro.com/contact


    MachForm Founder

    Posted 11 years ago #
  4. rocketmedia
    Member

    Hi Yuniar,

    I'm running into the same issue. File uploads are being lost when loaded via the machform embedded with the php embed but they work fine when using the preview link or javascript embed.
    I'm also getting a flash of php errors before the page is forwarded to the thank you page.

    A PHP Error was encountered
    Severity: Warning
    Message: move_uploaded_file(./data/form_1028/files/element_11_81f61f64df54c726ce5beaeeb54dc152-203-test.pdf): failed to open stream: No such file or directory
    Filename: includes/post-function.php
    Line Number:1880

    A PHP Error was encountered
    Severity: Warning
    Message: move_uploaded_file(): Unable to move '/tmp/phpYwY6q2' to './data/form_1028/files/element_11_81f64df54c726ce5beaeeb54c152-203-test.pdf'
    Filename: includes/post-function.php
    Line Number:1880

    Posted 11 years ago #
  5. yuniar

    rocketmedia -- try to go to your MachForm Settings page, click "advanced options" and you should see the value of "File Upload Folder" currently being set to "./data"

    Change the above path with the full path to your data folder. For example: "/var/www/html/machform/data"
    I believe that should fix the issue.


    MachForm Founder

    Posted 11 years ago #
  6. aes
    Member

    I am having the same issue and putting the exact path in did not fix the issue.

    Posted 10 years ago #
  7. yuniar

    aes -- can you let me know the URL of your page please? I'll check it.


    MachForm Founder

    Posted 10 years ago #
  8. aes
    Member

    The page is security protected. If you private message me I will give you temporary login.

    Posted 10 years ago #
  9. got2know
    Member

    Hi,

    I'm on V 4.1 and have just run into the exact same issue as everyone else here (note: I did upgrade from a 3.x version on this install).

    - Form works except files don't upload
    - there is a quick flash of the error message prior to going to the thank you screen (I managed to do a screen capture of it before it flashed off and it's basically the same as rocketmedia's error message.

    File upload works fine in preview mode (I'm assuming preview mode likely does not use a php embed and that's why that works)

    Page's file upload does NOT work with the php embed.

    Page's file upload DOES work with javascript embed.

    I tried to change the ./data path for uploads, but that didn't help (although it's difficult to know what the right path name should be).

    I did check my php.ini settings and Safe Mode was off. File size not an issue, either.

    So I'm switching to Javascript embed for now - but would like to get the php embed resolved.

    Posted 10 years ago #
  10. got2know
    Member

    Further to my last post - I played more with the whole "File Upload Folder" settings and did get it to work using the suggested fix of using the full path.

    The full path name was a little confusing - but then I saw it as part of an earlier portion of the php embed code. I just inserted the /data portion and all seemed to work.

    Posted 10 years ago #

RSS feed for this topic

Reply