Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: [kohana] Problem na samym początku przygody
Forum PHP.pl > Forum > PHP > Frameworki
rudolf35
Wgrałem kohanę, uruchomiłem i framework wyswietlił mi listę spełnionych wymagań i na konću oznajmił, że spłniłem wszystkie wymogi. Usunąłem plik install.php zgodnie z komunikatem i gdy próbuję wyświetlić szablon to wywala błąd:


Nie znaleziono wybranej strony. Mogła zostać przeniesiona, usunięta lub zarchiwizowana. system/core/Kohana.php [841]


Jest to najnowsza wersja i pobrałem ją z oficjalnej strony, więc nie wiem z kąd te braki. Może ktoś wie o co chodzi?
Gryf
a konfiguracje w application/config/config.php
ruszałeś a dokładniej ustawiłeś -> $config['site_domain'] ?
k_@_m_i_l
Sprawdź .htaccess czy masz dobrze ustawiony
  1. RewriteBase
rudolf35
RewriteBase wywaliłem - informacje taką przeczytałem na jakiejś stronie w necie. $config['site_domain'] = 'ugdl.pl/testowy/kohana/'; ustawione dokładnie tam gdzie kohana się znajduje i dalej nic. Dokładny komunikat możecie sobie podejrzeć http://ugdl.pl/testowy/kohana/
k_@_m_i_l
A to dziwne to jak się wejdzie pod adres :
http://ugdl.pl/testowy/kohana/index.php
to wchodzi startowa z Kohany. Twój .htaccess powinien wyglądać mniej więcej tak :
  1. # Turn on URL rewriting
  2. RewriteEngine On
  3.  
  4. # Installation directory
  5. RewriteBase /testowy/kohana/
  6.  
  7. # Protect application and system files from being viewed
  8. RewriteRule ^(application|modules|system) - [F,L]
  9.  
  10. # Allow any files or directories that exist to be displayed directly
  11. RewriteCond %{REQUEST_FILENAME} !-f
  12. RewriteCond %{REQUEST_FILENAME} !-d
  13.  
  14. # Rewrite all other URLs to index.php/URL
  15. RewriteRule .* index.php/$0 [PT,L]

