begin process at 2012 02 15 20:24:37
  Trouver un code source :
 
dans
 
Accueil > Forum > 

PHP

 > 

Base de données

 > 

MySQL

 > 

Erreur de type Fatal error: Allowed memory size of xx bytes exhausted


Derniers messages déposésPoser une question dans le forum ou lancer une discussion

Erreur de type Fatal error: Allowed memory size of xx bytes exhausted

jeudi 15 mai 2008 à 13:36:11 | Erreur de type Fatal error: Allowed memory size of xx bytes exhausted

puissanceX

Bonjour,

J'ai une application php 5. Sur une page qui 1800 lignes environ dans un tableau, quand je fais l'export du tableau, je n'obtiens que 1600 lignes avec ce message d'erreur:
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 16 bytes) in /core/adodb/drivers/adodb-mysql.inc.php on line 552.

Après documentation, j'ai augmenté la valeur du memory_limit dans le fichier php.ini.
Mais cela ne donne aucun changement et j'ai le même message d'erreur.

Quelqu'un saurait d'où peut venir le problème?

Merci d'avance pour toutes vos réponses.
jeudi 15 mai 2008 à 19:49:38 | Re : Erreur de type Fatal error: Allowed memory size of xx bytes exhausted

malalam

Administrateur CodeS-SourceS
Hello,

montre le script, on peut peut-être l'optimiser.
jeudi 15 mai 2008 à 20:10:16 | Re : Erreur de type Fatal error: Allowed memory size of xx bytes exhausted

puissanceX

Bonjour,
Voici le script en question qui construit les lignes du tabeau du fichier excel d'export:

