Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run Scan×
Skip to content
VGSources
Blog

php5apache.dll Missing: Trace the Legacy Apache Module on Windows

Length10 min Posted Quest giverVGSources Team
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

httpd.exe: Cannot load .../php5apache.dll into server: The specified module could not be found. The php5apache.dll file is a legacy PHP module for Apache 1.3, not a Windows component.

Which fix applies to you

Start with the description that matches your installation:

  • You use Apache 2.x: You probably have the wrong PHP module. Apache 2.0 uses php5apache2.dll; Apache 2.2 uses php5apache2_2.dll.
  • The file is genuinely absent: Reinstall the complete PHP package that originally supplied it.
  • The file exists but Apache still refuses to load it: Check dependencies, PHP thread safety, architecture, and the Apache path.
  • Your PHP package name contains -nts-: It is a Non-Thread Safe build and is normally intended for IIS or FastCGI, not Apache module loading.
  • The error appeared after antivirus activity: Check quarantine and protection history before restoring anything.
  • You are building a new internet-facing server: Do not build new production infrastructure on PHP 5. It is obsolete and unsupported.

What php5apache.dll does

php5apache.dll is the PHP 5 Apache 1.3 SAPI module supplied by PHP distributions from The PHP Group. Apache loads it directly from the PHP installation directory.

A historical Apache 1.3 configuration looks like this:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Password Reset Recovery USB for Windows 11 ,10 ,8.1 ,7 ,Vista , XP, Server Compatible with all brands of PC Laptops and Desktops
  • [MISSING OR FORGOTTEN PASSWORD?] Are you locked out of your computer because of a lost or forgotten password or pin? Don’t’ worry, PassReset USB will reset any Windows User Password or PIN instantly, including Administrator. 100% Success Rate!
  • [EASY TO USE] 1: Boot PC from the PassReset USB drive. 2: Select the User account to reset password. 3: Click “Remove Password”. That’s it! Your computer is unlocked.
  • [COMPATIBILITY] This USB will reset any user passwords including administrator on all versions of Windows including 11, 10, 8, 7, Vista, Server. Also works on all PC Brands that have Windows as an operating system.
  • [SAFE] This USB will reset any Windows User password instantly without having to reinstall your operating system or lose any data. Other Passwords such as Wi-Fi, Email Account, BIOS, Bitlocker, etc are not supported.
LoadModule php5_module "C:/php/php5apache.dll"
AddModule mod_php5.c
AddType application/x-httpd-php .php

It should not normally be copied to:

C:WindowsSystem32
C:WindowsSysWOW64

Those folders are not the correct repair location. The module belongs with the PHP installation that matches the Apache server.

First check the Apache version

The most common cause is using the correct-looking filename with the wrong Apache generation.

Open Command Prompt and run:

httpd.exe -v

If Windows says the command is not recognized, change to Apache’s bin directory first. For example:

cd C:Apachebin
httpd.exe -v

Match the result to the appropriate PHP module:

Apache version Required legacy PHP module
Apache 1.3 php5apache.dll
Apache 2.0 php5apache2.dll
Apache 2.2 php5apache2_2.dll

Apache 2.x cannot be repaired by renaming php5apache.dll. Do not substitute one DLL for another or combine files from different PHP packages.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Correct the LoadModule line

  1. Press Windows key, type httpd.conf, and open the Apache configuration file in Notepad as administrator.
  2. Find every line containing LoadModule and php5.
  3. Remove or comment out stale PHP module entries by placing # at the beginning.
  4. Add the line that matches the Apache version and the actual PHP directory.
  5. Save the file.

For Apache 1.3:

LoadModule php5_module "C:/php/php5apache.dll"

For Apache 2.0:

LoadModule php5_module "C:/php/php5apache2.dll"

For Apache 2.2:

LoadModule php5_module "C:/php/php5apache2_2.dll"

Use a fully qualified path. Do not rely on an old PATH entry pointing to another PHP folder.

Test the configuration:

httpd.exe -t

A successful result is:

Syntax OK

