
13th January 2007, 19:55
|
|
Junior Member
|
|
Join Date: Jan 2007
Posts: 6
Thanks: 0
Thanked 1 Time in 1 Post
|
|
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
|

14th January 2007, 18:43
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,665
Thanks: 1,896
Thanked 2,593 Times in 2,444 Posts
|
|
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 ?
|

14th January 2007, 19:14
|
|
Junior Member
|
|
Join Date: Jan 2007
Posts: 6
Thanks: 0
Thanked 1 Time in 1 Post
|
|
Quote:
|
Originally Posted by falko
What's in Apache's error log? What's the output of ?
|
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.
|

15th January 2007, 10:43
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 31,908
Thanks: 693
Thanked 4,196 Times in 3,212 Posts
|
|
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
|

10th February 2007, 17:26
|
|
Member
|
|
Join Date: Dec 2006
Posts: 38
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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?
|

10th February 2007, 19:03
|
|
Junior Member
|
|
Join Date: Jan 2007
Posts: 6
Thanks: 0
Thanked 1 Time in 1 Post
|
|
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
|
|
The Following User Says Thank You to sabolc For This Useful Post:
|
|

10th February 2007, 19:29
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 31,908
Thanks: 693
Thanked 4,196 Times in 3,212 Posts
|
|
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
|

10th February 2007, 19:31
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 31,908
Thanks: 693
Thanked 4,196 Times in 3,212 Posts
|
|
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.
|

10th February 2007, 19:49
|
|
Junior Member
|
|
Join Date: Jan 2007
Posts: 6
Thanks: 0
Thanked 1 Time in 1 Post
|
|
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... :-))
|

10th February 2007, 19:52
|
|
Member
|
|
Join Date: Dec 2006
Posts: 38
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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.
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT +2. The time now is 15:12.
|
|
Recent comments
15 hours 19 min ago
15 hours 24 min ago
20 hours 23 min ago
1 day 3 hours ago
1 day 3 hours ago
1 day 5 hours ago
1 day 9 hours ago
1 day 16 hours ago
1 day 19 hours ago
1 day 21 hours ago