Help please, urgently! I installed php5, along with apache2, etc. after installation everything worked, rebooted the comp. it all stopped working, well, apache2 seems to work, but php doesn't know how to call the php5 package to work

  • PHP, by chance, not a separate daemon (via CGI, for example), started? - Pernat1y
  • so the Apache "seems to work" or does not work? .. what displays localhost in the browser? - deivan_
  • Tried to enter in the console sudo /etc/init.d/apache2 start? And then the “Apache seems to be working” is somehow embarrassing, since you could not reliably determine whether the Apache works. - ReinRaus 4:08 pm
  • yes, PHP starts via Terminal - Semyon Savenko
  • one
    sudo a2enmod php5; sudo service apache2 reload sudo a2enmod php5; sudo service apache2 reload only the second may not work, my service package is installed - zb '22

2 answers 2

To start:

1) Check that the httpd.conf (or what replaces it in a particular ubunt - there may be differences) includes the module itself:

 LoadModule php5_module /usr/lib/apache2/modules/ 

2) Check that Apache is configured to correctly process php files. For example:

 <FilesMatch ".+\.php$"> SetHandler application/x-httpd-php </FilesMatch> 

Specific lines and conf. Files may differ, for example, the loading of a module on my ubunt 12.10 occurs in the /etc/apache2/mods_available/php5.load file

  • one
    Chegos? Check the validity of the standard installation - is it a sledgehammer? Well, well :) - user6550
  • Isn't it obvious that '_' instead of '-' is just a typo? - user6550

Details are not enough. But you can bang Apache with pkhp and put it again:

 sudo apt-get purge apache2 php5 sudo apt-get install apache2 php5 php5-cgi libapache2-mod-php5 

Something like this.