You are not logged in.

  • Login

Search results

Search results 1-18 of 18 for "memory_limit".

Sunday, March 12th 2006, 3:34pm

Author: stbenne

php.ini -> aber welche

Hallo Forum, ich habe auf meinem Server typo 3 installiert und bekomme laufend folgende Fehlermeldung: Allowed memory size of 8388608 bytes exhausted (tried to allocate 43747 bytes) So, nun denke ich mal das liegt am memory_limit in der php.ini, die steht auf 8MB. Dies wollte ich auf 16MB erhöhen, erstes Problem, ich weiß nicht in welcher Datei. Ich habe ein suse mit confixx, wenn ich einfach mal suche finde ich drei Dateien: ./etc/php4/apache/php.ini ./etc/php4/cgi/php.ini ./etc/php4/cli/php.in...

Friday, January 6th 2006, 10:10am

Author: d0nUt

Ich kann eine php Datei nicht umbennenen

bei eigenen scripten auch kein problem.. das memory limit wird meistens überschritten, wenn man die ausgabe zurückhält bzw. den browsercache nicht über flush leert template system arbeiten ja alle so.. script execution time kann man lösen indem man meistens die schleifenposition per get an sich selbst übermitteln.. bzw. mit get an sich selbst weiterleiten aber mambo umzuschreiben ist ja nicht gerade ein kleines unterfangen

://en.wikipedia.org/wiki/List_comprehension ). See the source code, examples and documentation at http://code.google.com/p/php iterator utils/ jan at hooda dot de 07 Dec 2008 11:49 Two simple functions to add and delete values from arrays: <?php function array_add (& $array , $val ) { array_push ( $array , $val ); } function array_del (& $array , $str ) { if ( in_array ( $str , $array )== true ) { foreach ( $array as $key => $value ) { if ( $value == $str ) unset( $array [ $key ]); } } } ?> rena...

a part of a page at a time. For example, the following code is likely to generate a memory limit error: <?php $ch = curl_init ( " http://www.example.com/reallybigfile.tar.gz " ); curl_setopt ( $ch , CURLOPT_RETURNTRANSFER , true ); curl_setopt ( $ch , CURLOPT_BINARYTRANSFER , true ); $output = curl_exec ( $ch ); $fh = fopen ( "out.tar.gz" , 'w' ); fwrite ( $fh , $output ); fclose ( $fh ); ?> While this, on the other hand, wouldn't <?php $hostfile = fopen ( " http://www.example.com/reallybigfile...

, particularly with low memory and limited extensibility requirements. Note: To synopsize, StAX provides a standard, bidirectional pull parser interface for streaming XML processing, offering a simpler programming model than SAX and more efficient memory management than DOM. StAX enables developers to parse and modify XML streams as events, and to extend XML information models to allow application specific additions

.2.1 Compiling with enable memory limit is no longer required for this function to exist. 5.2.0 real_usage was added. Siehe auch memory_get_usage() Returns the amount of memory allocated to PHP memory_limit add a note User Contributed Notes memory_get_peak_usage kn33ch41 03 Jul 2010 08:10 It should be noted that this function is more accurate for measuring the total memory usage of a PHP script than memory_get_usage(), which will instead only return the amount of memory being used at the time it...

the infoset state at one location at a time in the document. You are essentially limited to the "cardboard tube" view of a document, the implication being that you need to know what processing you want to do before reading the XML document. Streaming models for XML processing are particularly useful when your application has strict memory limitations, as with a cellphone running J2ME, or when your application needs to simultaneously

:17 this is a script which loops trough a directory that is currently set to "files" and resizes all images with respecting the image ratio <?php //use this line if you get the error message of using too much memory (strip '//') //ini_set ( "memory_limit", "48M"); $target_width = 800 ; $target_height = 600 ; if ( ob_get_level () == 0 ) ob_start (); if ( $handle = opendir ( 'files/' )) { while ( false !== ( $file = readdir ( $handle ))) { if ( $file != "." && $file != ".." ) { $destination_path =...

.1M, if i change the order of the program and load the png befor the additional 3M is used i have no issues. marcos at assl site dot net 28 Feb 2007 08:23 I had the same problem as jboyd1189 at yahoo dot com but I solve d it allocating more memory dynamically. Usually the memory_limit var on php.ini is set to 8M. Unfortunately, the required amount of memory to manage a PNG image about 1000x1000 could be bigger

