Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 2 > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 13th January 2007, 19:55
sabolc sabolc is offline
Junior Member
 
Join Date: Jan 2007
Posts: 6
Thanks: 0
Thanked 1 Time in 1 Post
Default Can't control PHP on OpenSUSE 10.2 - AddHandler and AddType

I installed ISPConfig on OpenSUSE 10.2 - followed the Perfect Setup to the letter (disabling x-php in mime.types, etc). Everything works nicely, except that I cannot control serving PHP - no PHP gets served at all, apparently the Apache 2 server doesn't know what to do with them. With what little I know, I could identify the following:

1. /etc/apache2/conf.d/php5.conf is modified by ISPConfig: the AddHandler lines get commented out (so that ISPConfig can control serving PHP). If I change this back (erase the comments), then, of course, PHP works beautifully but then it works for ALL sites (i.e. ISPConfig cannot control it).

2. ISPConfig uses AddType lines in its /etc/apache2/vhosts/Vhosts_ispconfig.conf file. I know this file must not be edited, but just for a test, I changed the AddType to AddHandler, restarted Apache 2 manually and PHP works again beautifully. Of course, this is no solution, just a test.

3. There is a line in the OpenSUSE 10.2 changelog that says "corrected apache directive is AddHandler not AddType".

Does it mean that I cannot use AddType at all? My abilities stop here, what can I do? Just leave global PHP on?

Best,

Szabolcs
Reply With Quote
Sponsored Links
  #2  
Old 14th January 2007, 18:43
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

I had PHP working on OpenSuSE 10.2 without any changes in ISPConfig.
What's in Apache's error log? What's the output of
Code:
httpd -t
?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 14th January 2007, 19:14
sabolc sabolc is offline
Junior Member
 
Join Date: Jan 2007
Posts: 6
Thanks: 0
Thanked 1 Time in 1 Post
Default

Quote:
Originally Posted by falko
What's in Apache's error log? What's the output of
Code:
httpd -t
?
Syntax OK.

As I said, I could identify no problems either in the syntax of the Apache config, or in the installation (I really did follow your perfect setup). It is just that the AddType directive does not seem to have ANY effect at all.
The OpenSUSE 10.2 disk I used is the DVD image downloaded a few days ago from opensuse.org.

I had about twenty more questions but reading through the forum answered almost everything. Your support is extraordinary.

I would like to ask one more thing, though. I understand you like Debian (and so did I , until I had to provide PHP5 and MySQL5 and leave the stable release) and mentioned somewhere you don't recommend OpenSUSE 10.2 for a production system. What is the reason? I'd love to have Debian but I have a 3ware RAID controller and MySQL5 is a must and I'd love to be able to do apt-get update; apt-get upgrade... :-))

Thank you for your help in advance.
Reply With Quote
  #4  
Old 15th January 2007, 10:43
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,951
Thanks: 825
Thanked 5,362 Times in 4,209 Posts
Default

Quote:
I would like to ask one more thing, though. I understand you like Debian (and so did I , until I had to provide PHP5 and MySQL5 and leave the stable release) and mentioned somewhere you don't recommend OpenSUSE 10.2 for a production system. What is the reason? I'd love to have Debian but I have a 3ware RAID controller and MySQL5 is a must and I'd love to be able to do apt-get update; apt-get upgrade... :-))
Its not a good idea to go to the debian unstable or testing branch for a production system. Its better to use the php5 and mysql5 packages from dotdeb.org. For the raid driver, did you try to use the 2.6 kernel from debian?

SuSE goes its own way in the linux world which results to incompatibilitys with many other linux distributions and upgrading packages with yast on a perfectly configured server may lead to problems that yast overwrites your manually edited configuration files.

If you've ever tried to do a distribution upgrade from e.g. SuSE 10.1 to 10.2 and compare it with a Debian dist upgrade, you will understand what I mean
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #5  
Old 10th February 2007, 17:26
R0l@ndSm0ke R0l@ndSm0ke is offline
Member
 
Join Date: Dec 2006
Posts: 38
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Changing addtype to addhandler works for me when php is not working on my sites. However, whenever I change something through ISPConfig it rewrites those statements back to addtype. Is there a file that ISPConfig uses to create the vhost file that I can edit to tell it that it should always insert AddHandler instead of AddType?
Reply With Quote
  #6  
