PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsProgrammingPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old May 7th, 2003, 01:22 PM
<<RAN>> <<RAN>> is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Location: Los Angeles, Ca
Posts: 11 <<RAN>> User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Unhappy Problem uploading files with PHP.

I downloaded this script a while back and I have been using it without a problem. I now want to be able to upload bigger files. I am able to upload files no bigger than 2 megs but once I go over 2 megs I get this error

Warning: Unable to open '' for reading: No such file or directory in /home/www/turitmo/phpUpLoad-1.0/do_upload.php on line 9
Couldn't copy file.

This is the code:

<?

if ($email != "") {
} else {
die("No email address specified.");
}

if ($superdat_name != "") {
copy("$superdat", "/home/turitmo/www/phpUpLoad-1.0/files/$superdat_name") or
die("Couldn't copy file.");

} else {
die("No input file specified.");
}

mail("support@turitmo.net", "File Uploaded",
"$email sent $superdat_name, a $superdat_size byte file with a MIME type of $superdat_type");

?>

I am on a dedicated server and I have changed my php.ini file to the following:

upload_tmp_dir = /home/turitmo/www/phpUpLoad-1.0/files
upload_max_filesize = 100M

Like I mentioned before I can upload gif, jpg, bmp, txt, etc. etc. without a problem and I receive an email letting me know that a file has been uploaded.

Any ideas or suggestions on how I can get this to work for me?

Reply With Quote
  #2  
Old May 9th, 2003, 09:34 AM
infamous-online infamous-online is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Posts: 403 infamous-online User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 27 m 25 sec
Reputation Power: 17
Re: Problem uploading files with PHP.

Quote:
Originally posted by <<RAN>>
I downloaded this script a while back and I have been using it without a problem. I now want to be able to upload bigger files. I am able to upload files no bigger than 2 megs but once I go over 2 megs I get this error

Warning: Unable to open '' for reading: No such file or directory in /home/www/turitmo/phpUpLoad-1.0/do_upload.php on line 9
Couldn't copy file.

This is the code:

<?

if ($email != "") {
} else {
die("No email address specified.");
}

if ($superdat_name != "") {
copy("$superdat", "/home/turitmo/www/phpUpLoad-1.0/files/$superdat_name") or
die("Couldn't copy file.");

} else {
die("No input file specified.");
}

mail("support@turitmo.net", "File Uploaded",
"$email sent $superdat_name, a $superdat_size byte file with a MIME type of $superdat_type");

?>

I am on a dedicated server and I have changed my php.ini file to the following:

upload_tmp_dir = /home/turitmo/www/phpUpLoad-1.0/files
upload_max_filesize = 100M

Like I mentioned before I can upload gif, jpg, bmp, txt, etc. etc. without a problem and I receive an email letting me know that a file has been uploaded.

Any ideas or suggestions on how I can get this to work for me?



did you check with your host to see if they allow file sizes that large?
__________________
Apache Expert

Reply With Quote
  #3  
Old May 9th, 2003, 09:52 AM
<<RAN>> <<RAN>> is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Location: Los Angeles, Ca
Posts: 11 <<RAN>> User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Big files

Well, like I mentioned on my previous post. I'm on a dedicated server which means I have control over that server and it should not be a problem since I changed the upload file size limit.

I guess I can give them a try again. Do you see anything wrong though?

Reply With Quote
  #4  
Old May 9th, 2003, 10:14 AM
jpenn jpenn is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Location: Washington, DC
Posts: 317 jpenn User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 m 3 sec
Reputation Power: 17
Change the 'post_max_size' - and, 'max_execution_time' so your script won't time out during the upload.
__________________
~ Joe Penn

We work for free to help make this a valuable resource on the internet. Do you appreciate the help - did we provide help that will help you prosper and help that has contributed to sharpening your current skill set?

Show your appreciation and purchase something from our Amazon Wishlist's - it's simple and a great way to say thank you.




Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingPHP Development > Problem uploading files with PHP.


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.

© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap