Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Problem z pamięcią
tabbi
post
Post #1





Grupa: Zarejestrowani
Postów: 150
Pomógł: 3
Dołączył: 30.10.2010

Ostrzeżenie: (0%)
-----


Mam kod:

  1. $result = mysql_query("SELECT * FROM ".$this->sqlTable2." WHERE active=1");
  2. $pbList = array();
  3. $programInfo = mysql_fetch_array($result);
  4. while($programInfo)
  5. {
  6. $name=$programInfo['name'];
  7.  
  8. $programInfo['PureName'] = $this->getPureName($name); // LINIJKA Z BLEDEM
  9. $programInfo['Version'] = $this->getVersionNumber($programInfo['name']); // ANALOGICZNIE TUTAJ tak samo bedzie
  10.  
  11. $pbList[] = $programInfo;
  12. }
  13.  
  14. function getPureName($name)
  15. {
  16. $regex = "#(.*) [0-9]+\.#";
  17. preg_match($regex, $name, $pureName);
  18. if($pureName[1] == "")
  19. {
  20. $regex = "#(.*) [0-9]+#";
  21. preg_match($regex, $name, $pureName);
  22.  
  23. if($pureName[1] == "")
  24. $pureName[1] = $name;
  25. }
  26. return $pureName[1];
  27. }


getVersionNumber jest podobną metodą i wywala mi błąd:

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 80 bytes) in /var/www/vhosts/xxx.pl/httpdocs/atest/a.class.php on line 226

Na lokalu działa ale na serwerze niestety nie ? jakoś poradzicie jak można to naprawić zooptymalizować ?
Go to the top of the page
+Quote Post

Posty w temacie
- tabbi   Problem z pamięcią   22.02.2011, 23:43:29
- - cycofiasz   [PHP] pobierz, plaintext $programInfo = mysql_fetc...   23.02.2011, 00:04:26


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 24.08.2025 - 20:21