Apache Startup funktioniert nicht mit PHP 5.3 in Debian Lenny

4215
Agustin Barrientos

Heute habe ich PHP 5.2 auf 5.3 aktualisiert, aber Apache Startup funktioniert nicht.

Apache sagt:

Starten des Webservers: apache2apache2: Syntaxfehler in Zeile 205 von /etc/apache2/apache2.conf: Syntaxfehler in Zeile 1 von /etc/apache2/mods-enabled/php5.load: / usr / lib / apache2 / kann nicht geladen werden /libphp5.so in Server: /usr/lib/apache2/modules/libphp5.so: kann keine gemeinsam genutzte Objektdatei öffnen: Keine solche Datei oder ein solches Verzeichnis

/Usr/lib/apache2/modules/libphp5.so kann nicht geladen werden

Ist ein Downgrade von PHP 5.3 auf PHP 5.2 eine gute Idee? Wenn ja, wie kann ich das machen?

0

1 Antwort auf die Frage

1
mnmnc

See if the libphp5.so module is installed elsewhere on the server using the find and locate command

# find / -name libphp5.so # locate libphp5.so 

if it is, copy it to /usr/lib/apache2/modules/ directory and restart Apache. If the file is not present, install the ‘libapache2-mod-php5′ package, the PHP5 module for Apache2. It adds the required FilesMatch directives to the Apache configuration.

# apt-get install libapache2-mod-php5 

The ‘libapache2-mod-php5′ package will create the libphp5.so file under the modules directory and apache2 will restart successfully

# /etc/init.d/apache2 restart 

if you want to go with downgrade:

Remove PHP

sudo apt-get remove php5-common sudo apt-get remove php5-cli sudo apt-get remove php5 sudo apt-get autoremove memcached 

Update your sources list to point to PHP 5.2

sudo nano /etc/apt/sources.list 

Remove the references to PHP 5.3 packages. For me that was:

deb http://php53.dotdeb.org stable all deb-src http://php53.dotdeb.org stable all 

Add the following 5.2 packages:

deb http://http.us.debian.org/debian stable all deb http://security.debian.org/ stable/updates main contrib deb http://packages.dotdeb.org/ stable all 

Install PHP 5.2

sudo apt-get update sudo apt-get install php5-cli sudo apt-get install php5 

Reinstall any PHP modules your application requires. For me that was:

sudo apt-get install memcached sudo apt-get install php5-memcache sudo apt-get install php5-curl sudo apt-get install php5-mysql sudo reboot