Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [ZF] Nie działają akcje inne niż index
rudolf35
post
Post #1





Grupa: Zarejestrowani
Postów: 83
Pomógł: 0
Dołączył: 17.10.2007

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


Witam, rozpoczynam przygodę z zend frameworkiem i natchnąłem się na pierwszy problem. Mogę tworzyć nowe kontrolery, ale nie działają w nich akcje inne niż index. W internecie jest parę wątków z tym problemem, ale żaden z nich nie pomógł. Dlatego zakładam nowy. Apllikacje piszę zgodnie z samouczkiem zenda, więc jeśli chodzi o nazwy klas, plików oraz ich położenie jest ok.

Mój htaccess:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]

Konfiguracja Virtual hosta:
Kod
<VirtualHost 127.0.0.1:80>
    ServerAdmin webmaster@localhost

    DocumentRoot /var/www
    <Directory />
        Options FollowSymLinks
        AllowOverride All
    </Directory>
    <Directory /var/www/>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        allow from all
    </Directory>

    ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
    <Directory "/usr/lib/cgi-bin">
        AllowOverride None
        Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
        Order allow,deny
        Allow from all
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/error.log

    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn

    CustomLog ${APACHE_LOG_DIR}/access.log combined

    Alias /doc/ "/usr/share/doc/"
    <Directory "/usr/share/doc/">
        Options Indexes MultiViews FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
        Allow from 127.0.0.0/255.0.0.0 ::1/128
    </Directory>

</VirtualHost>
<VirtualHost 127.0.0.2:80>
    ServerName quickstart.local
    DocumentRoot /var/www/PhpProject1/public

    <Directory /var/www/PhpProject1/public>
        DirectoryIndex index.php
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>
</VirtualHost>


public/index.php

  1. <?php
  2.  
  3. // Define path to application directory
  4. defined('APPLICATION_PATH')
  5. || define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application'));
  6.  
  7. // Define application environment
  8. defined('APPLICATION_ENV')
  9. || define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production'));
  10.  
  11. // Ensure library/ is on include_path
  12. set_include_path(implode(PATH_SEPARATOR, array(
  13. realpath(APPLICATION_PATH . '/../library'),
  14. )));
  15.  
  16. /** Zend_Application */
  17. require_once 'Zend/Application.php';
  18. // Create application, bootstrap, and run
  19. $application = new Zend_Application(
  20. APPLICATION_ENV,
  21. APPLICATION_PATH . '/configs/application.ini'
  22. );
  23.  
  24. $application->bootstrap()
  25. ->run();


Błąd jaki mi się wyświetla przy wpisaniu adresu do akcji 127.0.0.2/categories/new/

An error occurred
Application error


Go to the top of the page
+Quote Post

Posty w temacie


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: 26.09.2025 - 20:33