Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [symfony] ver 1.4.8, backend_dev.php i backend.php
czorny1986
post 4.05.2011, 22:00:39
Post #1





Grupa: Zarejestrowani
Postów: 4
Pomógł: 0
Dołączył: 4.05.2011

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


Witam serdecznie,

mam problem z panelem administracyjnym. Konkretnie chodzi o to, że wszystko chodzi elegancko jeżeli używam wersji developerskiej. Natomiast jeżeli przełączę się na wersje produkcyjna [backend.php], to bez problemu zaloguję się do panelu, ale już w adresie z backend.php robi się backend_dev.php. Jeżeli zmienię ręcznie znowu na backend.php i wybiore którąś z pozycji menu przełącza mi się do modułu frontendu.

Prosze rzućcie jakąś radą bo siedzę nad tym cały dzień. :/

PS. czyszczę cache

to jest mój plik routingu z backendu
  1. image:
  2. class: sfDoctrineRouteCollection
  3. options:
  4. model: image
  5. module: image
  6. prefix_path: /image
  7. column: id_image
  8. with_wildcard_routes: true
  9.  
  10. reference:
  11. class: sfDoctrineRouteCollection
  12. options:
  13. model: Reference
  14. module: reference
  15. prefix_path: /reference
  16. column: id_reference
  17. with_wildcard_routes: true
  18.  
  19. realization:
  20. class: sfDoctrineRouteCollection
  21. options:
  22. model: Realization
  23. module: realization
  24. prefix_path: /realization
  25. column: id_realizations
  26. with_wildcard_routes: true
  27.  
  28. contact:
  29. class: sfDoctrineRouteCollection
  30. options:
  31. model: Contact
  32. module: contact
  33. prefix_path: /contact
  34. column: idContact
  35. with_wildcard_routes: true
  36.  
  37. company:
  38. class: sfDoctrineRouteCollection
  39. options:
  40. model: company
  41. module: company
  42. prefix_path: /company
  43. column: id_company
  44. with_wildcard_routes: true
  45.  
  46. # You can find more information about this file on the symfony website:
  47. # <a href="http://www.symfony-project.org/reference/1_4/en/10-Routing" target="_blank">http://www.symfony-project.org/reference/1_4/en/10-Routing</a>
  48.  
  49. # default rules
  50. homepage:
  51. url: /
  52. param: { module: administrator, action: index }
  53.  
  54. # generic rules
  55. # please, remove them by adding more specific rules
  56. default_index:
  57. url: /:module
  58. param: { action: index }
  59.  
  60. default:
  61. url: /:module/:action/*
Go to the top of the page
+Quote Post
jaro87
post 5.05.2011, 06:46:32
Post #2





Grupa: Zarejestrowani
Postów: 53
Pomógł: 7
Dołączył: 10.03.2011
Skąd: Wrocław

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


Nie masz na sztywno wpisanych linków z backend_dev w tym menu? Używasz link_to?
Go to the top of the page
+Quote Post
czorny1986
post 5.05.2011, 16:49:24
Post #3





Grupa: Zarejestrowani
Postów: 4
Pomógł: 0
Dołączył: 4.05.2011

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


w menu robie poprzez link_to

to jest wycinek z menu :

  1. <h3><a href="#">Realizacje</a></h3>
  2. <div>
  3. <p></p>
  4. <ul>
  5. <li> <?php echo link_to('Dodaj nowe realizacje', 'realization') ?> </li>
  6. <li> <?php echo link_to('Dodaj nowe zdjęcie do realizacji', 'image') ?> </li>
  7.  
  8. </ul>
  9. </div>
Go to the top of the page
+Quote Post
janek9
post 5.05.2011, 17:25:25
Post #4





Grupa: Zarejestrowani
Postów: 121
Pomógł: 2
Dołączył: 22.03.2009

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


pokaż .htaccess i ProjectConfiguration.class.php
Go to the top of the page
+Quote Post
czorny1986
post 5.05.2011, 18:33:36
Post #5





Grupa: Zarejestrowani
Postów: 4
Pomógł: 0
Dołączył: 4.05.2011

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


to jest .htaccess
  1. Options +FollowSymLinks +ExecCGI
  2.  
  3. <IfModule mod_rewrite.c>
  4. RewriteEngine On
  5.  
  6. # uncomment the following line, if you are having trouble
  7. # getting no_script_name to work
  8. #RewriteBase /
  9.  
  10. # we skip all files with .something
  11. #RewriteCond %{REQUEST_URI} \..+$
  12. #RewriteCond %{REQUEST_URI} !\.html$
  13. #RewriteRule .* - [L]
  14.  
  15. # we check if the .html version is here (caching)
  16. RewriteRule ^$ index.html [QSA]
  17. RewriteRule ^([^.]+)$ $1.html [QSA]
  18. RewriteCond %{REQUEST_FILENAME} !-f
  19.  
  20. # no, so we redirect to our front web controller
  21. RewriteRule ^(.*)$ index.php [QSA,L]
  22. </IfModule>



a to projectConfiguration.class
  1. require_once 'C://xampp//xampplite//php//PEAR//symfony/autoload/sfCoreAutoload.class.php';
  2. sfCoreAutoload::register();
  3.  
  4. class ProjectConfiguration extends sfProjectConfiguration
  5. {
  6. public function setup()
  7. {
  8. $this->enablePlugins('sfDoctrinePlugin');
  9. $this->enablePlugins('sfLightboxPlugin');
  10. $this->enablePlugins('mpRealityAdminPlugin');
  11. $this->enablePlugins('sfDoctrineGuardPlugin');
  12. $this->enablePlugins('sfFormExtraPlugin');
  13. $this->enablePlugins('isicsWidgetFormTinyMCEPlugin');
  14. }
  15. }

Go to the top of the page
+Quote Post
mlawnik
post 5.05.2011, 18:48:59
Post #6





Grupa: Zarejestrowani
Postów: 455
Pomógł: 49
Dołączył: 12.04.2010

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


Czy mam omamy wzrokowe, czy w projectConfiguration.class są podwójne slashe w require_once?

Ten post edytował mlawnik 5.05.2011, 18:49:18


--------------------
Pozdrawiam,
mlawnik

Cytat(nospor)
Jedzmy gówno.... miliony much nie może się przecież mylić
Go to the top of the page
+Quote Post
czorny1986
post 5.05.2011, 18:50:12
Post #7





Grupa: Zarejestrowani
Postów: 4
Pomógł: 0
Dołączył: 4.05.2011

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


Ok ju chyba wiem...

W htaccess trzeba na samej gorze dodać reguły

RewriteRule "^admin$" "backend.php" [QSA]
RewriteRule "^admin/(.*)$" "backend.php" [QSA]

a następnie w routingu przed każdą regułą dodać /admin

z tego co widzę działa...

Dziekuję Wam za zainteresowanie tematem i nakierowanie z tym htaccess
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 14.08.2025 - 10:35