How to run PHP 5.2.13 on Apache 2.4.x?


April 2019


1.3k time


I have a legacy PHP site, which runs on Apache 2.2 on a Windows server. Now I am asked to upgrade to Apache 2.4.

I downloaded Apache 2.4.33 and got it configured, but I always get errors for this line in httpd.conf:

LoadModule php5_module "C:/Tools/php-5.2.13/php5apache2_2.dll"
LoadModule php5_module "C:/Tools/php-5.2.13/php5apache2.dll"
LoadModule php5_module "C:/Tools/php-5.2.13/php5apache.dll"

The error message is:

httpd: Syntax error on line 573 of C:/Tools/Apache/Apache24/conf/httpd.conf: Cannot load C:/Tools/php-5.2.13/php5apache.dll into server: The specified module could not be found.

I cannot upgrade to higher PHP versions because the site would break. So I have two questions:

  1. How to run PHP 5.2.13 on Apache 2.4.x?

  2. What is the highest Apache version PhP 5.2.13 can work with?

I did quite online research, but failed to find the answer. Any info is really appreciated.

1 answers


Since you are presumably using Windows with the .dll extension then you can download the correct php5apache2_4.dll from ApacheLounge for PHP 5.2

If that link is broken then try finding the DLL at

The other option is to switch to FCGI. I am personally using FCGI to run all of the latest patch PHP versions from 4.3.x to 7.2.x on my Apache 2.4.