Posts: 114
Threads: 42
Joined: Jan 2010
Reputation:
0
Hi folks,
I am trying to use formtools for a site that is hosted on Windows. I am unable to get emails and file uploads working, even though all the rest works.
For the emails, it seems to be a problem with the FROM: headers not being set properly in the script. In the emails section of the setup for this form, I have set the from email to be the field in the form called email. I have one email going to my client, which for now, I have subsituted my email for the one I will eventually use. And, I have taken the part of the user with a different email address, which means I should receive two: a notification and a confirmation .... neither of which I receive. I have verified that emails from PHP scripts do indeed work on the server through the use of a generic PHP script.
PHP Code: <?php
if(mail('submit@zuka.net','test subject','test message', "From: sender@example.com\r\n" . "X-Mailer: php")){
echo('ok');
}
else{
echo('not ok');
}
?>
This script generates an email but formtools does not.
As far as file uploads go, I have checked that the permissions on the upload folder are correct and that the path is also correct. I have ensured that the form is set to multipart/form data.
I need help on this as I have to get this functioning today .... ???? Anyone?
Dave
Posts: 114
Threads: 42
Joined: Jan 2010
Reputation:
0
Sep 23rd, 2010, 9:07 AM
(This post was last modified: Sep 23rd, 2010, 9:22 AM by filch.)
(Sep 22nd, 2010, 11:08 AM)filch Wrote: Hi folks,
I am trying to use formtools for a site that is hosted on Windows. I am unable to get emails and file uploads working, even though all the rest works.
For the emails, it seems to be a problem with the FROM: headers not being set properly in the script. In the emails section of the setup for this form, I have set the from email to be the field in the form called email. I have one email going to my client, which for now, I have subsituted my email for the one I will eventually use. And, I have taken the part of the user with a different email address, which means I should receive two: a notification and a confirmation .... neither of which I receive. I have verified that emails from PHP scripts do indeed work on the server through the use of a generic PHP script.
PHP Code: <?php
if(mail('submit@zuka.net','test subject','test message', "From: sender@example.com\r\n" . "X-Mailer: php")){
echo('ok');
}
else{
echo('not ok');
}
?>
This script generates an email but formtools does not.
As far as file uploads go, I have checked that the permissions on the upload folder are correct and that the path is also correct. I have ensured that the form is set to multipart/form data.
I need help on this as I have to get this functioning today .... ???? Anyone?
Dave
I really do need some feedback and help here as my client is freaking. I did try the upload from one of the submissions and it does not work so it is not my form. I have logged into the control panel of the server and made the upload folder writable but it still gives me an error from withing the submission when I try to upload a file which says "folder is not valid or is not writable". I have tried everything I can think of but no go. Also, the whole email thing is really frustrating because apparentluy, formtools uses the following From: header: "<Some User <someuser@somedomain.com>> when in fact, the windows email server only wants "From: someuser@somedomain.com"
I am open to try anything at this point.
Dave
Here is a weird thing: in the files setup area in formtools admin, the path to the folder gets changed to look like this:
D:UsersOoabwww.oab.caadminformtoolsupload
i.e. no backslashes. If I edit the path to add the slashes, it does not give me an error but then still will not upload the file, giving m the error:
Your submission was updated, but the following file(s) had problems:
• WEEK FOUR.docx: This field's upload folder is either invalid or is not writable.
Yet I go back to the files area and test the permissions again and formtools reports the permissions to be correct. So, is it an invalid path? But how can it be is formtools tests permissions and says all is good?
Very frustrating. Hate windows servers for live.
Dave
Posts: 114
Threads: 42
Joined: Jan 2010
Reputation:
0
I guess there is no help here? It really seems to be a formtools issue as I went back to an old script I used to use and the email works fine ... not what I want to use but just to see if it works. And STILL no joy on file uploads
Dave
Posts: 114
Threads: 42
Joined: Jan 2010
Reputation:
0
(Sep 24th, 2010, 10:41 AM)filch Wrote: I guess there is no help here? It really seems to be a formtools issue as I went back to an old script I used to use and the email works fine ... not what I want to use but just to see if it works. And STILL no joy on file uploads
Dave
I guess I should not have mentioned that this was on a Windows server. Must have scared everyone off ;-)
At this point, I have been trying to get this working for two days with little luck, no help and a lot of frustration. Both with the email and the file upload. I may have the mail thing solved with the use of smartmailer but the file upload is absolutely driving me insane. In the files area, when I test the path and permissions, all is good. When I try to upload a file from one of the test submissions, I get an error saying that the folder is not valid or the permissions are wrong. WTF?????
Help!!
Dave
Posts: 2,456
Threads: 39
Joined: Dec 2008
Reputation:
6
Sep 25th, 2010, 8:52 AM
(This post was last modified: Sep 25th, 2010, 8:53 AM by Ben.)
Hi Dave,
I'm so sorry I haven't been around, but this being an unpaid open source script I've had to put off most of my support until the weekends (I have a day job).
Windows servers DO scare people off, me included!
First off, it sounds like the emails are working now, yes? Here's the rub: the built-in PHP mail() function that Form Tools uses by default is AWFUL. Any PHP programmer who's worked in multiple environments knows it. The email functionality within Form Tools requires a lot out of the function: and oftentimes it just can't handle it. That's why I bundle the Swift Mailer module with the core build - it's a far better, consistent and more reliable solution.
For the File upload problem, I must say that does sound puzzling. So you haven't overridden the default settings (which work) for that particular file upload field? It sounds like maybe that's the case... To check, just go to Edit Form -> Fields -> "Options" link for the file upload field and remove any custom file upload folder settings.
If it hasn't been overridden but just doesn't work, then this is a new bug I haven't seen before. If you like, email me at ben.keen@gmail.com with your FTP & FT login information and I could take a look to see what's going on. Oh - and link to this post, because I know I'll lose track...
- Ben
Posts: 114
Threads: 42
Joined: Jan 2010
Reputation:
0
(Sep 25th, 2010, 8:52 AM)Ben Wrote: Hi Dave,
I'm so sorry I haven't been around, but this being an unpaid open source script I've had to put off most of my support until the weekends (I have a day job).
Windows servers DO scare people off, me included!
First off, it sounds like the emails are working now, yes? Here's the rub: the built-in PHP mail() function that Form Tools uses by default is AWFUL. Any PHP programmer who's worked in multiple environments knows it. The email functionality within Form Tools requires a lot out of the function: and oftentimes it just can't handle it. That's why I bundle the Swift Mailer module with the core build - it's a far better, consistent and more reliable solution.
For the File upload problem, I must say that does sound puzzling. So you haven't overridden the default settings (which work) for that particular file upload field? It sounds like maybe that's the case... To check, just go to Edit Form -> Fields -> "Options" link for the file upload field and remove any custom file upload folder settings.
If it hasn't been overridden but just doesn't work, then this is a new bug I haven't seen before. If you like, email me at ben.keen@gmail.com with your FTP & FT login information and I could take a look to see what's going on. Oh - and link to this post, because I know I'll lose track...
- Ben
Hey Ben ... I know that you are busy and I also appreciate that this is an unpaid script so no worries. Just that, in the heat of the project ... everyone gets a bit testy .... especially when we are using $#$%^^&&* Windows servers!!!
I finally gave up and moved the form management to a Linux box and everything was up and running in no time.
If I run into further problems, if you are OK with it, I will be back in touch ... Yeah Linux .... Booo Windows!!!
Cheers
Dave
Posts: 28
Threads: 9
Joined: Apr 2013
Reputation:
1
Hello everyone,
Does anyone know if uploads on a windows box has a solution? I noticed Dave moved to a Linux box, but my boss insists on a windows box so that option is not available for me.
I have checked my permissions on the upload folder and was hoping it was an Id10t error on my part since I'm a newbie here but from this post I'm definitely concerned.
I've tried using the full path from the C drive and the root path to no avail.
ie:
formtools/upload (formtools being the root)
I am getting the error "This temporary upload folder specified by your PHP installation is not writable. Until this is fixed, files cannot be uploaded through Form Tools (or any other PHP program). Please contact your hosting provider. " within the upload module.
Anyone find a solution or should I start scrambling now?
I am using IIS 7.5.7600 on Windows 2008 R2 standard.
Thanks in advance,
John
Posts: 415
Threads: 0
Joined: Mar 2009
Reputation:
3
Posts: 28
Threads: 9
Joined: Apr 2013
Reputation:
1
Apr 25th, 2013, 6:55 PM
(This post was last modified: Apr 25th, 2013, 7:32 PM by johnbleck2.)
Joe,
Thanks so much for the response.
IUSR_myservername did NOT initially have the write permissions which has been rectified. Tried to update Upload module:
Same permission error.
Then I tried to change the the files.php file from
// first, check server's temporary file upload folder
$upload_tmp_dir = ini_get("upload_tmp_dir");
to
// first, check server's temporary file upload folder
$upload_tmp_dir = ini_get("upload_tmp_dir") ?: sys_get_temp_dir();
Same permission error.
Now, I'm also a php newbie so as I poked around some more I looked in the phpMyAdmin where the export/import options were blank. So, I added the subfolder, saved config. but I believe that's for sql imports and uploads.
Same permission error.
Do I have to start and stop php somehow? If so how would I? Would that even help?
php newbies... I know. I apologize in advance.
Where can I find the default upload folder for php? I'm assuming if blank (from reading the files.php file that if blank it should populate with the default php upload folder, but when I blank it out it stays blank)
I can't find a php.ini file anywhere so I'm not sure where this gets set. Looks like using Windows we have to use this "default" location and move files, but I can't find the default upload location defined anywhere.
I didn't realize right away my first attempt to change the files.php I used single quotes for 'upload_tmp_dir' when I changed that line to
$upload_tmp_dir = ini_get('upload_tmp_dir') ?: sys_get_temp_dir();
I changed it to
$upload_tmp_dir = ini_get("upload_tmp_dir") ?: sys_get_temp_dir();
That plus the permissions and it works!
Thank you so much for your reply and overall these tools are fantastic.
Very happy with it so far & thanks again.
Posts: 415
Threads: 0
Joined: Mar 2009
Reputation:
3
Thanks for the update. Always appreciated when our community posts solutions to their issues.
Cheers,
Joe
|