If Apache reports that the module cannot be found, continue with the dependency and build checks below. If it reports an invalid directive, the configuration may contain instructions from a different Apache generation.

Confirm the file is really in the PHP folder

Open File Explorer and browse to the path in httpd.conf.

For example:

C:phpphp5apache.dll

Check all of the following:

  • The filename is exactly php5apache.dll.
  • The file is in the PHP directory, not only in a backup folder.
  • The Apache configuration points to that exact directory.
  • The PHP folder was not moved after the configuration was written.
  • The installation was not partially overwritten by another PHP version.

You can also check from Command Prompt:

dir C:phpphp5apache.dll

Replace C:php with the path used in your configuration.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

If the file is absent, do not download an isolated copy. Reinstall or extract the complete PHP package from the official PHP Windows archive, using the same PHP version and build family expected by the old Apache installation. The archive contents vary by release and build, so do not assume every PHP package contains this module.

After restoring the complete package:

  1. Extract it to a new directory, such as C:PHP56-clean.
  2. Check that the expected Apache module is present.
  3. Update httpd.conf to use the new absolute path.
  4. Remove old PHP directories from PATH.
  5. Run httpd.exe -t.
  6. Start Apache and inspect its error log if it still fails.

Check whether the error is really a missing dependency

Windows and Apache can report “The specified module could not be found” even when the named php5apache.dll is visibly present. The missing item may be a dependent DLL.

The PHP directory should normally contain the matching PHP runtime, including:

php5ts.dll

Do not copy php5ts.dll from another PHP version. PHP extensions and runtime files must remain from the same package and build family.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Legacy PHP packages may also require a Microsoft Visual C++ runtime. The required runtime depends on the compiler used for that PHP build. For example, VC9 builds require the Microsoft Visual C++ 2008 runtime, while VC11 builds require the Microsoft Visual C++ 2012 runtime.

Install the runtime that matches the PHP package and architecture:

  • An x86 PHP build needs the x86 redistributable, even on 64-bit Windows.
  • An x64 PHP build needs the x64 redistributable.
  • Installing a runtime without matching the PHP build does not guarantee a fix.

After installing the matching runtime, restart Apache and test again:

httpd.exe -t

If the error remains, inspect the PHP module and its dependencies with a reputable dependency-analysis utility. Avoid replacing DLLs based only on a filename search.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Check Thread Safe versus Non-Thread Safe PHP

Apache’s in-process PHP module requires a Thread Safe build.

Look at the PHP package filename. A package containing -nts- is Non-Thread Safe and is normally intended for IIS or FastCGI. It is not the right package for loading PHP as an Apache module.

Use a Thread Safe package whose architecture and compiler match Apache. Do not simply rename an NTS package or copy an Apache module from a different PHP download.

If you have an NTS package:

  1. Stop Apache.
  2. Download or restore the matching Thread Safe PHP package from the official PHP archive.
  3. Extract the complete package into a clean directory.
  4. Update LoadModule to the module inside that directory.
  5. Remove old PHP paths from the system PATH.
  6. Run the Apache configuration test.

A clean directory is safer than adding new files over a mixed installation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Check 32-bit and 64-bit compatibility

Apache and PHP must use compatible architectures.

A 32-bit Apache requires a 32-bit PHP module. A 64-bit Apache requires a compatible 64-bit PHP module. A 64-bit version of Windows can run 32-bit software, but that does not make a 32-bit Apache module compatible with a 64-bit Apache process.

Check Apache:

httpd.exe -V

Review the reported build information and installation path. Also identify whether the PHP package is labeled x86, Win32, or x64.

