Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: php3 dlaczego skrypty działaja blędnie
Forum PHP.pl > Forum > PHP
Cosi
Mam pytanie dlaczego jesli mam pliki z rozszezeniem php3 to sa wykonywane z bledami czesc plikow wykonuje sie pojawia czesc nie - gdy zmienie na php wszystko chodzi dobrze ale czasami zmiana w kodzie wielu odwolan z php3 do php, jest żmudna czy mogl bym otrzymac pomoc ewentualnie podpowiedz co i gdzie powinienem zmienic na serwerze zeby wszystkie rodzaje php byly wykonywane prawidlowo.
spenalzo
Być może pliki oznaczone jako .php3 przekazywane są do innej wersji php.

A zamiana rozszerzeń jest prosta smile.gif Weź dowolny edytor z opcją "Search and replace" i w pole search wpisz ".php3" a w pole replace ".php" smile.gif
Cosi
no tak wiesz niby proste ale wolal bym np wiedziec co mam zrobic na serwerze jaka opcje uruchomic zeby pliki z php3 byly obslugiwane czasami nie mam ochoty przegladac wszystkich skryptow w poszukiwaniu wlasciwych stad moje pytanie smile.gif
spenalzo
Sprawdź jak masz w httpd.conf - prawidłowo powinno być tak:
Kod
AddType application/x-httpd-php .php4 .php .htm .php3 .inc

AddType application/x-httpd-php-source .phps
Cosi
No wiec tak zapomnialem napisac na poczatku ze posiadam Free BSD i w pliku httpd.conf znalazlem tylko takie wpisy ktore dotyczą php:


# Dynamic Shared Object (DSO) Support
#
# To be able to use the functionality of a module which was built as a DSO you
# have to place corresponding `LoadModule' lines at this location so the
# directives contained in it are actually available _before_ they are used.
# Please read the file http://httpd.apache.org/docs/dso.html for more
# details about the DSO mechanism and run `httpd -l' for the list of already
# built-in (statically linked and thus always available) modules in your httpd
# binary.
#
# Note: The order in which modules are loaded is important. Don't change
# the order below without expert advice.
#
# Example:
# LoadModule foo_module libexec/mod_foo.so


LoadModule php4_module libexec/apache/libphp4.so

# Reconstruction of the complete module list from all available modules
# (static and shared ones) to achieve correct module execution order.
# [WHENEVER YOU CHANGE THE LOADMODULE SECTION ABOVE UPDATE THIS, TOO]
ClearModuleList

AddModule mod_php4.c

# LanguagePriority allows you to give precedence to some languages
# in case of a tie during content negotiation.
#
# Just list the languages in decreasing order of preference. We have
# more or less alphabetized them here. You probably want to change this.
#
<IfModule mod_negotiation.c>
LanguagePriority en da nl et fr de el it ja kr no pl pt pt-br ru ltz ca es sv tw
</IfModule>

<IfModule mod_php3.c>
AddType application/x-httpd-php3 .php3
AddType application/x-httpd-php3-source .php3s
</IfModule>
<IfModule mod_php4.c>
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
</IfModule>


i niestety wiecej nic nie znalazlem wiec jeżeli ktoś moze mi cos podpowiedziec gdzie i czego szukac to bylo by spoko smile.gif a co do odpowiedzi/podpowiedzi Serafina to dziekuje ale jeszcze poprosił bym o wyjaśnienie do czego ta stała służy i co robi i gdzie ją mam wstawiac smile.gif
Cosi
Dzieki za pomoc wszystkim juz dałem sobie rade smile.gif na czerwono zaznaczyłem to co zablokowałem a na niebiesko to co dopisałem smile.gif


tak było : to oryginał

# LanguagePriority allows you to give precedence to some languages
# in case of a tie during content negotiation.
#
# Just list the languages in decreasing order of preference. We have
# more or less alphabetized them here. You probably want to change this.
#
<IfModule mod_negotiation.c>
LanguagePriority en da nl et fr de el it ja kr no pl pt pt-br ru ltz ca es sv tw
</IfModule>
<IfModule mod_php3.c>
AddType application/x-httpd-php3 .php3
AddType application/x-httpd-php3-source .php3s
</IfModule>
<IfModule mod_php4.c>
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
</IfModule>
#
# AddType allows you to tweak mime.types without actually editing it, or to
# make certain files to be certain types.


*************************************************************
tak jest : po zmianach

# LanguagePriority allows you to give precedence to some languages
# in case of a tie during content negotiation.
#
# Just list the languages in decreasing order of preference. We have
# more or less alphabetized them here. You probably want to change this.
#
<IfModule mod_negotiation.c>
LanguagePriority en da nl et fr de el it ja kr no pl pt pt-br ru ltz ca es sv tw
</IfModule>
# <IfModule mod_php3.c>
#AddType application/x-httpd-php3 .php3
#AddType application/x-httpd-php3-source .php3s
# </IfModule>

<IfModule mod_php4.c>
AddType application/x-httpd-php .php .php3 .phtml
AddType application/x-httpd-php-source .phps
</IfModule>
#
# AddType allows you to tweak mime.types without actually editing it, or to
# make certain files to be certain types.
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.