JackBauer24
Jungspund
Hallo,
ich benötige sowohl PHP4 sowie PHP5 auf meinem Apache Webserver.
Was muss ich tun damit PHP5 zusätzlich zu PHP4 installiert wird?
Wenn ich nun mit yast (ich benutze SuSE 10.0) )versuche das apache2-mod_php5 Paket zu installieren
(und alle anderen PHP5 Files) bekomme ich einen Abhängigkeitskonflikt angezeigt.
(Wenn ich PHP5 installiere soll ich PHP4 löschen oder umgekehrt)...
Nun meine Idee:
Ich bräuchte jetzt jeweils eine httpd.conf für php4 und php5.
Über ein Script (phpswitcher) könnte man dann wählen, welche php Version verwendet
werden soll.
Ein Script hierzu habe ich bereits gefunden.
Was muss ich nun tun, damit ich PHP4/PHP5 auf meinem System zum Laufen bekomme?
Für eine Hilfe wäre ich dankbar.
Gruß
JackBauer24
ich benötige sowohl PHP4 sowie PHP5 auf meinem Apache Webserver.
Was muss ich tun damit PHP5 zusätzlich zu PHP4 installiert wird?
Wenn ich nun mit yast (ich benutze SuSE 10.0) )versuche das apache2-mod_php5 Paket zu installieren
(und alle anderen PHP5 Files) bekomme ich einen Abhängigkeitskonflikt angezeigt.
(Wenn ich PHP5 installiere soll ich PHP4 löschen oder umgekehrt)...
Nun meine Idee:
Ich bräuchte jetzt jeweils eine httpd.conf für php4 und php5.
Über ein Script (phpswitcher) könnte man dann wählen, welche php Version verwendet
werden soll.
Ein Script hierzu habe ich bereits gefunden.
Code:
#!/bin/bash
################################################################################
# Setphp helps out in running Apache with either php4 or php5 and makes
# switching between these versions easy.
# ################################################################################
# if php4 or php5 are are passed as parameters then set this as the input and
# don't ask questions. If no parameters are included ask which version of php should
# be activated.
if [[ "$1 " == php5 || "$1" == php4 ]]; then
INPUT=$1;
else
echo -n "Please enter which version of php you would like to start (php4/php5): ";
read -e INPUT;
fi
if [ "$INPUT" == php4 ]; then
echo "copying php4 config file...";
sudo cp /etc/httpd/php4.httpd.conf /etc/httpd/httpd.conf;
echo "restarting Apache graceful..";
sudo apachectl graceful;
echo "Apache with php4 should be running now";
elif [ "$INPUT" == php5 ]; then
echo "copying php5 config file...";
sudo cp /etc/httpd/php5.httpd.conf /etc/httpd/httpd.conf;
echo "restarting Apache graceful..";
sudo apachectl graceful;
echo "Apache with php5 should be running now";
else
echo "Oops, wrong input. You can only choose between php4 or php5";
fi
Was muss ich nun tun, damit ich PHP4/PHP5 auf meinem System zum Laufen bekomme?
Für eine Hilfe wäre ich dankbar.
Gruß
JackBauer24
Zuletzt bearbeitet: