Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: Problem z kodem PHP i ciągłe zapychanie serwera
Forum PHP.pl > Forum > PHP
nigon
Witam wszystkich forumowiczów!
Zakładam ten temat, ponieważ od kilku dni problem ze skryptem mojej strony spędza mi sen z powiek.
Setki prób i żadna nie przyniosła rezultatu.
Mój problem polega na tym, że jestem właścicielem serwisu www.seansefilmowe.pl i po zainstalowaniu systemu Ubuntu 10.10 - 64 bit i nginx zgodnie z instrukcjami na stronie Instalacja nginx php serwis funkcjonuje kilka minut i po chwili przestaje odpowiadać ( pojawia się błąd 504 Gateway Time-out).
Już naprawdę nie wiem co mam z tym robić.
Wynajmuję serwer w host1.eu (gameserver 25G).
Wykupiłem u nich drugi serwer, na którym postawiłem serwis o identycznym skrypcie i takiej samej konfiguracji (ubuntu i nginx) i działa on poprawnie. Oto link filmoweseanse.pl.
W pliku error.log na niedziałającym serwerze pojawiają się takie błędy (niestety jest ich zbyt wiele, żeby wszystkie zamieścić w poście):


  1. PHP Notice: Undefined offset: 1 in /root/public_html/player/watch.php on line 22
  2. PHP Notice: Undefined offset: 1 in /root/public_html/player/watch.php on line 22
  3. PHP Notice: Undefined offset: 1 in /root/public_html/player/watch.php on line 22
  4. PHP Notice: Undefined offset: 1 in /root/public_html/player/watch.php on line 22
  5. PHP Notice: Undefined offset: 1 in /root/public_html/player/watch.php on line 22" while reading response header from upstream, client: 189.153.58.158, server: Seansefilmowe, request: "GET /player/watch.php?file=Q6DTKJCXbed9e2b HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "seansefilmowe.pl", referrer: "http://megaskipper.com/BigSool/flowplayer-3.2.7.swf"
  6. 2011/08/01 23:15:00 [error] 1421#0: *20 FastCGI sent in stderr: "PHP Notice: Undefined offset: 1 in /root/public_html/player/watch.php on line 22
  7. PHP Notice: Undefined offset: 1 in /root/public_html/player/watch.php on line 22
  8. PHP Notice: Undefined offset: 1 in /root/public_html/player/watch.php on line 22
  9. PHP Notice: Undefined offset: 1 in /root/public_html/player/watch.php on line 22
  10. PHP Notice: Undefined offset: 1 in /root/public_html/player/watch.php on line 22
  11. PHP Notice: Undefined offset: 1 in /root/public_html/player/watch.php on line 22" while reading response header from upstream, client: 91.83.201.28, server: Seansefilmowe, request: "GET /player/watch.php?file=ZMHDK7E1 HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "seansefilmowe.pl", referrer: "http://megaskipper.com/BigSool/flowplayer-3.2.7.swf"
  12. 2011/08/01 23:15:16 [error] 1421#0: *34 FastCGI sent in stderr: "PHP Notice: Undefined offset: 1 in /root/public_html/player/watch.php on line 22
  13. PHP Notice: Undefined offset: 1 in /root/public_html/player/watch.php on line 22
  14. PHP Notice: Undefined offset: 1 in /root/public_html/player/watch.php on line 22
  15. PHP Notice: Undefined offset: 1 in /root/public_html/player/watch.php on line 22
  16. PHP Notice: Undefined offset: 1 in /root/public_html/player/watch.php on line 22
  17. PHP Notice: Undefined offset: 1 in /root/public_html/player/watch.php on line 22" while reading response header from upstream, client: 84.0.28.44, server: Seansefilmowe, request: "GET /player/watch.php?file=FFJO2Z0Q HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "seansefilmowe.pl", referrer: "http://megaskipper.com/BigSool/flowplayer-3.2.7.swf"
  18. 2011/08/01 23:15:45 [error] 1421#0: *49 open() "/root/public_html/crossdomain.xml" failed (2: No such file or directory), client: 108.105.45.216, server: Seansefilmowe, request: "GET /crossdomain.xml HTTP/1.1", host: "www.seansefilmowe.pl", referrer: "http://player.longtailvideo.com/player.swf"
  19. 2011/08/01 23:16:47 [error] 1421#0: *52 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 190.246.212.130, server: Seansefilmowe, request: "GET /player/watch.php?file=premium HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "seansefilmowe.pl", referrer: "http://megaskipper.com/BigSool/flowplayer-3.2.7.swf"


22 linijka pliku watch.php wygląda następująco:
  1. $$parameters[$i] = $match[1];}


Bardzo proszę o pomoc.
Jesteście moją jedyną nadzieją.
Pozdrawiam!
Nigon
buliq
Sprawdzaj czy $match ma element o kluczu 1:

  1. if (!empty($match) && !empty($match[1]))
  2. $parameters[$i=$match[1];


Poza tym jak nie chcesz takich błedów to wrzuć gdzieś tam na początku error_reporting(E_ALL ^ E_NOTICE); powinno tych błędów nie być.

Porównaj konfigurację PHP - niby tak sama ale moze na innych maszynach stoją serwisy. Dowiedz sie czy przez htaccess będziesz mógł zmienic parametry php.ini - od supportu
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.