Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 2 > General

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 11th December 2008, 10:36
DHDSP DHDSP is offline
Junior Member
 
Join Date: May 2008
Posts: 11
Thanks: 2
Thanked 0 Times in 0 Posts
Default PHP in subdirectory - failing ?

Hello fellow ispconfigers,

I seem to have a problem: PHP scripts will get executed in the main (../web) directory , but not in a subdirectory. PHP and PHP safe mode are activated.

To test this I made an index.php ind ../web , and the same file in ../web/Webseiten
Then I called them directly from Firefox.

The one in ../web behaves as wanted, the one in ../web/Webseiten does not execute the php part.

Why ?

Addendum: in the error log I see [Thu Dec 11 12:04:15 2008] [warn] Cannot get media type from 'x-mapp-php5', only if the index_.php file is called from the ../web/Webseite directory.

TIA
Peter

PS: index.php:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Hallo-Welt-Beispiel</title>
</head>
<body>
<p>html-test</p>
<?php
echo "php-test!";
?>
</body>
</html>

Last edited by DHDSP; 11th December 2008 at 12:45.
Reply With Quote
Sponsored Links
  #2  
Old 11th December 2008, 13:02
DHDSP DHDSP is offline
Junior Member
 
Join Date: May 2008
Posts: 11
Thanks: 2
Thanked 0 Times in 0 Posts
Default

OK. Getting there.

I see the customer had an .hhtaccess file which had

###############################################
RewriteEngine On
RewriteBase /
RewriteRule ^([0-9]*)-([0-9]*)- index.php?article_id=$1&clang=$2&%{QUERY_STRING}
RewriteRule ^([0-9]*)- index.php?article_id=$1&%{QUERY_STRING}

# Alle PHP-Skripte mit PHP5 ausf▒hren:
AddType x-mapp-php5 .php
AddHandler x-mapp-php5 .php
###############################################

in it. Strange. PHP5 is installed (says phpinfo(); )
Seems to be a provider specific statement to switch the 1&1 server to PHP5

CU
Peter

Last edited by DHDSP; 11th December 2008 at 13:30.
Reply With Quote
  #3  
Old 11th December 2008, 14:16
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 34,586
Thanks: 792
Thanked 4,983 Times in 3,903 Posts
 
Default

PHP is managed by ISPConfig. You will have to remove the lines:

AddType x-mapp-php5 .php
AddHandler x-mapp-php5 .php

from the .htaccess file as these settings are not allowed for .htaccess files in ISPConfig for security reasons and they are not nescessary.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ffmpeg Video support for ubuntu 7.10 [suphp-ispconfig] amaurib Installation/Configuration 13 16th February 2010 17:26
Freebsd 6.1 support misterm Installation/Configuration 10 9th April 2009 09:29
ispconfig php 5 errors itamarjp Installation/Configuration 8 25th April 2008 10:20
network issues now it says "401 The web site is blocked by administrator" Check General 3 26th February 2008 14:22
Apache2 Freezes celtic Server Operation 31 28th May 2007 17:18


All times are GMT +2. The time now is 21:18.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.