Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: [MySQL][PHP]Problem z subdomeną...
Forum PHP.pl > Forum > Przedszkole
Konuss
Witam ,

mam pewien problem z integracją serwisu z forum. Problem dotyczy subdomen. Gdy serwis znajduję się w domenie yolo.pl/pliki to wszystko ładnie śmiga na tym kodzie:
  1. define('IN_PHPBB', true);
  2.  
  3. $phpbb_root_path = './forum/';
  4.  
  5. $phpEx = substr(strrchr(__FILE__, '.'), 1);
  6.  
  7. include($phpbb_root_path . 'common.' . $phpEx);
  8.  
  9. include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
  10.  
  11.  
  12.  
  13. $user->session_begin();
  14.  
  15. $auth->acl($user->data);


ale gdy serwis znajduje się w subdomenie tzn pliki.yolo.pl tez dziala ale na tym kodzie:
  1. define('IN_PHPBB', true);
  2.  
  3. $phpbb_root_path = '../forum/';
  4.  
  5. $phpEx = substr(strrchr(__FILE__, '.'), 1);
  6.  
  7. include($phpbb_root_path . 'common.' . $phpEx);
  8.  
  9. include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
  10.  
  11.  
  12.  
  13. $user->session_begin();
  14.  
  15. $auth->acl($user->data);


problem polega na tym że wszystko fajnie smiga lecz subdomena przejmuje linki tzn:

http://pliki.yolo.pl/forum/memberlist.php

a powinno być:

http://yolo.pl/forum/memberlist.php

każdy link w serwisie jesli chodzi o forum ma taką formę:

  1. '.$phpbb_root_path.'memberlist.php


jak zrobić aby subdomena nie narzucała swej nazwy a dodać główna domenę do danych tych linków.

Prosiłbym o pomoc. Pozdrawiam smile.gif

Może to jest śmieszny problem ale proszę kolegów o pomoc sad.gif
CuteOne
$phpbb_root_path = '../forum/';

$phpbb_root_path = 'http://yolo.pl/forum/';
Konuss
Gdy zmieniłem tą ścieżka dostaje taki błąd:

  1. Warning: include() [function.include]: URL file-access is disabled in the server configuration in /home/yolopl/domains/yolo.pl/public_html/pliki/config.php on line 347
  2.  
  3. Warning: include(http://yolo.pl/forum/common.php) [function.include]: failed to open stream: no suitable wrapper could be found in /home/yolopl/domains/yolo.pl/public_html/pliki/config.php on line 347
  4.  
  5. Warning: include() [function.include]: Failed opening 'http://yolo.pl/forum/common.php' for inclusion (include_path='.:/home/sys/lsws/lsphp5/lib/php') in /home/yolopl/domains/yolo.pl/public_html/pliki/config.php on line 347
  6.  
  7. Warning: include() [function.include]: URL file-access is disabled in the server configuration in /home/yolopl/domains/yolo.pl/public_html/pliki/config.php on line 349
  8.  
  9. Warning: include(http://yolo.pl/forum/includes/functions_display.php) [function.include]: failed to open stream: no suitable wrapper could be found in /home/yolopl/domains/yolo.pl/public_html/pliki/config.php on line 349
  10.  
  11. Warning: include() [function.include]: Failed opening 'http://yolo.pl/forum/includes/functions_display.php' for inclusion (include_path='.:/home/sys/lsws/lsphp5/lib/php') in /home/yolopl/domains/yolo.pl/public_html/pliki/config.php on line 349
  12.  
  13. Fatal error: Call to a member function session_begin() on a non-object in /home/yolopl/domains/yolo.pl/public_html/pliki/config.php on line 353
napus
Ustawienia serwera i ciasteczek w ACP jeżeli tego nie ustawisz poprawnie skrypt będzie palił głupa.
Konuss
A coś więcej na ten temat podpowiedzi questionmark.gif
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.