PDA

View Full Version : What is wrong with this script?


Swizylstik
07-28-2006, 05:15 PM
I have a script that is supposed to enable a user to choose a file, upload it through the form and have it attach to an email that is sent to me. Everything seems to be working fine except the file does not attach to the email. I receive the email, but no attachment. I don't get any errors when running the script.


Here is the form that calls the script. http://www.simplymad.com/NanoOpto/nano/

Pretty simple stuff.

The script can be found here (http://www.simplymad.com/NanoOpto/nano/uploadformmailer.cgi.txt)
The script calls for an empty directory to be placed on the server (/temp) which I have done, but still no files. Can anyone help me please?

-S

Swizylstik
07-28-2006, 05:18 PM
Here is the script link: http://www.simplymad.com/NanoOpto/nano/uploadformmailercgi.txt

Thanks for any help!

mlseim
07-28-2006, 07:52 PM
I think your /temp directory is not CHMODed to 777.

Try that. Change permissions on that directory to 777 and see what happens.

and/or ...

Try this:
Change this line: my $TempPath = "/temp/";
To this: my $TempPath = "/temp";

KevinADC
07-28-2006, 08:10 PM
The requested URL /NanoOpto/nano/uploadformmailer.cgi.txt was not found on this server.

Swizylstik
07-28-2006, 08:26 PM
I think your /temp directory is not CHMODed to 777.

Try that. Change permissions on that directory to 777 and see what happens.

and/or ...

Try this:
Change this line: my $TempPath = "/temp/";
To this: my $TempPath = "/temp";


My permissions are set correctly and I made the change to the directory location, but that didn't work either. Any other tips?

KevinADC
07-29-2006, 04:39 AM
try changing it to a full path:

$TempPath = "/path/from/root/to/temp/";

if you use only "/temp" that will be created in the same directory as the script.

Swizylstik
07-29-2006, 07:05 AM
try changing it to a full path:

$TempPath = "/path/from/root/to/temp/";

if you use only "/temp" that will be created in the same directory as the script.

You are my hero! That worked! Holy crap, I can't tell you how much I have suffered over this. You rock!

KevinADC
07-29-2006, 09:08 AM
you're welcome, suffer no more. ;)