home hardware prices news articles forums photos user reviews
Go Back   Tech Support Forums - TechIMO.com > PC Hardware and Tech > Webmastering and Programming
Join TechIMO for Free!
Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read
Reply Get bargains at  »  Dealighted.com
 
Thread Tools
Currently Active Users: 1686
Discussions: 188,402, Posts: 2,243,609, Members: 232,632
Old October 13th, 2005, 11:03 AM   Digg it!   #1 (permalink)
Member
 
Join Date: Jan 2005
Posts: 38
PHP upload limit?

I'm using a php script to upload a particular page, this script usually works fine and uploads all my files great, however this one page i have is quite long in length and whenever i upload it and try to view it the bottom of the page is cropped off. It's really odd, I go to look at the uploaded page and view it's source code and the code just suddenly stops mid-sentence. I guess something must be limiting it.

Heres the code used to upload (guess it must be this coding thats causing it):

if ($_GET["what"] == "upload"){

$textareavalue = "";
$file = fopen($_FILES['htmlfile']['tmp_name'], "r");
while ($line = fgets($file, filesize($_FILES['htmlfile']['tmp_name'])))
{
$textareavalue .= $line;
}
fclose($file);
}


Any ideas? been stuck on this for hours and hours now, starting to get a headache, so any help is much appreciated.

herronial is offline   Reply With Quote
Old October 13th, 2005, 01:38 PM     #2 (permalink)
Real gangstas sip on Yacc
 
jkrohn's Avatar
 
Join Date: Oct 2001
Location: Suckas-ville
Posts: 4,549
Send a message via ICQ to jkrohn Send a message via AIM to jkrohn Send a message via Yahoo to jkrohn
How big is the page in question?
__________________
Signatures blow hard
If your signature contains an ad of any kind, congratulations, you're on my ignore list.

jkrohn is offline   Reply With Quote
Old October 13th, 2005, 01:44 PM     #3 (permalink)
SoMuchAnime-SoLittleTime
 
EXreaction's Avatar
 
Join Date: Aug 2003
Location: Plymouth, WI
Posts: 13,871
Blog Entries: 1
Send a message via ICQ to EXreaction Send a message via AIM to EXreaction Send a message via MSN to EXreaction Send a message via Yahoo to EXreaction
So...you are using a php uploaded that is on your site...and you want to upload the web page you want there with that?
If that is the case, why don't you try something like FileZilla to upload the page?
__________________
My photography: Flickr

Lithium Studios - phpBB3, PHP, and Web Development

EXreaction is offline   Reply With Quote
Old October 13th, 2005, 09:54 PM     #4 (permalink)
Member
 
Join Date: Jan 2005
Posts: 38
The page isn't that large, i tried changing the max php filesize upload from 2 to 10 megs in my .htaccess file and still no luck.

Basically i have to use this specfic php script to upload a few of my pages, and it's usually no problem but its just this one page that is longer than the rest. Wondered whether there is some default line limit on the php coding that is restricting it.
herronial is offline   Reply With Quote
Old October 13th, 2005, 10:02 PM     #5 (permalink)
Ultimate Member
 
Join Date: Oct 2001
Posts: 21,026
is it possible you're running into the limit of the variable itself?
It looks like you're reading in the text of the html file and putting it into a value
(I'm new to PHP, so I'm speaking strictly from a developers view)

find out how many characters are in the file you've uploaded.
I dont know how PHP handles strings so its tough for me to say, but its something to consider.
vass0922 is offline   Reply With Quote
Old October 13th, 2005, 11:31 PM     #6 (permalink)
Member
 
Join Date: Jan 2005
Posts: 38
I have about 63,000 characters, and about 5,500 words. Think it has to be something with the character limit, but i'm also pretty new to php coding so not too sure whats causing the problem.
herronial is offline   Reply With Quote
Old October 13th, 2005, 11:37 PM     #7 (permalink)
Ultimate Member
 
Join Date: Oct 2001
Posts: 21,026
if its around 65,536 (think thats it) thats 64k so quite possible a limit.
vass0922 is offline   Reply With Quote
Old October 13th, 2005, 11:53 PM     #8 (permalink)
Member
 
Join Date: Jan 2005
Posts: 38
Thanks for the help all but I finally figured out what it was, the information was being uploaded to a MYSQL database, and the field it was going into wasn't large enough....phew

love it when you fix a problem thats been nagging you for days

cheers all
herronial is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may post new threads
You may 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
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Download/Upload - PHP PyroSama Webmastering and Programming 1 June 3rd, 2005 08:23 PM
php upload and execute? e980238 Webmastering and Programming 1 December 15th, 2003 02:11 PM

Most Active Discussions
Is It Just Me? (2906)
3-days in and no threads about Gaza (161)
Misery Loves Company... (2144)
New Build ( Finally ) (7)
CPU wont boot (7)
Building a gaming computer advice (5)
I think I just killed my computer w.. (24)
RCA 52Inch HDTV wont turn on (5)
Folderchat Weekday thread (444)
Recent Discussions
Futronix has water features? (0)
Laptop proccesor to desktop mob.. (2)
Please help! multiple problems! (4)
RCA 52Inch HDTV wont turn on (5)
New Build ( Finally ) (7)
Common Spyware Solutions (97)
How do you move a hard-drive to.. (4)
What is the best external enclo.. (0)
Partition Magic 7.0 (Unallocate.. (17)
Blackberry Storm, Gears of War .. (1)
Core 2 Quad Q9550 system (3)
COWBOOM Ripoff! Used Laptop w/$.. (4)


All times are GMT -4. The time now is 04:34 AM.
TechIMO Copyright 2008 All Enthusiast, Inc.



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28