Avatar billede blood Nybegynder
27. marts 2001 - 19:33 Der er 18 kommentarer og
1 løsning

.htaccess på apache

Jeg så i dette spm http://www.eksperten.dk/spm/59718 at man kunde insætte disse to linjer i htaccess filen.

php_value auto_prepend_file header.php
php_value auto_append_file footer.php

også vil den automatisk include header.php overst i alle php filer og footer.php i i bunden af alle php filer.

Men når jeg gør det så får jeg en \"Internal Server Error\" på hele min server og i \"error.log\" står der
\"d:/.htaccess: Invalid command \'php_value\', perhaps mis-spelled or defined by a module not included in the server configuration\"

Er der nogen der kan fortælde mig hvad fejlen i htaccess er og hvad den skal rettes til?
Avatar billede mortenfn Nybegynder
27. marts 2001 - 19:37 #1
bruger du apache -
Avatar billede blood Nybegynder
27. marts 2001 - 19:38 #2
mortenfn >> Ja og du behøver ikke forklare det på nybegynder måden :-)
Avatar billede mortenfn Nybegynder
27. marts 2001 - 19:53 #3
jeg har læst i mine analer - php skal køre som server-module for at det virker - gør din php det - scriptet skulle være OK
Avatar billede mortenfn Nybegynder
27. marts 2001 - 19:56 #4
du skal også have

include_path=\".;c:\\www\\phplib\"

Avatar billede mortenfn Nybegynder
27. marts 2001 - 19:59 #5
her er lidt manual

Table of Contents
The configuration file
The configuration file
The configuration file (called php3.ini in PHP 3.0, and simply php.ini as of PHP 4.0) is read when PHP starts up. For the server module versions of PHP, this happens only once when the web server is started. For the CGI version, it happens on every invocation.

When using PHP as an Apache module, you can also change the configuration settings using directives in Apache configuration files and .htaccess files.

With PHP 3.0, there are Apache directives that correspond to each configuration setting in the php3.ini name, except the name is prefixed by \"php3_\".

With PHP 4.0, there are just a few Apache directives that allow you to change the PHP configuration settings.


php_value name value
This sets the value of the specified variable.

php_flag name on|off
This is used to set a Boolean configuration option.

php_admin_value name value
This sets the value of the specified variable. \"Admin\" configuration settings can only be set from within the main Apache configuration files, and not from .htaccess files.

php_admin_flag name on|off
This is used to set a Boolean configuration option.


You can view the settings of the configuration values in the output of phpinfo(). You can also access the values of individial configuration settings using get_cfg_var().

General Configuration Directives


allow_url_fopen boolean
This option enables the URL-aware fopen wrappers that enable accessing URL object like files. Default wrappers are provided for the access of remote files using the ftp or http protocol, some extensions like zlib may register additional wrappers.

Note: This option was introduced immediately after the release of version 4.0.3. For versions up to and including 4.0.3 you can only disable this feature at compile time by using the configuration switch --disable-url-fopen-wrapper.

asp_tags boolean
Enables the use of ASP-like <% %> tags in addition to the usual <?php ?> tags. This includes the variable-value printing shorthand of <%= $value %>. For more information, see Escaping from HTML.

Note: Support for ASP-style tags was added in 3.0.4.

auto_append_file string
Specifies the name of a file that is automatically parsed after the main file. The file is included as if it was called with the include() function, so include_path is used.

The special value none disables auto-appending.

Note: If the script is terminated with exit(), auto-append will not occur.


auto_prepend_file string
Specifies the name of a file that is automatically parsed before the main file. The file is included as if it was called with the include() function, so include_path is used.

The special value none disables auto-prepending.

cgi_ext string
Avatar billede blood Nybegynder
27. marts 2001 - 19:59 #6
Nej det gør den ikke hvor sætter jeg den til det?
Avatar billede blood Nybegynder
27. marts 2001 - 20:02 #7
Jeg kan ikke huske om det er cgi eller server versionen jeg har downloaded

Hvor finder jeg ud af det?
Avatar billede mortenfn Nybegynder
27. marts 2001 - 20:02 #8
hvilken OS bruger du
Avatar billede blood Nybegynder
27. marts 2001 - 20:04 #9
Lige nu bruger jeg win2k pro
Avatar billede mortenfn Nybegynder
27. marts 2001 - 20:04 #10
i phpinfo.php
Avatar billede mortenfn Nybegynder
27. marts 2001 - 20:05 #11
3. linje
Avatar billede blood Nybegynder
27. marts 2001 - 20:11 #12
Danm!! Cgi

Er det så ikke noget at gøre end at instalere den anden version
Avatar billede mortenfn Nybegynder
27. marts 2001 - 20:17 #13
det er der ikke - så vidt jeg ved.
Avatar billede blood Nybegynder
27. marts 2001 - 20:21 #14
Hmmmm! :-(
Avatar billede mortenfn Nybegynder
27. marts 2001 - 20:22 #15
sorry ;o) - jeg har set php-module til Win jeg prøver at finde det igen.
Avatar billede mortenfn Nybegynder
27. marts 2001 - 20:23 #16
du kan jo bruge include() men det skal jo \"bare\" ind i alle filer
Avatar billede blood Nybegynder
27. marts 2001 - 20:26 #17
Ja men det er det jeg ikke vil :-)
Avatar billede mortenfn Nybegynder
28. marts 2001 - 00:38 #18
her er php4 til apache som modul, der er lidt svær at sætte op men virker fint.

http://www.php4win.de/
Avatar billede jd Nybegynder
28. marts 2001 - 09:48 #19
Der er ikke en CGI-version og en modul-version... det er det samme. Det er bare opsætningen der er lidt anderledes... jeg kan evt. hjælpe når jeg kommer hjem ?
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Uanset kodesprog, så giver vi dig mulighederne for at udvikle det, du behøver.

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester