d22552000 Posted October 12, 2007 Share Posted October 12, 2007 1. I AM NOT SENDING ANY HEADERS IN MY SCRIPT!!! 2. This only happens in my search script SINCE I changed the max post length in php.ini 3. I have more than 4GB of ram, and my virtual memory page file is 3x4GB page files. ERROR: Warning: Unknown: POST Content-Length of XX bytes exceeds the limit of -1048576 bytes in Unknown on line 0 Warning: Cannot modify header information - headers already sent in Unknown on line 0 sometimes it says "exceeds the limit of 0 bytes" in the output... where XX is a number of bytes from 3-30 depending on the user's search... PHP.INI CHANGED VALUES: ;;;;;;;;;;;;;;;;;;; ; Resource Limits ; ;;;;;;;;;;;;;;;;;;; max_execution_time = 480 ; Maximum execution time of each script, in seconds max_input_time = 960 ; Maximum amount of time each script may spend parsing request data memory_limit = 4096M ; Maximum amount of memory a script may consume (16MB) ;;;;;;;;;;;;;;;;; ; Data Handling ; ;;;;;;;;;;;;;;;;; ; ; Maximum size of POST data that PHP will accept. post_max_size = 4095M ;;;;;;;;;;;;;;;; ; File Uploads ; ;;;;;;;;;;;;;;;; ; ; Maximum allowed size for uploaded files. upload_max_filesize = 4090M FULL PHP CODE: <?PHP //search.php: include('./HTML/html.php'); include('../log.php'); $SELF = $_SERVER['PHP_SELF']; $HOST = $_SERVER['HTTP_HOST']; $RADD = $_SERVER['REMOTE_ADDR']; $RHST = $_SERVER['REMOTE_HOST']; $RPRT = $_SERVER['REMOTE_PORT']; $REFR = $_SERVER['HTTP_REFERER']; $REQU = $_SERVER['REQUEST_TIME']; $QURY = $_SERVER['QUERY_STRING']; $CONN = $_SERVER['HTTP_CONNECTION']; $USAG = $_SERVER['HTTP_USER_AGENT']; __log($SELF,$HOST,$RADD,$RHST,$RPRT,$REFR,$REQU,$QURY,$CONN,$USAG); if (!empty($_POST['search'])) { $mysearch =$_POST['search']; $mysearch = trim($mysearch); if (!$mysearch || $mysearch=='') html('Search, No Results!','No Results Were Returned!'); if (strlen($mysearch)<2) html('Search, Small Terms','The terms you used to search are too small. Three characters minimum.'); if (!strpos($mysearch,'%')===false) html('Search, Bad Results','Your search terms had one or more % (percent) characters in it. This is not allowed.'); /* MYSQL CONNECTION */ mysql_connect(localhost,'root',''); $sql = "SELECT * FROM `filepirate`.`files` "; $sql.= "WHERE `Name` LIKE '%$mysearch%' "; $sql.= "OR `Description` LIKE '%$mysearch%'"; $result = mysql_query($sql); if (!$result) html('Search, No Results!','No Results Were Returned!'); $num_books = mysql_num_rows($result); if ($num_books ==0) html('Search, No Results!','No Results Were Returned!'); $RET = '<h2>Search<br/><font size="3">Returned '.$num_books.' Results</font></h2> <TABLE width="75%"> <TR><TH>File Name</TH><TH>Description</TH><TH>Downloads</TH></TR> '; while(list($ID,$Name,$P,$Description,$T,$Downloads)= mysql_fetch_row($result)) { $RET.= " <TR><TD><a href='./FORM/Files.php?download&id=$ID'>$Name</a></TD><TD>$Description</TD><TD>$Downloads</TD></TR> "; } $RET.= '</TABLE>'; } else { $RET = '<h2>Search</h2><form action="search.php" method="POST">Search Term(s): <input type="text" name="search" /></form>'; html('Search!',$RET); } html('Search Returned '.$num_books.' Results.',$RET); ?> HTML.PHP CODE: <?PHP //html/html.php <?PHP function css() { echo 'A HUGE AMOUNT OF CSS WITH ALL THE \' ESCAPED.'; exit(); } function html($TITLE,$RET,$BASE=false,$SHIT=false,$ECT="") { $a=@file_get_contents('../pl.cnt'); $a++; file_put_contents('../pl.cnt',$a); $last=@file_get_contents('lastview'); $a = time() + microtime() / 10; file_put_contents('lastview',$a); $last = time() + microtime() - $last + microtime() / 10; $RET = str_replace('{{last}}',round($last,5),$RET); echo 'A HUGE AMOUNT OF HTML WITH ALL THE \' ESCAPED'; if ($BASE) { echo 'A HUGE AMOUNT OF HTML WITH ALL THE \' ESCAPED'; } else { echo 'A HUGE AMOUNT OF HTML WITH ALL THE \' ESCAPED'; } if ($SHIT) { echo ''A HUGE AMOUNT OF JAVASCRIPT WITH ALL THE \' ESCAPED''; } echo 'A HUGE AMOUNT OF HTML WITH ALL THE \' ESCAPED'; if ($BASE) { echo 'A HUGE AMOUNT OF HTML WITH ALL THE \' ESCAPED'; } echo 'A HUGE AMOUNT OF HTML WITH ALL THE \' ESCAPED'; exit(); } ?> LOG.PHP: <?PHP function __log($SELF,$HOST,$RADD,$RHST,$RPRT,$REFR,$REQU,$QURY,$CONN,$USAG) { /* MYSQL CONNECTION */ mysql_connect(*****); $SQL = "INSERT INTO `*`.`logs` ( `PHP_SELF`, `HTTP_HOST`, `REMOTE_ADDR`, `REMOTE_PORT`, `HTTP_REFERER`, `REQUEST_TIME`, `QUERY_STRING`, `HTTP_CONNECTION`, `HTTP_USER_AGENT` ) VALUES ( '$SELF', '$HOST', '$RADD', '$RPRT', '$REFR', NOW( ) , '$QURY', '$CONN', '$USAG' );"; mysql_query($SQL); mysql_close(*****); } ?> I was told that sizes had to be in order of (largest to smallest) : mem_size, post_size, file_size; I was told that if it was not in this order it would not catch post errors. Quote Link to comment Share on other sites More sharing options...
d22552000 Posted October 12, 2007 Author Share Posted October 12, 2007 *BUMP* this is on my site and it has had over 300 complaints about hte search nto working the last 2 hours. If you could please help it would REALLY be aprceiated. BTW I get these errors EVEN when I dont include log or html in it, I get it when I do the BARE guts of this. THE FUNNIEST PART is that my file upload section STILL WORKS, and it has a password and description text field, as well as 5 file input fields, and they upload with no errors. Quote Link to comment Share on other sites More sharing options...
d22552000 Posted October 12, 2007 Author Share Posted October 12, 2007 Fatal error: Allowed memory size of 262144 bytes exhausted (tried to allocate 393216 bytes) in C:\wamp\www\phpmyadmin\libraries\common.inc.php on line 770 is now what I get in my PHPMYADMIN, does PHP not allow 4GB file uploads?!?!?!? Quote Link to comment Share on other sites More sharing options...
ToonMariner Posted October 12, 2007 Share Posted October 12, 2007 no and in practicle terms who on earth is going to upload 4G over http???? Quote Link to comment Share on other sites More sharing options...
d22552000 Posted October 12, 2007 Author Share Posted October 12, 2007 who doesnt... some people don't know how to do any different uploads besides HTTP, BTW we do mass site moves and have a very large buffer... I guess I will have to use PERL to handle the upload.. *sigh* I really hate perl. ANyways, I set the limites back down to 1GB,512MB, and 500MB. Unfortunetely really. I am also allowing 4GB max post size cause the multi-upload form allows 10 files and I know some people will upload uncompressed videos (800-1200 MB) per file... Quote Link to comment Share on other sites More sharing options...
ToonMariner Posted October 15, 2007 Share Posted October 15, 2007 good job bandwidth does cost as much as it used too.... Quote Link to comment Share on other sites More sharing options...
d22552000 Posted October 17, 2007 Author Share Posted October 17, 2007 .. no it doenst. I just recently upgraded my ISP, and at a low 5MBIT upload speed,. I get ulimited B/w (80TB /m) and who the hell uses 80TB on a 5MBIT connection!? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.