Rank #3
Sale
StarTech 1-Port USB 2.0 Network Print Server, 10/100Mbps, TAA (PM1115U2)
  • WIRED NETWORK USB PRINT SERVER: Connect a single USB 2.0 printer to a wired Ethernet LAN (RJ45); 10Base-T, 100Base-TX auto-sensing to ensure a reliable connection, letting you print from any network computer, across the office or over the Internet
  • MANUAL NETWORK SETUP REQUIRED: Configuration via web interface (static IP or DHCP) using LPR queue “LP1"; Not plug-and-play, requires intermediate network knowledge for installation; Access our online FAQs for additional helpful tips and instructions
  • USB PRINTER COMPATIBILITY: Works with most USB 2.0 printers using standard drivers; Not compatible with USB hubs, multi-function printers with proprietary drivers, or printers requiring full bi-directional communication
  • COMPATIBILITY: The USB to Ethernet print server is USB 2.0 compliant and works with macOS and Windows; It also supports LPR network printing and Bonjour Print Services for broad compatibility; Included software is compatible with Windows only
  • PRINT FROM ANYWHERE: Print from any computer connected to the Ethernet; This print server doesn’t require a wired connection to a computer, however it must be connected to your networking device (eg. router or switch) with the included RJ45 network cable

If you discover a mismatch:

  1. Stop Apache.
  2. Choose one architecture for both Apache and PHP.
  3. Remove the mixed PHP directory.
  4. Install the complete matching PHP package.
  5. Point httpd.conf to that package.
  6. Run:
httpd.exe -t

A message such as 0xc000007b can indicate an architecture or runtime problem. It does not prove that php5apache.dll itself is missing.

Check antivirus quarantine

Antivirus software can remove or quarantine an old PHP module, especially when the PHP directory is restored from an old backup.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

In Windows Security:

  1. Open Start.
  2. Select Windows Security.
  3. Select Virus & threat protection.
  4. Select Protection history.
  5. Review entries for the PHP directory and php5apache.dll.
  6. Do not restore the file unless the original package came from a verified official PHP archive or trusted application backup.

If the file was quarantined, restoring only that DLL may leave the PHP installation incomplete. The safer repair is to extract the complete matching package into a clean directory and update Apache to use it.

If antivirus repeatedly removes the file, do not disable protection permanently. Verify the package source, scan it, and investigate the detection before continuing.

Repair a damaged Windows component only when Windows itself is affected

php5apache.dll is a third-party application file, not a protected Windows system file. System File Checker and DISM will not normally restore it.

Use these commands only if you also have signs of Windows component corruption, such as broken system applications or unrelated Windows repair errors.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Open Start.
  2. Type cmd.
  3. Right-click Command Prompt.
  4. Select Run as administrator.
  5. Run:
DISM /Online /Cleanup-Image /RestoreHealth
  1. When it completes, run:
sfc /scannow
  1. Restart Windows.
  2. Test Apache again.

Microsoft documents SFC and DISM for repairing Windows components, not PHP files. Repeating these commands will not replace a missing php5apache.dll.

Manually tracking which Windows components are damaged and repeating SFC/DISM without knowing what changed can be time-consuming. Outbyte PC Repair can scan for issues and show what it identifies; repair is performed by the full version, and it is not a substitute for reinstalling the PHP package.

Do not use regsvr32 for this file

regsvr32 is used for DLLs that expose a registration entry point such as DllRegisterServer. php5apache.dll is an Apache loadable module, not a COM or ActiveX component that should be registered in Windows.

Do not run:

regsvr32 php5apache.dll

It will not fix Apache’s LoadModule configuration. It may instead produce a registration error that distracts from the actual problem.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use Apache’s configuration test and error log instead:

httpd.exe -t

Then review Apache’s logserror.log.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Windows Features and Device Manager are usually irrelevant

Windows Features does not provide PHP or php5apache.dll. Enabling IIS will not repair an Apache PHP module.

Rank #4
Sale
StarTech Crash Cart Adapter, Server Management, USB VGA, TAA (NOTECONS01)
  • LAPTOP TO SERVER: USB crash cart adapter connects your laptop to a headless system, turning your laptop into a portable console for rack servers in your server room, PCs, ATMs, kiosks, etc
  • EFFICIENT TROUBLESHOOTING: Easily log server activity using the crash cart adapter software; For optimal performance, be sure to install the latest drivers; Note: Please make sure to download the drivers specifically for the NOTECONS01
  • BIOS-LEVEL CONTROL: Connect the laptop crash cart adapter to your computer using the included USB cable, then connect the integrated USB and VGA cables to your server for instant BIOS-level control
  • SELF-POWERED: The KVM adapter is powered by the server-side USB connection, reducing strain on the laptop's battery and eliminating the need for an AC outlet, allowing you to connect to any PC or device with a VGA output port and USB connection
  • COMPACT DESIGN: This TAA Compliant pocket-sized data center crash cart adapter requires no additional accessories, eliminating the need to carry around a traditional crash cart/trolley when troubleshooting and servicing your systems

