Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: [PHP][Zend Framework] Problem ze startem
Forum PHP.pl > Forum > PHP > Frameworki
McGoo123
Witam,

Rozpoczynam przygodę z Zend Framework-iem i mam mały problem, korzystajac z http://blog.heavymind.net/zend-framework-tutorial/ krok po kroku zgodnie ze wskazówkami dotarłem do punktu "Plik index.php" i przy próbie wywołania dla testu localhost/zf-tutorial/ zamiast błeu :
"Fatal error: Uncaught exception 'Zend_Controller_Dispatcher_Exception'
with message 'Invalid controller specified (index)' in..."

pojawia się :

Bad Request
Your browser sent a request that this server could not understand.

Apache/1.3.31 Server at 127.0.0.1 Port 80


Co robie nie tak questionmark.gif worriedsmiley.gif
Cysiaczek
Przenoszę na Gotowe rozwiązania -> Frameworki

Sprawdziłeś .htaccess?
McGoo123
htaccess :

RewriteEngine on
RewriteRule !.(js|ico|gif|jpg|png|css)$ index.php
php_value include_path "/path/to/lib"
itson
mam podobny problem
zmieniłem .htaccess, teraz wygląda tak:
<span style="font-weight: bold;"><a href="http://pl.php.net/Options +FollowSymLinks +ExecCGI<IfModule mod_rewrite.c> RewriteEngine on RewriteRule !.(js|ico|gif|jpg|png|css)$ index.php php_value include_path ".:/usr/php5/lib/" # uncomment the following line, if you are having trouble # getting no_script_name to work #RewriteBase / # we skip all files with .something RewriteCond %{REQUEST_URI} \..+$ RewriteCond %{REQUEST_URI} !\.html$ RewriteRule .* - [L] # we check if the .html version is here (caching) RewriteRule ^$ index.html [QSA] RewriteRule ^([^.]+)$ $1.html [QSA] RewriteCond %{REQUEST_FILENAME} !-f # no, so we redirect to our front web controller RewriteRule ^(.*)$ index.php [QSA,L]</IfModule># big crash from our front web controllerErrorDocument 500 "<h2>Application error</h2>symfony application failed to start properly"" title="Zobacz w manualu PHP" target="_manual">
Options +FollowSymLinks +ExecCGI

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule !.(js|ico|gif|jpg|png|css)$ index.php
php_value include_path ".:/usr/php5/lib/"

# uncomment the following line, if you are having trouble
# getting no_script_name to work
#RewriteBase /

# we skip all files with .something
RewriteCond %{REQUEST_URI} \..+$
RewriteCond %{REQUEST_URI} !\.html$
RewriteRule .* - [L]

# we check if the .html version is here (caching)
RewriteRule ^$ index.html [QSA]
RewriteRule ^([^.]+)$ $1.html [QSA]
RewriteCond %{REQUEST_FILENAME} !-f

# no, so we redirect to our front web controller
RewriteRule ^(.*)$ index.php [QSA,L]
</IfModule>

# big crash from our front web controller
ErrorDocument 500 "<h2>Application error</h2>symfony application failed to start properly"
</a></span>

problem ciągle pozostał


edit:
przekopiowałem symfony do katalogu C:\usr\apache\httpd\html i działa, wcześniej miałem w C:\usr\krasnal\www
a79rtur
mod rewrite masz wlaczony w Apache ?
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.