Jak to nie zadziała to pokaż swój config.php
rudolf35
Nie zadziałało. Niżej masz kod config.php, ale pliku system/core/Kohana.php rzeczywiście nie ma...
  1. <?php defined('SYSPATH') OR die('No direct access allowed.');
  2. /**
  3.  * Base path of the web site. If this includes a domain, eg: localhost/kohana/
  4.  * then a full URL will be used, eg: <a href="http://localhost/kohana/" target="_blank">http://localhost/kohana/</a>. If it only includes
  5.  * the path, and a site_protocol is specified, the domain will be auto-detected.
  6.  */
  7. $config['site_domain'] = 'ugdl.pl/testowy/kohana/';
  8.  
  9. /**
  10.  * Force a default protocol to be used by the site. If no site_protocol is
  11.  * specified, then the current protocol is used, or when possible, only an
  12.  * absolute path (with no protocol/domain) is used.
  13.  */
  14. $config['site_protocol'] = '';
  15.  
  16. /**
  17.  * Name of the front controller for this application. Default: index.php
  18.  *
  19.  * This can be removed by using URL rewriting.
  20.  */
  21. $config['index_page'] = 'index.php';
  22.  
  23. /**
  24.  * Fake file extension that will be added to all generated URLs. Example: .html
  25.  */
  26. $config['url_suffix'] = '';
  27.  
  28. /**
  29.  * Length of time of the internal cache in seconds. 0 or FALSE means no caching.
  30.  * The internal cache stores file paths and config entries across requests and
  31.  * can give significant speed improvements at the expense of delayed updating.
  32.  */
  33. $config['internal_cache'] = FALSE;
  34.  
  35. /**
  36.  * Internal cache directory.
  37.  */
  38. $config['internal_cache_path'] = APPPATH.'cache/';
  39.  
  40. /**
  41.  * Enable internal cache encryption - speed/processing loss
  42.  * is neglible when this is turned on. Can be turned off
  43.  * if application directory is not in the webroot.
  44.  */
  45. $config['internal_cache_encrypt'] = FALSE;
  46.  
  47. /**
  48.  * Encryption key for the internal cache, only used
  49.  * if internal_cache_encrypt is TRUE.
  50.  *
  51.  * Make sure you specify your own key here!
  52.  *
  53.  * The cache is deleted when/if the key changes.
  54.  */
  55. $config['internal_cache_key'] = 'foobar-changeme';
  56.  
  57. /**
  58.  * Enable or disable gzip output compression. This can dramatically decrease
  59.  * server bandwidth usage, at the cost of slightly higher CPU usage. Set to
  60.  * the compression level (1-9) that you want to use, or FALSE to disable.
  61.  *
  62.  * Do not enable this option if you are using output compression in php.ini!
  63.  */
  64. $config['output_compression'] = FALSE;
  65.  
  66. /**
  67.  * Enable or disable global XSS filtering of GET, POST, and SERVER data. This
  68.  * option also accepts a string to specify a specific XSS filtering tool.
  69.  */
  70. $config['global_xss_filtering'] = TRUE;
  71.  
  72. /**
  73.  * Enable or disable hooks.
  74.  */
  75. $config['enable_hooks'] = FALSE;
  76.  
  77. /**
  78.  * Log thresholds:
  79.  * 0 - Disable logging
  80.  * 1 - Errors and exceptions
  81.  * 2 - Warnings
  82.  * 3 - Notices
  83.  * 4 - Debugging
  84.  */
  85. $config['log_threshold'] = 1;
  86.  
  87. /**
  88.  * Message logging directory.
  89.  */
  90. $config['log_directory'] = APPPATH.'logs';
  91.  
  92. /**
  93.  * Enable or disable displaying of Kohana error pages. This will not affect
  94.  * logging. Turning this off will disable ALL error pages.
  95.  */
  96. $config['display_errors'] = TRUE;
  97.  
  98. /**
  99.  * Enable or disable statistics in the final output. Stats are replaced via
  100.  * specific strings, such as {execution_time}.
  101.  *
  102.  * @see <a href="http://docs.kohanaphp.com/general/configuration" target="_blank">http://docs.kohanaphp.com/general/configuration</a>
  103.  */
  104. $config['render_stats'] = TRUE;
  105.  
  106. /**
  107.  * Filename prefixed used to determine extensions. For example, an
  108.  * extension to the Controller class would be named MY_Controller.php.
  109.  */
  110. $config['extension_prefix'] = 'MY_';
  111.  
  112. /**
  113.  * Additional resource paths, or "modules". Each path can either be absolute
  114.  * or relative to the docroot. Modules can include any resource that can exist
  115.  * in your application directory, configuration files, controllers, views, etc.
  116.  */
  117. $config['modules'] = array
  118. (
  119. // MODPATH.'auth', // Authentication
  120. // MODPATH.'kodoc', // Self-generating documentation
  121. // MODPATH.'gmaps', // Google Maps integration
  122. // MODPATH.'archive', // Archive utility
  123. // MODPATH.'payment', // Online payments
  124. // MODPATH.'unit_test', // Unit testing
  125. );
  126.  
k_@_m_i_l
  1. $config['site_domain'] = '/testowy/kohana/';

Spróbuj tak.
Co do pliku o którym mówisz, to jeżeli go nie ma, to go wgraj, albo najlepiej wgraj może całość od nowa,jeśli nie jesteś pewny czy się wszystko poprawnie wgrało.
rudolf35
Wgrałem jeszcze raz frameworka i teraz wywala mi błąd 403
You don't have permission to access this document. ...
k_@_m_i_l
Kurde ja nie wiem jak ty robisz, ale dopisz do adresu index.php , tak żebyś miał adres postaci :
http://ugdl.pl/testowy/kohana/index.php
i wchodzi jak nic. Poczytaj dobrze dokumentacje, bo tam jest wszystko dobrze wyjaśnione jak zainstalować Kohane.
Meares
Zamiast wgrywać do testowy/kohana/ wgraj do kohana/. W .htaccess daj RewriteBase /kohana/, a w application/coonfig/config.php daj $config['site_domain'] = '/kohana/';.
rudolf35
Dobra, poddaję się. Nic nie pomaga. Jeśli ktoś będzie łaskaw to niech mi wyśle na maila rudnicki.r86@gmail.com poprawnie działającą kohane
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.