I followed the following Tutorial to enable a "switch" on my ISPConfig for PHP4 and PHP5: . On the first site it says: As soon as I want to restart apache2 it says: I earased all php_admin commands in the vhost-file and started again. Apache can be started now of course, but my websites don't work anymore... I guess I get this error because of the disabled php4 module? But how can I work around? Another thing is, that I followed the tutorial altough, at the end the ISPConfig-vhost-file isn't rewrite automatically anymore... :-( What did I wrong?
Apache doesn't start because you already have PHP-enabled web sites, but you've disabled PHP. That's also the reason why ISPConfig doesn't rewrite the Vhosts_ispconfig.conf file anymore. I recommend to follow the tutorial to the end and ignore the failed Apache restarts during the tutorial.
I've already tried that. The problem is, that I can't start apache2. So I tried to clear all the php_admin_flags in Vhosts_ispconfig.conf and restarted apache2. But the problem that Vhosts_ispconfig.conf still doesn't get rewrite with the appropriate suPHP commands (Engine on etc.) persists...strange, isn't it? I thought I could set / let ISPConfig set the php_admin_flags correspondending suPHP-commands, but it doesn't work...But it should, doesn't it? This is an Debian 3.1 Server which I upgraded to Etch. I tried the whole thing on another box, which was Debian Etch installed (without any web and so no php_admin_flags yet) and it all worked flawlessly...
I guess you have now some Vhosts_ispconfig.conf files with a date in the filename in /etc/apache2/vhosts. Does any one of them contain the new suPHP directives? If so, rename it to Vhosts_ispconfig.conf and run Code: httpd -t Does it show syntax errors?
Yes, there a some of these Vhosts_ispconfig.conf files...but none of them contains any suPHP directives, only suExec. Does suExec conflict with suPHP? I've previously installed suExec. I also tried to redo all the suPHP Tutorial, several times. With php_admin_flags and without. It seems, the suPHP directives just don't get into Vhosts_ispconfig.conf, even though Vhosts_ispconfig.conf gets now rewrite.
You can not use php_admin_flags with suphp. php_admin_flags is only for mod_php. If you want to use suphp with ISPConfig, you must switch to suphp in the file config.inc.php, then change a setting in one of your sites so that ispconfig updates the Vhost_ispconfig.conf file. ISPConfig will remove all php_admin_flags that were added by ISPConfig, but if you added php_admin_flags manuually in the apache directievs field or a .htaccess file, you will have to remove them first.
Thanks till! Works perfectly! VHost_ispconfig.conf gets now rewrite with the suphp directives and works! (at my other server, config.inc.php got rewrite with the value "suphp" automatically? Why had I to switch manually? Does it depend on the distro?) I still got two questions left: 1. If I got it right, I have to switch the php-Version with editing VHost_ispconfig.conf manually, right? So far ok. But if I (or a reseller/client) do 1 change in my/their ISPConfig Panel, the whole file VHost_ispconfig.conf gets rewrite, so it overwrites my manually edited change to the other php-version (in my case php5, because standart is php4 on my Debian System). Can I prevent automatic overwriting somehow? Perhaps I have to place my manually added apache directive on a special place in the VHost_ispconfig.conf? So that only this directives got read from apache2 and it won't get overwritten? 2. Can I still use the "apache directives" field in ISPConfig Panel for adding my php_admin_flags and php_admin_values? Or how can I set these values with suphp? I tried adding it manually with "setEnv php_admin_flags" but I got errors, actually.. Thanks so much.
1) Thats not correct. The Vhsot_ispconfig.conf has never to be edited and can not be edited. If you want t change the php version, install php5 as cgo and edit the suphp configuration in /etc/ 2) No, php_admin_flag and php_admin_values are not supported by suphp, they are mod_php specific.
I just noticed that if I switch to php5 there are no modules installed like gd or mysql. So I get following errors if I want to access a site: Database Error: Unable to connect to the database:The MySQL adapter "mysql" is not available. Do I have to install and enable all modules for php5? How do I do that?
1) But in the mentioned how to (How To Set Up suPHP with PH4 and PHP5) on the third an last page it says: 2) Does this mean, that I can't set any of these variables for php with a suPHP-Installation? Or are just the directives a different syntax? 3) So it's apt-get install xy for Debian Etch I guess. Thanks.
1) This nis not a howto for ISPConfig. 2) Yes, and this has nothing to do with ISPConfig. No. But instead you can have a complete custom php.ini file for every website. For details you should have a look at the suphp homepage: http://www.suphp.org/Home.html The installation guide for ISPConfig would have been this one: http://www.howtoforge.com/install-s...tions-for-use-with-ispconfig-2.2.20-and-above
Ups... Thanks till! Now I got it... Great! That sounds pretty cool, exactly what I was looking for! 2 in 1 : )
Still have one question left: I want to be able to switch between PHP4 and PHP5 for each single vhost. So how can I achieve this if not editing VHost_ispconfig.conf? I have configured PHP4 and PHP5 in /etc/suphp.conf like that:
I've installed php4 as CGI, php5 as CGI and suPHP. What kind of apache directives let me switch to php5 (as php4 is standart)? I don't get it. If I put a apache directive in the ISPConfig Panel, it will be placed on top of the web's virtual host. So if I'd like to switch to php5 for a certain web, I would place following apache directive: Code: AddHandler x-httpd-php5 .php .php3 .php4 .php5 suPHP_AddHandler x-httpd-php5 ? But further down there will still be following in the Vhost_ispconfig.conf File: Code: <VirtualHost 192.168.1.100:80> suPHP_ConfigPath /var/www/suphp_conf/test.com AddHandler x-httpd-php5 .php .php3 .php4 .php5 suPHP_AddHandler x-httpd-php5 SuexecUserGroup testuser testgroup ServerName www.test.com:80 ServerAdmin [email protected] DocumentRoot /var/www/web6/web AddType application/x-httpd-php .php .php3 .php4 .php5 <Directory /var/www/web6/web> suPHP_Engine on suPHP_UserGroup test.com web6 [B]AddHandler x-httpd-php .php .php3 .php4 .php5 suPHP_AddHandler x-httpd-php[/B] SetEnv php_safe_mode On </Directory> So it's still php4 on that vhost? I'm sorry, but I can't see how to override this automatically setting in VHost_ispconfig.conf File... Can you help me one more please? Thanks so much.
You should disable suPHP in ISPConfig so that the second set of PHP directives uses mod_php instead of suPHP.