Current time: 04-24-2024, 06:33 AM Hello There, Guest! (LoginRegister)


Thread Closed 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[ERLEDIGT].htm files als php parsen
Author Message
Snooops Offline
Junior Member
*****
Dev Team

Posts: 89
Joined: Nov 2009
Reputation: 0
Post: #1
Question [ERLEDIGT].htm files als php parsen
Hi,
ich bekomm das nicht hin... es läuft
Debian 5.0 Lenny
ispcp 1.0.6

Standard Pakete laut install howto vom ispcp

ich möchte per .htaccess das alle .htm dateien mit php interpretiert werden.
Hier meine kläglichen Versuche:
#AddType application/x-httpd-php .html
#Action application/x-httpd-php /usr/bin/php
#AddType text/html .php
#AddHandler php-fastc
#AddHandler php5-cgi .htm
#AddType x-mapp-php5 .htm
#Action php /cgi-php5/php
AddHandler php5 .htm

Und es tut einfach nicht.

Als beispiel test.htm:
<?php
echo 'test';
?>

Wenn ich test.htm nun aufrufe möchte ich test sehen... ich sehe aber nur eine weiße Seite. Im Quelltext steht dann folgendens:
<?php
echo 'test';
?>

Hat da jemand eine Idee?
Gruß
Snooops
(This post was last modified: 11-04-2010 08:50 PM by ZooL.)
11-03-2010 09:31 PM
Find all posts by this user
fluser Offline
Documentation Team
***
Docu Team

Posts: 246
Joined: May 2010
Reputation: 1
Post: #2
RE: .htm files als php parsen
Probier es mal so:

Code:
AddType application/x-httpd-php .php .htm .html
AddHandler x-httpd-php .php .htm .html

lösche die alte .htaccess - nicht überschreiben.

Upload die neue .htaccess und gib chmod 777 drauf

MlG Fluser
11-03-2010 09:44 PM
Find all posts by this user
Snooops Offline
Junior Member
*****
Dev Team

Posts: 89
Joined: Nov 2009
Reputation: 0
Post: #3
RE: .htm files als php parsen
Jetzt bekomme ich die test.htm als Dateidownload angeboten...
11-03-2010 09:56 PM
Find all posts by this user
fluser Offline
Documentation Team
***
Docu Team

Posts: 246
Joined: May 2010
Reputation: 1
Post: #4
RE: .htm files als php parsen
Probiers mal nur mit
AddType application/x-httpd-php .html

MlG Fluser
11-03-2010 10:05 PM
Find all posts by this user
Snooops Offline
Junior Member
*****
Dev Team

Posts: 89
Joined: Nov 2009
Reputation: 0
Post: #5
RE: .htm files als php parsen
geht auch nicht. Jungs, dat is mal ein derber Bug ;-)
11-03-2010 10:08 PM
Find all posts by this user
fluser Offline
Documentation Team
***
Docu Team

Posts: 246
Joined: May 2010
Reputation: 1
Post: #6
RE: .htm files als php parsen
Hat zum Glück nichts mit ISP-Control zu tun, sondern nur mit ApacheWink

Noch ein VersuchSmile

RemoveHandler .html .htm
AddType application/x-httpd-php .php .htm .html

MlG Fluser
11-03-2010 10:16 PM
Find all posts by this user
Snooops Offline
Junior Member
*****
Dev Team

Posts: 89
Joined: Nov 2009
Reputation: 0
Post: #7
RE: .htm files als php parsen
Doch hat es, da es auf einem "normalen" (sprich, debian installiert, apache installiert und php - alles von hand ohne ispcp) funktioniert...
Und das funktioniert auch nicht. Ist übrigends bei all meinen ispcp systemen so... egal ob 1.0.6 oder 1.0.7 RC2
11-03-2010 10:23 PM
Find all posts by this user
fluser Offline
Documentation Team
***
Docu Team

Posts: 246
Joined: May 2010
Reputation: 1
Post: #8
RE: .htm files als php parsen
Hmmm, habe gerade folgendes gefunden:

Quote:Goodbye .htaccess and Hello .ini

Under the old Apache Module mode you were able to manipulate the PHP settings from within a .htaccess file placed in the script's directory.

For example you could turn off the php setting "magic_quotes_gpc" with this line in .htaccess:

php_value magic_quotes_gpc on

With PHP running as CGI/phpsuexec, manipulating the PHP settings is still possible however it can not be done with .htaccess. Using .htaccess with php_value entries within it will cause a 500 internal server error when attempting to access the scripts. This is because php is no longer running as an apache module and apache will not handle those directives any longer.

All php values should be removed from your .htaccess files to avoid the 500 internal server error. Creating a php.ini file to manipulate the php settings will solve this issue.

Ist also doch ein Apache/Suexec Problem und nicht ISP-Control Wink

Wieso verwendest du nicht einfach .php anstatt .htm? Du kannst sonst auch die php.ini von deinem Kundenprofil ändern.

MlG Fluser
11-03-2010 10:49 PM
Find all posts by this user
Snooops Offline
Junior Member
*****
Dev Team

Posts: 89
Joined: Nov 2009
Reputation: 0
Post: #9
RE: .htm files als php parsen
Kunde will .htm .. die Entscheidung liegt also nicht bei mir. Auserdem erreicht man mit .html files einfach nen besseren google score...
Ok php.ini also ... kk ... ja aber ... wie mach ichn das jetzt? Wink
11-03-2010 11:08 PM
Find all posts by this user
fluser Offline
Documentation Team
***
Docu Team

Posts: 246
Joined: May 2010
Reputation: 1
Post: #10
RE: .htm files als php parsen
Unter den Parse Optionen einfach hinter .php noch .htm hinzufügen.

Aus dem Kopf heraus müsste es irgendwo ein wrapper-Script geben irgendwo bei /var/www/fcgi/kunden-domain.local/php5/ sein (da ich ISP-Control nur kurz getestet habe, kann ich dir dazu leider keine genaueren Angaben geben).
Wichtig ist, dass du nicht die Master php.ini anpasst! Sonst ist es bei allen Usern aktiv.

MlG Fluser
11-03-2010 11:31 PM
Find all posts by this user
Thread Closed 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)