Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [php]oscommerce i .htaccess
virto
post
Post #1





Grupa: Zarejestrowani
Postów: 20
Pomógł: 0
Dołączył: 19.07.2007

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


Witam,
mam oto taki mały problem,
przenoszę skrypt oscommerce'a z serwera na swój localhost, gdy w katalogu ze skryptem jest plik .htaccess to strona się nie wyświetla pojawia się błąd 500 wystąpił wewnętrzny błąd serwera. A gdy wywalę .htaccess to strona się otwiera natomiast linki nie działają. Co stwarza ten problem i czemu tak się dzieje?

.htaccess
  1. # $Id: .htaccess,v 1.3 2003/06/12 10:53:20 hpdl Exp $
  2. #
  3. # This is used with Apache WebServers
  4. #
  5. # For this to work, you must include the parameter 'Options' to
  6. # the AllowOverride configuration
  7. #
  8. # Example:
  9. #
  10. # <Directory "/usr/local/apache/htdocs">
  11. # AllowOverride Options
  12. # </Directory>
  13. #
  14. # 'All' with also work. (This configuration is in the
  15. # apache/conf/httpd.conf file)
  16.  
  17. # The following makes adjustments to the SSL protocol for Internet
  18. # Explorer browsers
  19.  
  20. <IfModule mod_setenvif.c>
  21. <IfDefine SSL>
  22. SetEnvIf User-Agent ".*MSIE.*" \
  23. nokeepalive ssl-unclean-shutdown \
  24. downgrade-1.0 force-response-1.0
  25. </IfDefine>
  26. </IfModule>
  27.  
  28. # If Search Engine Friendly URLs do not work, try enabling the
  29. # following Apache configuration parameter
  30. #
  31. # AcceptPathInfo On
  32.  
  33. # Fix certain PHP values
  34. # (commented out by default to prevent errors occuring on certain
  35. # servers)
  36. #
  37. #<IfModule mod_php4.c>
  38. # php_value session.use_trans_sid 0
  39. # php_value register_globals 1
  40. #</IfModule>
  41.  
  42. # Ultimate SEO URLs BEGIN
  43. Options +FollowSymLinks
  44. RewriteEngine On
  45. RewriteBase /
  46.  
  47. RewriteRule ^(.*)-p-(.*).html$ product_info.php?products_id=$2&%{QUERY_STRING}
  48. RewriteRule ^(.*)-c-(.*).html$ index.php?cPath=$2&%{QUERY_STRING}
  49. RewriteRule ^(.*)-m-([0-9]+).html$ index.php?manufacturers_id=$2&%{QUERY_STRING}
  50. RewriteRule ^(.*)-pi-([0-9]+).html$ popup_image.php?pID=$2&%{QUERY_STRING}
  51. RewriteRule ^(.*)-t-([0-9]+).html$ articles.php?tPath=$2&%{QUERY_STRING}
  52. RewriteRule ^(.*)-a-([0-9]+).html$ article_info.php?articles_id=$2&%{QUERY_STRING}
  53. RewriteRule ^(.*)-pr-([0-9]+).html$ product_reviews.php?products_id=$2&%{QUERY_STRING}
  54. RewriteRule ^(.*)-pri-([0-9]+).html$ product_reviews_info.php?products_id=$2&%{QUERY_STRING}
  55. RewriteRule ^(.*)-i-([0-9]+).html$ information.php?info_id=$2&%{QUERY_STRING}
  56. # Ultimate SEO URLs END


Ten post edytował virto 23.11.2007, 22:39:51


--------------------
Go to the top of the page
+Quote Post
SirZooro
post
Post #2





Grupa: Zarejestrowani
Postów: 243
Pomógł: 32
Dołączył: 14.06.2007

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


Podejrzewam że nie masz załadowanych modułów mod_setenvif i/lub mod_rewrite - sprawdź to w konfiguracji Apache'a. Linki natomiast do działania wymagają reguł dla mod_rewrite które masz w .htaccess.

Ten post edytował SirZooro 23.11.2007, 22:42:56


--------------------
Go to the top of the page
+Quote Post
virto
post
Post #3





Grupa: Zarejestrowani
Postów: 20
Pomógł: 0
Dołączył: 19.07.2007

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


Rzeczywiście okazało się, że nie było mod_rewrite. A jak mogę go dograć?


--------------------
Go to the top of the page
+Quote Post
dadexix
post
Post #4





Grupa: Zarejestrowani
Postów: 439
Pomógł: 21
Dołączył: 28.06.2007
Skąd: Bielsko-Biała

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


http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html
tu bedzie odpowiedz na Twe pytanie... odrazu mówię ze trzeba być adminem server'a by dograć coś takiego...


--------------------
"Na przykład zmiennej $jestem_najlepszy przypisujemy wartość logiczną TRUE"
Ja: użyj funkcji[...]
Grins: mów normalnie do mnie a nie po polsku
Ja: normalnie to znaczy jak?
Grins: No w PHP... inaczej mój parser ledwo kuma:)
Go to the top of the page
+Quote Post
virto
post
Post #5





Grupa: Zarejestrowani
Postów: 20
Pomógł: 0
Dołączył: 19.07.2007

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


Dograłem mod_rewrite a właściwie odhaszowałem tylko i nic to niestety nie dało nadal błąd 500.

Ten post edytował virto 23.11.2007, 23:41:53


--------------------
Go to the top of the page
+Quote Post
drPayton
post
Post #6





Grupa: Zarejestrowani
Postów: 890
Pomógł: 65
Dołączył: 13.11.2005
Skąd: Olsztyn

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


Sprawdź jeszcze czy masz w httpd.config takie linijki:
Kod
AccessFileName .htaccess

i
Kod
<Directory "Twój/wwwroot">
   Options Indexes FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>

A po wszystkim restart serwera

Ten post edytował drPayton 23.11.2007, 23:29:36
Go to the top of the page
+Quote Post
virto
post
Post #7





Grupa: Zarejestrowani
Postów: 20
Pomógł: 0
Dołączył: 19.07.2007

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


drPayton zrobiłem jak radziłeś i też nie działa.

Zgrałem te pliki na serwer home.pl razem z .htaccess i tam pojawia się taki oto komunikat:
Cytat
Server Requirement Error: register_globals is disabled in your PHP configuration. This can be enabled in your php.ini configuration file or in the .htaccess file in your catalog directory.

Próbowałem dodawać w .htaccess

php_flag register_globals on
i
php_value register_globals on

i nic

Odświeżę trochę wątek bo nadal nie uporałem sie z moim problemem. Macie jakieś pomysły?


--------------------
Go to the top of the page
+Quote Post
dadexix
post
Post #8





Grupa: Zarejestrowani
Postów: 439
Pomógł: 21
Dołączył: 28.06.2007
Skąd: Bielsko-Biała

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


a nie tak

Kod
php_flag register_globals 1
powinno tak chyba śmigać


--------------------
"Na przykład zmiennej $jestem_najlepszy przypisujemy wartość logiczną TRUE"
Ja: użyj funkcji[...]
Grins: mów normalnie do mnie a nie po polsku
Ja: normalnie to znaczy jak?
Grins: No w PHP... inaczej mój parser ledwo kuma:)
Go to the top of the page
+Quote Post
virto
post
Post #9





Grupa: Zarejestrowani
Postów: 20
Pomógł: 0
Dołączył: 19.07.2007

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


Nadal ten sam komunikat. Już mi ręce opadają.


--------------------
Go to the top of the page
+Quote Post
--markusikkk--
post
Post #10





Goście







hmm, być może masz odgórnie zablokowaną opcję RG, są dwie możliwości:
1) zmiana w php.ini register_globals=ON
2) jeżeli zmiana globalna nie jest możliwa, wrzuć do siebie plik php.ini z wypisanymi wszystkimi formułami zgodnym z php.ini serwera i zmień lokalnie opcję.

Pozdrawiam
markusikkk
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 Aktualny czas: 19.08.2025 - 04:13