<?php


 $field_name_count = $field_name_count;

 $f_bug_arr = explode_enum_string( $f_export );

 for( $i=0; $i < $row_count; $i++ ) {
  if ( isset( $f_bug_arr[$i] ) ) {
   $index = $f_bug_arr[$i];
   $t_bug_arr_sort[$index]=1;
  }
 }

 for( $i=0; $i < $row_count; $i++ ) {

  # prefix bug data with v_
  extract( $result[$i], EXTR_PREFIX_ALL, 'v' );
        $v_os       = string_display( $v_os );
  $v_os_build     = string_display( $v_os_build );
  $v_platform     = string_display( $v_platform );
  $v_version      = string_display( $v_version );
  $v_id_version    = string_display( $v_id_version );
  $v_fixed_version   = string_display(  $v_id_fixed_version );
  $v_summary      = string_display_links( $v_summary );
  $v_summary     = stripslashes(strtr($v_summary, $sgml_carte));

  if(($f_typeRequest == 10 )&& ($v_is_bug == 10)) {

  $t_last_updated = date( $g_short_date_format, $v_last_updated );

  # grab the bugnote count
  $bugnote_count = bug_get_bugnote_count( $v_id );

  $t_stage_name = stage_get_field( $v_stage_id, 'name' );

  $project_id= stage_get_field( $v_stage_id, 'project_id' );
  $t_project_name = project_get_field( $project_id, 'name' );

  $query4 = "SELECT *
   FROM $g_mantis_bug_text_table
   WHERE id='$v_bug_text_id'";
  $result4 = db_query( $query4 );
  $row = db_fetch_array( $result4 );

  extract( $row, EXTR_PREFIX_ALL, 'v2' );

  $v_os       = string_display( $v_os );
  $v_os_build     = string_display( $v_os_build );
  $v_platform     = string_display( $v_platform );
  $v_version      = string_display( $v_version );
  $v_id_version    = string_display( $v_id_version );
  $v_fixed_version   = string_display(  $v_id_fixed_version );
  $v_summary      = string_display_links( $v_summary );
  $v_summary     = stripslashes(strtr($v_summary, $sgml_carte));

  //Ajout de html_entity_decode pour bien afficher les caractères HTML dans dans la colonne Résumé
  $v_summary     = html_entity_decode($v_summary);

  # line feeds are desactivated in case of excel export, to avoid multiple lines

  //Ajout de la fonction htmlentities
  $v2_description    = htmlentities($v2_description);

  if ( $f_type_page != 'html' ) {

    $v2_description = stripslashes( str_replace( '\n',' ',htmlentities($v2_description)));
    $v2_description = stripslashes(strtr(html_entity_decode($v2_description), $sgml_carte));
    $v2_steps_to_reproduce  = stripslashes( str_replace( '\n',' ',htmlentities($v2_steps_to_reproduce) ) );
    $v2_additional_information = stripslashes( str_replace( '\n',' ',htmlentities($v2_additional_information) ));
    $v2_additional_information = stripslashes(strtr(html_entity_decode($v2_additional_information), $sgml_carte));
    //suppression des <br />  et   <br> et </br>.
    $v2_description = str_replace("<br />"," ",$v2_description);
    $v2_description = str_replace("<br>"," ",$v2_description);
    $v2_description = str_replace("</br>"," ",$v2_description);

    $v2_description = str_replace("<BR />"," ",$v2_description);
    $v2_description = str_replace("<BR>"," ",$v2_description);
    $v2_description = str_replace("</BR>"," ",$v2_description);

    $v2_steps_to_reproduce = str_replace("<br />"," ",$v2_steps_to_reproduce);
    $v2_steps_to_reproduce = str_replace("<br>"," ",$v2_steps_to_reproduce);
    $v2_steps_to_reproduce = str_replace("</br>"," ",$v2_steps_to_reproduce);

    $v2_steps_to_reproduce = str_replace("<BR />"," ",$v2_steps_to_reproduce);
    $v2_steps_to_reproduce = str_replace("<BR>"," ",$v2_steps_to_reproduce);
    $v2_steps_to_reproduce = str_replace("</BR>"," ",$v2_steps_to_reproduce);

    $v2_additional_information = str_replace("<br />"," ",$v2_additional_information);
    $v2_additional_information = str_replace("<br>"," ",$v2_additional_information);
    $v2_additional_information = str_replace("</br>"," ",$v2_additional_information);

    $v2_additional_information = str_replace("<BR />"," ",$v2_additional_information);
    $v2_additional_information = str_replace("<BR>"," ",$v2_additional_information);
    $v2_additional_information = str_replace("</BR>"," ",$v2_additional_information);

  }
  else {
   $v2_description    = string_display_links( $v2_description );
   $v2_description    = stripslashes(strtr(html_entity_decode($v2_description), $sgml_carte));
   $v2_steps_to_reproduce   = string_display_links( $v2_steps_to_reproduce );
   $v2_additional_information  = string_display_links( $v2_additional_information );
   $v2_additional_information  = stripslashes(strtr(html_entity_decode($v2_additional_information), $sgml_carte));
  }

  # an index for incrementing the array position
  $name_index=0;


  if ( isset( $t_bug_arr_sort[$i] ) || ( $f_show_flag==0 ) ) {

?>
<tr>
 <?php if ( ( $name_index < $field_name_count ) && ( !isset( $t_prefs[$name_index] ) || ( 1 == $t_prefs[$name_index] ) ) ) { ?>

 <td class=xl2216681 nowrap style='border-top:none;border-left:none'>
 <?php
  echo bug_format_id( $v_project_bug_unique_id);
    echo "</td>";
   }
 $name_index++; ?>

 <td class=xl2216681 nowrap style='border-top:none;border-left:none'>
 <?php
  echo stage_get_field($v_stage_id,'name');
    echo "</td>";

 $name_index++;  ?>


 <?php if ( ( $name_index < $field_name_count ) && ( !isset( $t_prefs[$name_index] ) || ( 1 == $t_prefs[$name_index] ) ) ) { ?>
 <td class=xl2216681 nowrap style='border-top:none;border-left:none'>
 <?php echo category_get_name($v_category_id);
    echo "</td>";
   }
 $name_index++;  ?>

 <?php if ( ( $name_index < $field_name_count ) && ( !isset( $t_prefs[$name_index] ) || ( 1 == $t_prefs[$name_index] ) ) ) { ?>
 <td class=xl2216681 nowrap style='border-top:none;border-left:none'>
 <?php echo get_enum_element( 'severity', $v_severity );
    echo "</td>";
   }
 $name_index++;  ?>


 <?php if ( ( $name_index < $field_name_count ) && ( !isset( $t_prefs[$name_index] ) || ( 1 == $t_prefs[$name_index] ) ) ) { ?>
 <td class=xl2216681 nowrap style='border-top:none;border-left:none'>
 <?php echo get_enum_element( 'reproducibility', $v_reproducibility );
    echo "</td>";
   }
 $name_index++;  ?>


  <?php if ( ( $name_index < $field_name_count ) && ( !isset( $t_prefs[$name_index] ) || ( 1 == $t_prefs[$name_index] ) ) ) { ?>
 <td class=xl2216681 nowrap style='border-top:none;border-left:none'>
 <?php echo $v_summary;
    echo "</td>";
   }
 $name_index++;  ?>

 <?php if ( ( $name_index < $field_name_count ) && ( !isset( $t_prefs[$name_index] ) || ( 1 == $t_prefs[$name_index] ) ) ) { ?>
 <td class=xl2216681 nowrap style='border-top:none;border-left:none'>
 <?php echo $v2_description ;
    echo "</td>";
   }
 $name_index++;  ?>

  <?php if ( ( $name_index < $field_name_count ) && ( !isset( $t_prefs[$name_index] ) || ( 1 == $t_prefs[$name_index] ) ) ) { ?>
 <td class=xl2216681 nowrap style='border-top:none;border-left:none'>
 <?php echo get_enum_element( 'status', $v_status );
    echo "</td>";
   }
 $name_index++;  ?>


 <?php if ( ( $name_index < $field_name_count ) && ( !isset( $t_prefs[$name_index] ) || ( 1 == $t_prefs[$name_index] ) ) ) { ?>
 <td class=xl2216681 nowrap style='border-top:none;border-left:none'>
 <?php echo date( config_get( 'short_date_format' ), $v_date_submitted );
    echo "</td>";
   }
 $name_index++;  ?>

 <?php if ( ( $name_index < $field_name_count ) && ( !isset( $t_prefs[$name_index] ) || ( 1 == $t_prefs[$name_index] ) ) ) { ?>
 <td class=xl2216681 nowrap style='border-top:none;border-left:none'>
 <?php print_user_with_subject( $v_reporter_id, $v_id ) ;
    echo "</td>";
   }
 $name_index++;  ?>

 <?php if ( ( $name_index < $field_name_count ) && ( !isset( $t_prefs[$name_index] ) || ( 1 == $t_prefs[$name_index] ) ) ) { ?>
 <td class=xl2216681 nowrap style='border-top:none;border-left:none'>
 <?php echo date( config_get( 'short_date_format' ),$v_last_updated );
    echo "</td>";
   }
 $name_index++;  ?>
 <?php if ( ( $name_index < $field_name_count ) && ( !isset( $t_prefs[$name_index] ) || ( 1 == $t_prefs[$name_index] ) ) ) { ?>
 <td class=xl2216681 nowrap style='border-top:none;border-left:none'>
 <?php print(history_get_events($v_id)); ;
    echo "</td>";
   }
 $name_index++;  ?>


 <?php if ( ( $name_index < $field_name_count ) && ( !isset( $t_prefs[$name_index] ) || ( 1 == $t_prefs[$name_index] ) ) ) { ?>
 <td class=xl2216681 nowrap style='border-top:none;border-left:none'>
 <?php print_user_with_subject( $v_handler_id, $v_id ) ;
    echo "</td>";
   }
 $name_index++;  ?>

 <?php if ( ( $name_index < $field_name_count ) && ( !isset( $t_prefs[$name_index] ) || ( 1 == $t_prefs[$name_index] ) ) ) { ?>
 <td class=xl2216681 nowrap style='border-top:none;border-left:none'>
 <?php echo get_enum_element( 'priority', $v_priority );
    echo "</td>";
   }
 $name_index++;  ?>
 <?php

 /* Libellé de la version de détéction dont l id est récupéré de la table bug_table*/
    $sql1 = "SELECT `version`
 FROM `$g_mantis_project_version_table`
 WHERE id='$v_id_version'";

 $resultSQL1 = db_query( $sql1 );
 $row = db_fetch_array( $resultSQL1 );
 $v_id_version = $row['version'];


 //Libellé de la version de prise en compte dont l'id est récupéré de la table bug_table
 $sql2 = "SELECT `version`
 FROM `$g_mantis_project_version_table`
 WHERE id='$v_fixed_version'";

 $resultSQL2 = db_query( $sql2 );
 $row = db_fetch_array( $resultSQL2 );
 $v_fixed_version = $row['version'];

 ?>
 <?php if ( ( $name_index < $field_name_count ) && ( !isset( $t_prefs[$name_index] ) || ( 1 == $t_prefs[$name_index] ) ) ) { ?>
 <td class=xl2216681 nowrap style='border-top:none;border-left:none'>
 <?php echo $v_id_version;
    echo "</td>";
   }
 $name_index++;  ?>

 <?php if ( ( $name_index < $field_name_count ) && ( !isset( $t_prefs[$name_index] ) || ( 1 == $t_prefs[$name_index] ) ) ) { ?>
 <td class=xl2216681 nowrap style='border-top:none;border-left:none'>
 <?php echo $v_fixed_version;
    echo "</td>";
   }
 $name_index++;  ?>

 <?php if ( ( $name_index < $field_name_count ) && ( !isset( $t_prefs[$name_index] ) || ( 1 == $t_prefs[$name_index] ) ) ) { ?>
 <td class=xl2216681 nowrap style='border-top:none;border-left:none'>
 <?php echo get_enum_element( 'resolution', $v_resolution );
    echo "</td>";
   }
 $name_index++;  ?>

  <?php if ( ( $name_index < $field_name_count ) && ( !isset( $t_prefs[$name_index] ) || ( 1 == $t_prefs[$name_index] ) ) ) { ?>
 <td class=xl2216681 nowrap style='border-top:none;border-left:none'>
 <?php  if ($v_bug_duration != 0) echo $v_bug_duration ;
    echo "</td>";
   }
 $name_index++;  ?>

 <?php if ( ( $name_index < $field_name_count ) && ( !isset( $t_prefs[$name_index] ) || ( 1 == $t_prefs[$name_index] ) ) ) { ?>
 <td class=xl2216681 nowrap style='border-top:none;border-left:none'>
 <?php echo $v_duplicate_id;
    echo "</td>";
   }
 $name_index++;  ?>


 <?php if ( ( $name_index < $field_name_count ) && ( !isset( $t_prefs[$name_index] ) || ( 1 == $t_prefs[$name_index] ) ) ) { ?>
 <td class=xl2216681 nowrap style='border-top:none;border-left:none'>
 <?php echo $v2_steps_to_reproduce;
    echo "</td>";
   }
 $name_index++;  ?>

 <?php if ( ( $name_index < $field_name_count ) && ( !isset( $t_prefs[$name_index] ) || ( 1 == $t_prefs[$name_index] ) ) ) { ?>
 <td class=xl2216681 nowrap style='border-top:none;border-left:none'>
 <?php echo $v2_additional_information;
    echo "</td>";
   }
 $name_index++;  ?>

<?php

 $stage_id = helper_get_current_stage();
 $t_related_custom_field_ids = custom_field_get_linked_ids_excel($project_id,$f_typeRequest);


 foreach( $t_related_custom_field_ids as $t_id ) {

 $t_val = get_by_name_and_bug_id( $v_id , $t_id );

 ?>
  <td class=xl2216681 nowrap style='border-top:none;border-left:none'>
   <?php if (lang_get_defaulted($t_val) != '' )
   echo lang_get_defaulted($t_val) ;
   else echo $t_val ; ?>
  </td>
 <?php

 }
?>

</tr>
<?php
  } #isset
}

} #for loop
?>

