- Home
- Categorie
- Coding e Sistemistica
- Coding
- Errore: Cannot modify header information
- 
							
							
							
							
							
Errore: Cannot modify header informationiao a tutti, 
 ho traslocato un blog da un host ad un altro.
 Nel nuovo sito però non riesco a vedere le thumbnails degli articoli, e al posto dell'immagine ho la classica Xse copio il link a cui rimanderebbe l'immagine nel browser vedo questo errore: Deprecated: Function eregi() is deprecated in /home/ilpluffi/public_html/wp-content/themes/mobipress/mobipress-theme/timthumb.php on line 232 Deprecated: Function split() is deprecated in /home/ilpluffi/public_html/wp-content/themes/mobipress/mobipress-theme/timthumb.php on line 334 Warning: Cannot modify header information - headers already sent by (output started at /home/ilpluffi/public_html/wp-content/themes/mobipress/mobipress-theme/timthumb.php:232) in /home/ilpluffi/public_html/wp-content/themes/mobipress/mobipress-theme/timthumb.php on line 313 Warning: Cannot modify header information - headers already sent by (output started at /home/ilpluffi/public_html/wp-content/themes/mobipress/mobipress-theme/timthumb.php:232) in /home/ilpluffi/public_html/wp-content/themes/mobipress/mobipress-theme/timthumb.php on line 315 Warning: Cannot modify header information - headers already sent by (output started at /home/ilpluffi/public_html/wp-content/themes/mobipress/mobipress-theme/timthumb.php:232) in /home/ilpluffi/public_html/wp-content/themes/mobipress/mobipress-theme/timthumb.php on line 316 Warning: Cannot modify header information - headers already sent by (output started at /home/ilpluffi/public_html/wp-content/themes/mobipress/mobipress-theme/timthumb.php:232) in /home/ilpluffi/public_html/wp-content/themes/mobipress/mobipress-theme/timthumb.php on line 317 Warning: Cannot modify header information - headers already sent by (output started at /home/ilpluffi/public_html/wp-content/themes/mobipress/mobipress-theme/timthumb.php:232) in /home/ilpluffi/public_html/wp-content/themes/mobipress/mobipress-theme/timthumb.php on line 318 Sapete dirmi quale può essere il problema??? 
 
- 
							
							
							
							
							Ciao Vlao19, 
 utilizzi 2 funzioni deprecate quindi la notifica di errore crea problemi, o provvedi a modificare le funzioni o nascondi l'errore mediante la @ e tornerà a funzionare.
 
- 
							
							
							
							
							
Grazie per l'aiuto, ma scusami per l'ignoranza... sono un apprendista autodidatta! Come faccio a nascondere l'errore con @??? 
 Penso sia la soluzione più semplice...Questa dovrebbe essere la parte con la funzione split... l'altra non l'ho trovata ancora function get_cache_file () { global $quality; static $cache_file; if(!$cache_file) { $frags = split( "\.", $_REQUEST['src'] ); $ext = strtolower( $frags[ count( $frags ) - 1 ] ); if(!valid_extension($ext)) { $ext = 'jpg'; } $cachename = get_request( 'src', 'timthumb' ) . get_request( 'w', 100 ) . get_request( 'h', 100 ) . get_request( 'zc', 1 ) . get_request( '9', 80 ); $cache_file = md5( $cachename ) . '.' . $ext; } return $cache_file;} 
 
- 
							
							
							
							
							Vai alle righe indicate e metti davanti a eregi la @ trasformandolo in @eregi. 
 Fai la stessa cosa anche con la funzione split.
 
- 
							
							
							
							
							
Wow! Sei un grande! 
 Grazie dell'aiuto. Adesso funziona tutto!Ma da cosa è causato questo errore? Dalla diversa versione di Php nei due server??? 
 
- 
							
							
							
							
							SI il nuovo server ha una versione più recente del vecchio, oppure semplicemente il vecchio era configurato per nascondere gli errori. 
 Tieni presente che quelle funzioni verranno rimosse con php 6 e il tuo script smetterà di funzionare.