php 5.5.5 not working with Apache 2.4.7

前端 未结 5 584
被撕碎了的回忆
被撕碎了的回忆 2021-01-06 15:31

OK, so recently I decided to upgrade my server. I downloaded apache 2.4.7 "httpd-2.4.7-win32-VC11.zip" and extracted all the files, configured them for my use and

5条回答
  •  青春惊慌失措
    2021-01-06 16:14

    From what I understand, the default new config for apache 2.4 doesn't include PHP module. Make sure you add

    LoadModule php5_module modules/libphp5.so    
    AddHandler php5-script php
    

    to your httpd.conf. I also had to manually re-enable a lot of modules that were commented out by default in the new default config.

    Also make sure to prevent threaded MPM as PHP does not like it (http://www.php.net/manual/en/faq.installation.php#faq.installation.apache2).

    To use previous MPM config change http.conf to

    LoadModule mpm_prefork_module modules/mod_mpm_prefork.so
    #LoadModule mpm_event_module modules/mod_mpm_event.so
    

提交回复
热议问题