Old 10th February 2007, 19:03
sabolc sabolc is offline
Junior Member
 
Join Date: Jan 2007
Posts: 6
Thanks: 0
Thanked 1 Time in 1 Post
Default Use Apache directives

Quote:
Originally Posted by R0l@ndSm0ke
Changing addtype to addhandler works for me when php is not working on my sites. However, whenever I change something through ISPConfig it rewrites those statements back to addtype. Is there a file that ISPConfig uses to create the vhost file that I can edit to tell it that it should always insert AddHandler instead of AddType?
There is a file at /root/ispconfig/isp/conf/vhosts.conf.master but that did not help me. Here is what I ended up doing:

1. You do not use the PHP checkbox at all. That way ISPConfig will not write or overwrite your config.

2. You add these lines in the "Apache directives" field manually:

AddHandler application/x-httpd-php .php4
AddHandler application/x-httpd-php .php5
AddHandler application/x-httpd-php .php
AddHandler application/x-httpd-php-source .php4s
AddHandler application/x-httpd-php-source .php5s
AddHandler application/x-httpd-php-source .phps

((these are the lines copied from the original SUSE Apache2 config)).

Actually, I found out that playing with the Apache directives you can set a number of nice things (I needed FollowSymLinks, for example).


A little addition: I am not sure if the OpenSUSE guys changed something but following the "Perfect setup OpenSUSE 10.2" manual, /var/lib/named is owned by root (and named does not work). Perhaps it could be useful to add the following line to the manual:

chown -R named:named /var/lib/named


Finally, a question from me, too: Falko, Till, are you planning to write a Perfect Setup for SLES (SUSE Linux Enterprise Server) 10, too?

Best,

Szabolcs
Reply With Quote
The Following User Says Thank You to sabolc For This Useful Post:
jlp09550 (11th April 2007)
  #7  
Old 10th February 2007, 19:29
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,951
Thanks: 825
Thanked 5,362 Times in 4,209 Posts
Default

Quote:
Originally Posted by R0l@ndSm0ke
Is there a file that ISPConfig uses to create the vhost file that I can edit to tell it that it should always insert AddHandler instead of AddType?
Please have a look here:

http://www.howtoforge.com/forums/sho...49&postcount=6
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #8  
Old 10th February 2007, 19:31
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,951
Thanks: 825
Thanked 5,362 Times in 4,209 Posts
Default

Quote:
Originally Posted by sabolc
Finally, a question from me, too: Falko, Till, are you planning to write a Perfect Setup for SLES (SUSE Linux Enterprise Server) 10, too?
Currently not, mainly because we dont have a sles licence.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #9  
Old 10th February 2007, 19:49
sabolc sabolc is offline
Junior Member
 
Join Date: Jan 2007
Posts: 6
Thanks: 0
Thanked 1 Time in 1 Post
Default no license needed

Quote:
Originally Posted by till
Currently not, mainly because we dont have a sles licence.
Till, to my best knowledge, you do not need a SLES license to write the perfect setup. What you pay for is a subscription, for the security and other updates, but otherwise you can quite freely use SLES... at least for some time, 60 days maybe, definitely more than what you need to write the setup... :-))
Reply With Quote
  #10  
Old 10th February 2007, 19:52
R0l@ndSm0ke R0l@ndSm0ke is offline
Member
 
Join Date: Dec 2006
Posts: 38
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default

Thanks much. Does this cover all the php lines that are inserted as AddType? I believe there are two or three of them.

You can get a temporary license, but the license, I think, really only applies to updates and support.
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
Slightly Confused (DNS & Server Help) JohnnyBGoode Installation/Configuration 26 14th August 2007 09:54
VirtualHosts marra87 General 9 12th September 2006 04:09
Vhosts no longer written to whitty Installation/Configuration 15 3rd July 2006 22:37
2 domains, 1 site wadims Installation/Configuration 13 31st May 2006 00:21
all my site go to /var/www/ Absolusteph Installation/Configuration 14 11th March 2006 21:27


All times are GMT +2. The time now is 06:23.


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