To check Windows Features anyway:

  1. Press Windows key.
  2. Type Turn Windows features on or off.
  3. Open it.
  4. Review IIS or other web-server features only if you intentionally use them.

Do not enable IIS merely because Apache cannot load PHP. IIS normally uses PHP through FastCGI, which uses a different PHP integration path.

Device Manager also does not manage PHP modules. It is relevant to hardware drivers, not application DLLs. Open it only when the same troubleshooting session includes a separate hardware problem:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Right-click Start.
  2. Select Device Manager.
  3. Look for warning icons on hardware devices.
  4. Update or reinstall only the affected device driver.

Updating an unrelated driver will not restore php5apache.dll. If a separate driver problem is causing broader application instability, Outbyte Driver Updater can scan for outdated drivers and identify what needs attention; driver installation is handled by the full version, and reinstalling PHP remains the definitive fix for this file.

Consider CGI or FastCGI instead of the legacy module

Apache documentation historically supported both an Apache module and CGI using php-cgi.exe. A CGI or FastCGI arrangement can avoid loading php5apache.dll inside Apache, but it still requires a compatible PHP package and correct server configuration.

This is not a shortcut for a broken legacy stack. If you are migrating an old application, test it in an isolated environment first. For a new deployment, use a currently supported PHP release and its documented Apache or FastCGI integration rather than rebuilding PHP 5.

Final escalation checklist

Before replacing more files, verify each item:

  • Apache version is known.
  • The PHP module name matches that Apache version.
  • httpd.conf uses an absolute path to the current PHP directory.
  • php5apache.dll has not been confused with an Apache 2.x module.
  • The PHP package is Thread Safe for Apache module integration.
  • Apache and PHP have matching x86 or x64 architecture.
  • php5ts.dll and the other PHP files come from the same package.
  • The required Visual C++ runtime matches the PHP compiler build.
  • Antivirus quarantine has been checked.
  • Old PHP paths and stale LoadModule lines have been removed.
  • The PHP directory was restored from a complete official package.
  • httpd.exe -t returns Syntax OK.
  • The Apache error log has been checked after each change.

FAQ

Is php5apache.dll part of Windows?

No. It is a PHP Apache module and should not normally be present in System32 or SysWOW64.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Can I use it with Apache 2.4?

No. php5apache.dll is the Apache 1.3 module. Do not assume an Apache 2.x installation can load it.

Why does Apache say the module is missing when the file exists?

A dependent DLL may be missing, the path may be wrong, the PHP build may be incompatible, or Apache and PHP may use different architectures.

Can I copy the file from another computer?

Only if it came from the exact same PHP version and build family, and even then a complete package restoration is safer. Copying one DLL can leave dependencies mismatched.

Should I install PHP 5.6 for a new server?

No. PHP 5.6.40 was the final PHP 5.6 release, and PHP 5 support has ended. Use a supported PHP release when the application allows it.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Will System Restore fix it?

Only if it can roll back a recent PHP or application deletion and the rollback is acceptable. It is not a normal replacement method for this module.

Is downloading php5apache.dll from a DLL website safe?

No. The file may contain malware, belong to the wrong PHP build, use the wrong architecture, or fail because the real problem is a missing dependency. Restore the complete PHP package from the official PHP archive or the original application’s verified backup instead.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More quests from Patch Notes

  1. How To Create Custom Stickers & Shoutouts In Monster Hunter WildsMonster Hunter WildsBlog20min
  2. How to Get XL Gogoat in Pokemon Legends Z-A (An Extra-Large Gogoat)Pokemon Legends Z-ABlog20min
  3. How to Get Rotting Lightbringer in Diablo 4Diablo 4Blog17min
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.