Merci d'avance,

A bientôt.



Cette discussion est classée dans : erreur, error, bytes, memory, fatal


Répondre à ce message

Sujets en rapport avec ce message

Fatal error: Allowed memory [ par lnp ] Je suis perdu ! ! ! Est-ce que quelqu'un peut m'expliquer cette erreur ? Je veux dire en français... Non pas que je ne comprenne pas l'anglais mais là fatal error sur chargement de class [ par fabrice_pi ] salut à tous,j'utilise une classe PHP pour faire mes taleaux en html. depuis peu j'ai l'erreur suivante :Fatal error: Cannot instantiate non-existent Pb Allowed memory size bizzard [ par PaToJeuR ] Bonjour !J'obtiens cette erreur là quand je fais un ImageCreateFromJpeg() à partir d'une image d'une centaine de koFatal error: Allowed memory size of Parse Error T_variable [ par zulot ] Voila je debute en PHP j'ai compris pas mal de chose mais la cette erreur je vois pas du tout d'ou elle veint dans mon script.j'ai une page qui recupe help message d'erreur !!! [ par ze_bassman ] j'essaie de mettre en place un formulaire, mais vla l'problemeParse error: parse error in /var/www/free.fr/b/8/interfaces38/form01/mail.php on line 21 Fatal error session_start() [ par ftug ] bonjour,j'ai depuis un certain temps une erreu qui aparait de temps en temps ( pas tres technique copmme therme mais c'est bien le cas, 1/10 environs) Erreur [ par Arrenzillennubbard ] j'essaye de creer une zone membre et le serveur me renvoie cette erreur :Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRI J'Ai Une Erreur Dans Mon Script [ par BenXbox ] Il me dit que y a une erreur :Parse error: parse error, unexpected '"', expecting T_STRING or T_VARIABLE or T_NUM_STRING in c:\site\cowsp\connect.php Erreur fatal en utilisant les fonctions d'images comme getimagesize() [ par UnKnoW ] // Création d'une image 300*200 image $img = imagecreate(300, 200); echo imagesx($img); // 300 ?>Lorsque j'execute ce code j'obtien cet fatal error: $menu= erreur [ par spaa05 ] bonsoirj'ai un menu en flash est 2 page phpmenu.php$menu"<OBJECT classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macrom


Nos sponsors


Sondage...

Comparez les prix

CalendriCode

Février 2012
LMMJVSD
  12345
6789101112
13141516171819
20212223242526
272829    

Consulter la suite du CalendriCode

Photothèque

 
Développement réalisé par Nicolas SOREL (Nix) avec l'aide de : Cyril DURAND et Emmanuel (EBArtSoft), Merci à Vincent pour ses précieux conseils.
CodeS-SourceS.com© Toute reproduction même partielle est interdite sauf accord écrit du Webmaster
CodeS-SourceS.com© est une marque déposée tous droits réservés

Google Coop CodeS-SourceS Google Coop CodeS-SourceS
Temps d'éxécution de la page : 0,655 sec (4)

Nous contacter | Annoncer sur CodeS-SourceS | Mentions légales