hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Programming Discussion : I can't get FILE UPLOAD to work in formmail.php
Reply

Programming Discussion Discussions related to web programming languages and other related issues. Topics may include configuration, optimization, practical usage and database connectivity.
Forum Jump

I can't get FILE UPLOAD to work in formmail.php

Reply Post New Thread In Programming Discussion Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 09-04-2002, 10:25 PM
vito vito is offline
Enthusiastic chef
 
Join Date: Jan 2002
Location: Toronto, Canada
Posts: 11,061

I can't get FILE UPLOAD to work in formmail.php


I'm using formmail.php in a new site for form-to-email. Everything works great, until I try to upload a file. Then instead of sending me to the redirect page, it gives me this:

Warning: Unable to create '/questionmark.jpg': Permission denied in /home/demodemo/public_html/formmail.php on line 276

Warning: Cannot add header information - headers already sent by (output started at /home/demodemo/public_html/formmail.php:276) in /home/demodemo/public_html/formmail.php on line 323


The page with the form I'm working on is at http://www.demodemo.com/hostingtutorials.html

Any ideas?

Vito

__________________
DemoDemo.com - Flash tutorials since 2002
DemoWolf.com - 5,300+ Flash tutorials for hosting companies, incl. Voice tutorials

Reply With Quote


Sponsored Links
  #2  
Old 09-05-2002, 07:24 AM
vito vito is offline
Enthusiastic chef
 
Join Date: Jan 2002
Location: Toronto, Canada
Posts: 11,061
A bit of progress made, but still not quite right. I managed to stop getting the error. I had to change name=file to name=file_name.

The problem now is that when submitted, the form sends me an email, but I can't seem to get the uploaded file. In the documentation it says that one of the hidden variables should be:

<input type="hidden" name="path_to_file" value="/www/dir_where_file_goes/">

So I created a new directory on my server. Let's say it's called "uploads". Then in the form I put in the variable. For the value, I tried every combination I could think of:

/home/username/public_html/uploads/
/www/uploads/
http://www.mysite.com/uploads/
...well, you get the idea.

I even tried every combination without the trailing slash. Yet after submitting the form, I do not see any file in the directory on my server.

IMO, the variable is what is giving me the problem. Anyone know what path I should use? Any wisdom on this would be greatly appreciated.

Vito

__________________
DemoDemo.com - Flash tutorials since 2002
DemoWolf.com - 5,300+ Flash tutorials for hosting companies, incl. Voice tutorials

Reply With Quote
  #3  
Old 09-06-2002, 02:35 AM
choon choon is offline
Retired Moderator
 
Join Date: Jul 2001
Location: Singapore
Posts: 1,790
Hi,

Without looking at your script/form, try to check your php configuration (normally is /etc/php.ini) whether does the file_uploads being set to On or Off.

If it is set to Off, try to enable it by changing it to On then restart your web server. If it is already set to On, then it is some other issues for you to look at your script/form or upload directory permission etc...

Just my suggestion and no... I am not good in term of php

Thanks.

Kindest regards,
Choon

__________________
Giam Teck Choon
:: Join choon.net Community today to share your tips and tricks on server issues please ::
:: Singapore Dedicated Servers :: Singapore Virtual Private Servers :: Linux/FreeBSD Server Management ::


Reply With Quote
Sponsored Links
  #4  
Old 09-06-2002, 05:33 AM
vito vito is offline
Enthusiastic chef
 
Join Date: Jan 2002
Location: Toronto, Canada
Posts: 11,061
Thanks Choon:

I didn't have to bother checking if it was turned on or off because I tried another script from hotscripts and it worked OK. I was able to upload. It's too bad, though. I prefered the first script, but couldn't waste any more time with it, so I just went with the hotscripts one.

Thanks for your input.

Vito

__________________
DemoDemo.com - Flash tutorials since 2002
DemoWolf.com - 5,300+ Flash tutorials for hosting companies, incl. Voice tutorials

Reply With Quote
  #5  
Old 09-06-2002, 07:41 AM
benoire benoire is offline
Registered User
 
Join Date: Jul 2001
Location: Coventry, England
Posts: 130
Is this issue closed now or do you still want assistance with your first script?

Reply With Quote
  #6  
Old 09-06-2002, 08:02 AM
vito vito is offline
Enthusiastic chef
 
Join Date: Jan 2002
Location: Toronto, Canada
Posts: 11,061
Hi benoire:

Well I guess for now it's a closed issue. I couldn't spend more time on it, so I had to find an alternative. What I really wanted was a form where the customer could fill in his name etc, choose the products he wants to order, and upload an image...all in the same form. He would then be forwarded to a page to process payment.

As it turns out, I now have him doing all of the above with the exception of the upload. He has to proceed to a separate page to upload, then advance to make payment. It means one extra clcik.

But thanks for the offer to help.

Vito

__________________
DemoDemo.com - Flash tutorials since 2002
DemoWolf.com - 5,300+ Flash tutorials for hosting companies, incl. Voice tutorials

Reply With Quote
  #7  
Old 09-07-2002, 01:10 AM
wmac wmac is offline
Web Hosting Master
 
Join Date: May 2001
Posts: 932
Vito,

Have you given correct permissions for target directory? Give it a 777 permission, test it and then decrease permission level if it works.

Mac

__________________
Free Web Programming eLearning Courses at:
Learnem Educational and Course Farm

Reply With Quote
  #8  
Old 09-07-2002, 01:12 AM
vito vito is offline
Enthusiastic chef
 
Join Date: Jan 2002
Location: Toronto, Canada
Posts: 11,061
Yup, I tried 777. Still didn't work...

Vito

__________________
DemoDemo.com - Flash tutorials since 2002
DemoWolf.com - 5,300+ Flash tutorials for hosting companies, incl. Voice tutorials

Reply With Quote
Reply

Related posts from TheWhir.com
Title Type Date Posted
Egnyte Launches Content Cloud Storage and Sharing Infrastructure Service Web Hosting News 2012-11-15 12:01:19
MegaUpload Designs Comeback Service Mega to Skirt Cloud Storage Liabilities Web Hosting News 2012-10-18 15:36:39
Web Hosting Company Server Intellect Adds Support for WebMatrix Website Building Software Web Hosting News 2012-03-14 12:53:32
SingleOS Launches Fuscan Linux Cloud 2.0 Web Hosting News 2011-08-12 19:09:05
Web Host WebHostingBuzz Partners with Cloud Platform SMEStorage Web Hosting News 2011-06-01 18:10:25


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?