#1 6. September 2010 Maximum execution time of 30 seconds exceeded Mein Hoster würde es erhöhen, aber bei mein free hoster hab ich sogar noch weniger? http://gamezandmore.square7.ch/info.php Code: PHP Version 5.3.3 Directive Local Value Master Value allow_call_time_pass_reference On On allow_url_fopen On On allow_url_include On On always_populate_raw_post_data Off Off arg_separator.input & & arg_separator.output & & asp_tags Off Off auto_append_file no value no value auto_globals_jit On On auto_prepend_file no value no value browscap no value no value default_charset no value no value default_mimetype text/html text/html define_syslog_variables Off Off disable_classes no value no value disable_functions disk_free_space, diskfreespace, disk_total_space, dl, error_log, exec, get_current_user, getrusage, gzcompress, leak, link, openlog, passthru, popen, proc_close, proc_get_status, proc_nice, proc_open, proc_terminate, shell_exec, stream_socket_server, symlink, syslog, system disk_free_space, diskfreespace, disk_total_space, dl, error_log, exec, get_current_user, getrusage, gzcompress, leak, link, openlog, passthru, popen, proc_close, proc_get_status, proc_nice, proc_open, proc_terminate, shell_exec, stream_socket_server, symlink, syslog, system display_errors On On display_startup_errors Off Off doc_root no value no value docref_ext no value no value docref_root http://de.php.net/ http://de.php.net/ enable_dl Off Off error_append_string no value no value error_log no value no value error_prepend_string no value no value error_reporting 6135 6135 exit_on_timeout Off Off expose_php Off Off extension_dir /usr/share/extensions/no-debug-non-zts-20090626 /usr/share/extensions/no-debug-non-zts-20090626 file_uploads On On highlight.bg #FFFFFF #FFFFFF highlight.comment #FF8000 #FF8000 highlight.default #0000BB #0000BB highlight.html #000000 #000000 highlight.keyword #007700 #007700 highlight.string #DD0000 #DD0000 html_errors On On ignore_repeated_errors Off Off ignore_repeated_source Off Off ignore_user_abort Off Off implicit_flush Off Off include_path . . log_errors Off Off log_errors_max_len 2048 2048 magic_quotes_gpc On On magic_quotes_runtime Off Off magic_quotes_sybase Off Off mail.add_x_header Off Off mail.force_extra_parameters no value no value mail.log no value no value max_execution_time 12 12 max_file_uploads 20 20 max_input_nesting_level 64 64 max_input_time 20 20 memory_limit 64M 64M open_basedir /users/gamezandmore/temp:/users/gamezandmore/www /users/gamezandmore/temp:/users/gamezandmore/www output_buffering no value no value output_handler no value no value post_max_size 132M 132M precision 14 14 realpath_cache_size 1024k 1024k realpath_cache_ttl 300 300 register_argc_argv On On register_globals Off Off register_long_arrays On On report_memleaks On On report_zend_debug On On request_order no value no value safe_mode Off Off safe_mode_exec_dir no value no value safe_mode_gid Off Off safe_mode_include_dir no value no value sendmail_from no value no value sendmail_path /usr/sbin/sendmail -t -i -fno-reply_gamezandmore_report-spam-to-square7.ch -F Square7.ch /usr/sbin/sendmail -t -i -fno-reply_gamezandmore_report-spam-to-square7.ch -F Square7.ch serialize_precision 100 100 short_open_tag On On SMTP localhost localhost smtp_port 25 25 sql.safe_mode Off Off track_errors Off Off unserialize_callback_func no value no value upload_max_filesize 128M 128M upload_tmp_dir /users/gamezandmore/temp /users/gamezandmore/temp user_dir no value no value user_ini.cache_ttl 60 60 user_ini.filename .php.ini .php.ini variables_order EGPCS EGPCS xmlrpc_error_number 0 0 xmlrpc_errors Off Off y2k_compliance On On zend.enable_gc On On Wie kann des sein? Auf was soll ich erhöhen? Oder liegt der Fehler an etwas anderes? + Multi-Zitat Zitieren
#2 6. September 2010 AW: Maximum execution time of 30 seconds exceeded 12 sekunden reicht doch. der fehler liegt sehr warscheinlich an deinem code. endlosschleife/endlosrekursion oder sowas. + Multi-Zitat Zitieren
#3 6. September 2010 AW: Maximum execution time of 30 seconds exceeded max_execution_time kann man in der php.ini ändern. Da liegt kein Fehler vor, dein Hoster hat es lediglich geändert. Was du versuchen kannst ist PHP: ini_set ( "max_execution_time" , 60 ); Lokal funktioniert das bei mir, kann aber sein, dass man bei normalen Webspace das nicht ändern kann + Multi-Zitat Zitieren
#4 6. September 2010 AW: Maximum execution time of 30 seconds exceeded Des komische ist auf mein Paid Server wo 30 Secons drin ist klappt es nicht und auf mein Free Space mit 12 klappt es? Schon komisch :/ Hier der Code: Code: <?php //######################################################################// //# #// //# PUB CHECK LIBRARY V 0.1 #// //# ----------------------- #// //# #// //######################################################################// error_reporting(1); class pub { var $IP; var $Login; var $Pass; var $Port; var $Dir; var $Handle; function connect() { $start=microtime(); $this->Handle = ftp_connect($this->IP,$this->Port,10); if (!$this->Handle){ return 0; }else{ $runtime=measure_time($start,3); return $runtime; } } function login($check) { $start=microtime(); $login_result = ftp_login($this->Handle,$this->Login,$this->Pass); if (!$login_result) { return 0; }else{ $runtime=measure_time($start,3); $check->Systype=ftp_systype($this->Handle); return $runtime; } } } class check { var $Systype; var $Chunksize; var $Checkblacklist; var $Checkblacklisted; var $Downspeed; var $Upspeed; var $Blacklisted; var $Nondeletable; function checkblacklist($pub) { $this->Blacklisted=0; if (!file_exists('./blacklist/blacklisted_ips.txt')){ $this->Blacklisted='FEHLER: ./blacklist/blacklisted_ips.txt nicht gefunden!'; }else{ $file=fopen('./blacklist/blacklisted_ips.txt','r+'); $ip_pub_array=explode('.',$pub->IP); $ip_calc=(($ip_pub_array[0]*16581375)+($ip_pub_array[1]*65025)+($ip_pub_array[2]*255)+($ip_pub_array[3])); $searchstr='/(\*|('.$ip_pub_array[0].'))\.(\*|('.$ip_pub_array[1].'))\.(\*|('.$ip_pub_array[2].'))\.(\*|('.$ip_pub_array[3].'))*/'; while (!feof($file)){ $zeile=fgets($file); $i++; if(strpos($zeile,'-')){ $dash=strpos($zeile,'-'); $start_ip=explode('.',str_replace('*','0',substr($zeile,0,$dash))); $end_ip=explode('.',str_replace('*','255',substr($zeile,$dash+1))); $start_calc=(($start_ip[0]*16581375)+($start_ip[1]*65025)+($start_ip[2]*255)+($start_ip[3])); $end_calc=(($end_ip[0]*16581375)+($end_ip[1]*65025)+($end_ip[2]*255)+($end_ip[3])); if ($ip_calc>=$start_calc && $ip_calc<=$end_calc){ $this->Blacklisted=$zeile; break; } }else{ if (preg_match($searchstr,$zeile)){ $this->Blacklisted=$zeile; break; } } } fclose($file); } } function check_upload($pub,$filename) { $start=microtime(); $upload = ftp_put($pub->Handle, $pub->Dir.$filename, "./".$filename, FTP_BINARY); if (!$upload){ $this->Upspeed=0; return 0; $loc_delerror=unlink($filename); } $runtime=measure_time($start,3); $this->Upspeed=round((filesize($filename)/1024)/$runtime,1); return $this->Upspeed.','.$runtime; } function check_download($pub,$filename) { $start=microtime(); $download = ftp_get($pub->Handle, "./".$filename,$pub->Dir.$filename,FTP_BINARY); if (!$download){ $this->Downspeed=0; return 0; $loc_delerror=unlink($filename); }else{ $runtime=measure_time($start,3); $this->Downspeed=round((filesize($filename)/1024/$runtime),1); return $this->Downspeed.','.$runtime; } } function delete_remotefile($pub,$filename) { if (!ftp_delete($pub->Handle,$pub->Dir.$filename)){ $this->Nondeletable=1; }else{ $this->Nondeletable=0; } } } function generate_testfile($filename,$KBs) { $pointer=fopen($filename,'w+'); for ($i=1;$i<=$KBs;$i++){ fputs($pointer,'0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123'); } fclose($pointer); return $result=md5_file($filename); } function measure_time($startvalue,$fixed) { $end=microtime(); list($startmsec,$startsec)=explode(" ",$startvalue); list($endmsec,$endsec)=explode(" ",$end); return round((($endmsec+$endsec)-($startmsec+$startsec)),$fixed); } ?> + Multi-Zitat Zitieren
#5 7. September 2010 AW: Maximum execution time of 30 seconds exceeded Wurde erhöht, immer noch der selbe Fehler. Der Fehler muss in dem Code liegen den ich gepostet hab? :/ + Multi-Zitat Zitieren
#6 7. September 2010 AW: Maximum execution time of 30 seconds exceeded also rein aus erfahrung passiert sowas (wie murdoc schon erwähnte) aus nur ein paar möglichen dingen bei so einem error - checke for/while schleifen - checke rekursionen - kann ebenfalls vorkommen: verbindung ist gestört (hab mal versucht über vpm auf nen firmennotebook zuzugreifen und dort nen webapp aufzurufen das mehrere 1000 datensätze ausgibt... hat zu lang gedauert weil die übertragung einfach fürn ***** war ) aber das wirds bei dir wohl nicht sein... ich hab da bei dir im code ne whileschleife gesehen.. rück den code mal n wenig ein bitte und mach n [ PHP ] [ / PHP ] drum anstatt n [ CODE ] [ / CODE ] + Multi-Zitat Zitieren
#7 8. September 2010 AW: Maximum execution time of 30 seconds exceeded PHP: <? php //######################################################################// //# #// //# PUB CHECK LIBRARY V 0.1 #// //# ----------------------- #// //# #// //######################################################################// error_reporting ( 1 ); class pub { var $IP ; var $Login ; var $Pass ; var $Port ; var $Dir ; var $Handle ; function connect () { $start = microtime (); $this -> Handle = ftp_connect ( $this -> IP , $this -> Port , 10 ); if (! $this -> Handle ){ return 0 ; }else{ $runtime = measure_time ( $start , 3 ); return $runtime ; } } function login ( $check ) { $start = microtime (); $login_result = ftp_login ( $this -> Handle , $this -> Login , $this -> Pass ); if (! $login_result ) { return 0 ; }else{ $runtime = measure_time ( $start , 3 ); $check -> Systype = ftp_systype ( $this -> Handle ); return $runtime ; } } } class check { var $Systype ; var $Chunksize ; var $Checkblacklist ; var $Checkblacklisted ; var $Downspeed ; var $Upspeed ; var $Blacklisted ; var $Nondeletable ; function checkblacklist ( $pub ) { $this -> Blacklisted = 0 ; if (! file_exists ( './blacklist/blacklisted_ips.txt' )){ $this -> Blacklisted = 'FEHLER: ./blacklist/blacklisted_ips.txt nicht gefunden!' ; }else{ $file = fopen ( './blacklist/blacklisted_ips.txt' , 'r+' ); $ip_pub_array = explode ( '.' , $pub -> IP ); $ip_calc =(( $ip_pub_array [ 0 ]* 16581375 )+( $ip_pub_array [ 1 ]* 65025 )+( $ip_pub_array [ 2 ]* 255 )+( $ip_pub_array [ 3 ])); $searchstr = '/(\*|(' . $ip_pub_array [ 0 ]. '))\.(\*|(' . $ip_pub_array [ 1 ]. '))\.(\*|(' . $ip_pub_array [ 2 ]. '))\.(\*|(' . $ip_pub_array [ 3 ]. '))*/' ; while (! feof ( $file )){ $zeile = fgets ( $file ); $i ++; if( strpos ( $zeile , '-' )){ $dash = strpos ( $zeile , '-' ); $start_ip = explode ( '.' , str_replace ( '*' , '0' , substr ( $zeile , 0 , $dash ))); $end_ip = explode ( '.' , str_replace ( '*' , '255' , substr ( $zeile , $dash + 1 ))); $start_calc =(( $start_ip [ 0 ]* 16581375 )+( $start_ip [ 1 ]* 65025 )+( $start_ip [ 2 ]* 255 )+( $start_ip [ 3 ])); $end_calc =(( $end_ip [ 0 ]* 16581375 )+( $end_ip [ 1 ]* 65025 )+( $end_ip [ 2 ]* 255 )+( $end_ip [ 3 ])); if ( $ip_calc >= $start_calc && $ip_calc <= $end_calc ){ $this -> Blacklisted = $zeile ; break; } }else{ if ( preg_match ( $searchstr , $zeile )){ $this -> Blacklisted = $zeile ; break; } } } fclose ( $file ); } } function check_upload ( $pub , $filename ) { $start = microtime (); $upload = ftp_put ( $pub -> Handle , $pub -> Dir . $filename , "./" . $filename , FTP_BINARY ); if (! $upload ){ $this -> Upspeed = 0 ; return 0 ; $loc_delerror = unlink ( $filename ); } $runtime = measure_time ( $start , 3 ); $this -> Upspeed = round (( filesize ( $filename )/ 1024 )/ $runtime , 1 ); return $this -> Upspeed . ',' . $runtime ; } function check_download ( $pub , $filename ) { $start = microtime (); $download = ftp_get ( $pub -> Handle , "./" . $filename , $pub -> Dir . $filename , FTP_BINARY ); if (! $download ){ $this -> Downspeed = 0 ; return 0 ; $loc_delerror = unlink ( $filename ); }else{ $runtime = measure_time ( $start , 3 ); $this -> Downspeed = round (( filesize ( $filename )/ 1024 / $runtime ), 1 ); return $this -> Downspeed . ',' . $runtime ; } } function delete_remotefile ( $pub , $filename ) { if (! ftp_delete ( $pub -> Handle , $pub -> Dir . $filename )){ $this -> Nondeletable = 1 ; }else{ $this -> Nondeletable = 0 ; } } } function generate_testfile ( $filename , $KBs ) { $pointer = fopen ( $filename , 'w+' ); for ( $i = 1 ; $i <= $KBs ; $i ++){ fputs ( $pointer , '0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123' ); } fclose ( $pointer ); return $result = md5_file ( $filename ); } function measure_time ( $startvalue , $fixed ) { $end = microtime (); list( $startmsec , $startsec )= explode ( " " , $startvalue ); list( $endmsec , $endsec )= explode ( " " , $end ); return round ((( $endmsec + $endsec )-( $startmsec + $startsec )), $fixed ); } ?> Habs mal eben gemacht. ^^ + Multi-Zitat Zitieren
#8 8. September 2010 AW: Maximum execution time of 30 seconds exceeded habs mal vollendet... (nur die einrückung, das ging vorher garnicht!) Jetzt kann man das ganze zumindest mal lesen ich werde jetzt mal nach dem problem suchen.. PHP: <? php //######################################################################////# #////# PUB CHECK LIBRARY V 0.1 #////# ----------------------- #////# #////######################################################################// error_reporting ( 1 ); class pub { var $IP ; var $Login ; var $Pass ; var $Port ; var $Dir ; var $Handle ; function connect () { $start = microtime (); $this -> Handle = ftp_connect ( $this -> IP , $this -> Port , 10 ); if (! $this -> Handle ){ return 0 ; }else{ $runtime = measure_time ( $start , 3 ); return $runtime ; } } function login ( $check ) { $start = microtime (); $login_result = ftp_login ( $this -> Handle , $this -> Login , $this -> Pass ); if (! $login_result ) { return 0 ; } else { $runtime = measure_time ( $start , 3 ); $check -> Systype = ftp_systype ( $this -> Handle ); return $runtime ; } } } class check { var $Systype ; var $Chunksize ; var $Checkblacklist ; var $Checkblacklisted ; var $Downspeed ; var $Upspeed ; var $Blacklisted ; var $Nondeletable ; function checkblacklist ( $pub ) { $this -> Blacklisted = 0 ; if (! file_exists ( './blacklist/blacklisted_ips.txt' )) { $this -> Blacklisted = 'FEHLER: ./blacklist/blacklisted_ips.txt nicht gefunden!' ; } else { $file = fopen ( './blacklist/blacklisted_ips.txt' , 'r+' ); $ip_pub_array = explode ( '.' , $pub -> IP ); $ip_calc =(( $ip_pub_array [ 0 ]* 16581375 )+( $ip_pub_array [ 1 ]* 65025 )+( $ip_pub_array [ 2 ]* 255 )+( $ip_pub_array [ 3 ])); $searchstr = '/(\*|(' . $ip_pub_array [ 0 ]. '))\.(\*|(' . $ip_pub_array [ 1 ]. '))\.(\*|(' . $ip_pub_array [ 2 ]. '))\.(\*|(' . $ip_pub_array [ 3 ]. '))*/' ; while (! feof ( $file )) { $zeile = fgets ( $file ); $i ++; if( strpos ( $zeile , '-' )) { $dash = strpos ( $zeile , '-' ); $start_ip = explode ( '.' , str_replace ( '*' , '0' , substr ( $zeile , 0 , $dash ))); $end_ip = explode ( '.' , str_replace ( '*' , '255' , substr ( $zeile , $dash + 1 ))); $start_calc =(( $start_ip [ 0 ]* 16581375 )+( $start_ip [ 1 ]* 65025 )+( $start_ip [ 2 ]* 255 )+( $start_ip [ 3 ])); $end_calc =(( $end_ip [ 0 ]* 16581375 )+( $end_ip [ 1 ]* 65025 )+( $end_ip [ 2 ]* 255 )+( $end_ip [ 3 ])); if ( $ip_calc >= $start_calc && $ip_calc <= $end_calc ) { $this -> Blacklisted = $zeile ; break; } } else { if ( preg_match ( $searchstr , $zeile )) { $this -> Blacklisted = $zeile ; break; } } } fclose ( $file ); } } function check_upload ( $pub , $filename ) { $start = microtime (); $upload = ftp_put ( $pub -> Handle , $pub -> Dir . $filename , "./" . $filename , FTP_BINARY ); if (! $upload ) { $this -> Upspeed = 0 ; return 0 ; $loc_delerror = unlink ( $filename ); } $runtime = measure_time ( $start , 3 ); $this -> Upspeed = round (( filesize ( $filename )/ 1024 )/ $runtime , 1 ); return $this -> Upspeed . ',' . $runtime ; } function check_download ( $pub , $filename ) { $start = microtime (); $download = ftp_get ( $pub -> Handle , "./" . $filename , $pub -> Dir . $filename , FTP_BINARY ); if (! $download ) { $this -> Downspeed = 0 ; return 0 ; $loc_delerror = unlink ( $filename ); } else { $runtime = measure_time ( $start , 3 ); $this -> Downspeed = round (( filesize ( $filename )/ 1024 / $runtime ), 1 ); return $this -> Downspeed . ',' . $runtime ; } } function delete_remotefile ( $pub , $filename ) { if (! ftp_delete ( $pub -> Handle , $pub -> Dir . $filename )) { $this -> Nondeletable = 1 ; } else { $this -> Nondeletable = 0 ; } } } function generate_testfile ( $filename , $KBs ){ $pointer = fopen ( $filename , 'w+' ); for ( $i = 1 ; $i <= $KBs ; $i ++) { fputs ( $pointer , '0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123' ); } fclose ( $pointer ); return $result = md5_file ( $filename );} function measure_time ( $startvalue , $fixed ){ $end = microtime (); list( $startmsec , $startsec )= explode ( " " , $startvalue ); list( $endmsec , $endsec )= explode ( " " , $end ); return round ((( $endmsec + $endsec )-( $startmsec + $startsec )), $fixed );} ?> + Multi-Zitat Zitieren
#9 9. September 2010 AW: Maximum execution time of 30 seconds exceeded Hat den keiner einer eine Lösung? :/ + Multi-Zitat Zitieren
#10 9. September 2010 AW: Maximum execution time of 30 seconds exceeded Wie soll man Dir denn helfen, bei den wenigen Informationen die Du uns gibst? Debugge den Code doch mal, in dem Du einfach checkst, wann genau er den Hänger hat. An für sich würde ich auf den Upload tippen. Ein Freehoster ist für sowas auch garnicht geeignet. + Multi-Zitat Zitieren
#11 9. September 2010 AW: Maximum execution time of 30 seconds exceeded Dort kommt dann der Fehler PHP: Fatal error : Maximum execution time of 60 seconds exceeded in *** lib . inc . php on line 69 Und das ist die Leine 69 PHP: while (! feof ( $file )){ Das komische ist halt das es bei Xampp geht. + Multi-Zitat Zitieren
#12 9. September 2010 AW: Maximum execution time of 30 seconds exceeded Kann sein, dass das manchmal net ganz funzt wie gewünscht. Einfach fread() benutzen bis nichts mehr gelesen wird, oder einfach file_get_contents() verwenden. + Multi-Zitat Zitieren
#13 10. September 2010 Zuletzt von einem Moderator bearbeitet: 14. April 2017 AW: Maximum execution time of 30 seconds exceeded Hier mal des ganze Skript? Vielleicht findet jemand den Fehler :/ No File | xup.in + Multi-Zitat Zitieren
#14 14. September 2010 AW: Maximum execution time of 30 seconds exceeded keiner eine Idee?? + Multi-Zitat Zitieren
#15 14. September 2010 AW: Maximum execution time of 30 seconds exceeded Hat die Datei die gelesen werden soll überhaupt die Richtigen Rechte dafür? Die Prüfung solltest du vielleicht einmal vor dem Lesen machen. + Multi-Zitat Zitieren