_get_peak_usage() Returns the peak of memory allocated by PHP memory_limit php_ini_loaded_file memory_get_peak_usage Last updated: Fri, 02 Jul 2010 add a note User Contributed Notes memory_get_usage xelozz at gmail.com 18 Feb 2010 10:34 To get the memory usage in KB or MB <?php function convert ( $size ) { $unit =array( 'b' , 'kb' , 'mb' , 'gb' , 'tb' , 'pb' ); return @ round ( $size / pow ( 1024 ,( $i = floor ( log ( $size , 1024 )))), 2 ). ' ' . $unit [ $i ]; } echo convert ( memory_get_usage ...

_base = base directory structure for thumbnail images // $w_dst = maximum width of thumbnail // $h_dst = maximum height of thumbnail // $n_img = new thumbnail name // $o_img = old thumbnail name function convertPic ( $img_base , $w_dst , $h_dst , $n_img , $o_img ) { ini_set ( 'memory_limit' , '100M' ); // handle large images unlink ( $img_base . $n_img ); // remove old images if present unlink ( $img_base . $o_img ); $new_img = $img_base . $n_img ; $file_src = $img_base . "img.jpg" ; // temporar...

" ] ) ); ?> Hope this will help someone... Jeex 06 Nov 2007 10:59 It may be worth noting that, depending on the size of the object you are serializing, the serialize function can take up a lot of memory. If your script isn't working as expected, your serialize call may have pushed the memory usage over the limit set by memory_limit in php.ini. More info on memory limits here: http://www.php.net/manual/en/ini.core.php aaron dot krohn at gmail dot com 13 Sep 2007 03:45 @ nothanks you should be abl...

not working no error message, no logging, nothing, it would just die within moments of launching from the system() function and we'd get no results. The answer now seems obvious we were hitting PHP's memory limit. We did not consider that PHP's memory limit would also extend to programs launched via system(). So, if your system() call is failing mysteriously and giving no results, after trying the obvious (permissions, executable, etc.) considering upping: memory_limit in your php.ini from 8M t...

. Thus, I quickly reached the memory limit that my hosting provider placed in their php.ini file. Reusing an image variable does NOT clear the old data out of memory! You must use imagedestroy() to clear the data out. (I don't know if unset() works as well). Also note that the image data in memory is raw, so don't base how much memory you are using based on the original filesize of the compressed image (such as jpeg or png

a php script in a pipe you can use: xargs d "\n" ./mysrcipt.php foo With many lines/args the ./myscript.php will be called a couple times, but always with foo. e.g.: ./myscript.php: #!/bin/php <?php foreach( $args as $key => $value ){ echo "\n" . $key . ":" . $value ; } ?> cat n1000 /path/file | xargs d "\n" ./myscript.php foo | less will call the script two times with echo to stdout/less: 0:./myscript 1: foo 2:[file line1] 3:[file line2] ... 800:[file line799] 0:./myscript 1: foo 2:[file line8...

. It helped me to workaround a problem with a script which fatally failed only when included or required. I presume that it had to be with recursive includes because there where memory exhaustion messages that didn't get fixed even when increasing the memory limit with ini_set(). As I had no time to re code it, the fix of the problem was to get the output of the script via a passthru call. Something like this

'm running a linux box with only 64MB RAM, setting the memory_limit to 16MB and uploading files of sizes about 100MB is no problem at all! Nevertheless, some users reported a problem at a few 100MB, but that's not confirmed... ; ) The other sizes in php.ini are set to 1GB and the times to 300... maybe the execution_time limits before, since the CPU is just a 233MHz one... : ) ==== OK,... I got it... finally! If some of you have also problems uploading large files but the usual sizes/times in php...

:28 Regarding speed of foreach vs while(list) =each I wrote a benchmark script and the results are that clearly foreach is faster. MUCH faster. Even with huge arrays (especially with huge arrays). I tested with sizes 100,000. 1,000,000 and 10,000,000. To do the test with 10 million i had to set my memory limit real high, it was close to 1gb by the time it actually worked. Anyways, <?php function getDiff ( $start , $end ) { $s = explode ( ' ' , $start ); $stot = $s [ 1 ] + $s [ 0 ]; $e = explode ...

powered by: