cannot load c:/PHP5/php5apache2_2.dll into server I am getting this error while running apache 2.2 on window XP machine
If u are using php extracted from php-5.1.4-Win32.zip with the apache 2.2.2, then u must do exactly the instructions shown in the url posted by miaow (hosted by lewellyn). What i mean is you MUST reinstall the php using the win32 package stated in that website (which is php5.2-win50230.zip after u saved it into ur pc).
anyone have any idea what could be the problem. I can see there is no php5apache2_2.dll in c:/php5 folder.
-------------Problems Reply------------
First you must downlaod de .dll file (php5apache2_2.dll) then put it in your extensions directory.
Then edit your php.ini file, find de text:
;extension=php5apache2_2.dll
// and change y to extension=php5apache2_2.dll
if the text is not present put the line yourself. Then restart apache and it should load your extension.
PD: you can see where your extensions directory is located looking for the text 'extension_dir' in your php.ini, sometimes looks like: extension_dir = C:phpextensions
Hope this help you, if not please paste the error here, you can find an error log file in apache/error/error.log or something like that.
What worked for me was obtaining php5apache2_4.dll-php-5.4-win32.zip from apachelounge and using 'php5apache2_4.dll' file from the 'PHP 5.4.8' unzipped folder. I had apache 2.3.4 (32-bit) from apachelounge.com and php 5.4.9 (32-bit) from windows.php.net installed on my Win 7 (64-bit).
The dll worked despite 5.4.8 - 5.4.9 mismatch.
The corrsponding changes within 'php.ini' and 'httpd.conf' are to be maintained acoording to this helpful guide.
Best regards.
Here is how I got it to GO:
- Created the folder C:Apache
- Downloaded and installed http-2.2.22-win32-x86-no-ssl.msi During install, entered
localhost
as Network Domain and Server Name - From browser, typed in url
http://localhost/
and page came up with 'It Works' (I do not know if there is a God, but took that as a good sign:) - Created the folder C:PHP
- Downloaded and installed php-5.2.17-Win32-VC6-86.msi
- Created a new file in notepad with the following:
- Saved it in the Apache/htdocs folder as phpinfo.php
- From browser, typed in url
http://127.0.0.1/phpinfo.php
It did not work (i.e. it did not run the .php program file) - Hmm, oh yeah, you have to restart Apache for it to see updates to its own configuration file
Start, Apache, Control..
-> generated the error that it could not find C:Apachephp5apache2_2.dll - Well, I found it in C:PHP and I copied it to C:Apache
Start, Apache, Control..
-> generated an error about a problem with the PHPINIDir directive on line 495 of C:/Apache/conf/httpd.conf - Fixed that by editing this line in the above file to
PHPIniDir 'C:/PHP/php.ini'
- Tried to restart Apache again, run the test file in the browser. Still, it did not work:(
- Recalled seeing this before and decided to reboot computer Restarted (or started) the Apache Server
- Ran the test file again.. IT WORKED!
Note that in some of the above I may have mixed up some forward and back slashes Good luck!
You should download the
dll
file from PHP distribution package. And see three ways to set up PHP to work with Apache 2.x.You can configure PHP as Apache handler in <[apache_home]>confhttpd.conf as follow:
LoadModule php5_module 'c:/php/php5apache2_2.dll'
AddHandler application/x-httpd-php .php
#configure the path to php.ini
PHPIniDir 'C:php'
NOTE: To avoid the error while starting apache, the
php ini dir
path should be in single quotes with backslash. Don't forget to end it with backslash.Please check that for using Apache you should download VC6 version of PHP. If you use VC9 Apache will not start. It is clearly given in the site.
http://in3.php.net/manual/en/install.windows.manual.php
You are getting an error due to the fact that the c:/PHP5/php5apache2_2.dll is not shipped with the non-thread safe version of PHP that you probably downloaded. Two options:
- Download and install the thread safe version of PHP instead and you will get everything you need.
- If the non-thread safe version is important to what you want to accomplish, download the zip bundle of the thread safe version and take only the .dll you need from there.
Which version: For Apache Server 2.2, you need to download PHP 5.4 thread safe, which is shipped with both php5apache2_2.dll and php5apache2_4.dll. Some earlier versions probably work as well. PHP 5.5 is only shipped with php5apache2_4.dll which will mismatch with your version.
Cf the download links here on the official site: http://windows.php.net/download/.
None of the suggestions above worked for me. I tried replacing the php5apache2_2.dll file and restarting everything, but got the same error. I ended up uninstalling Apache, MySQL, and PHP, removing the path variables, and then installing WampServer. Had everything up and running in less than 5 minutes.
By the way, I uninstalled PHP by just deleting the folder in Program Files, since it did not turn up in Add/Remove Programs. I also deleted any leftover Apache and MySQL folders after the uninstalls.
Even file exist and apache shows error that this file don't exists, install Microsoft C++ Redistributable Package. Note, that you have to install 2008 version, then 2010. Install both packages, not only 2010 version.
I've had a similar problem. I found out after following a particular Youtube tutorial that if you go and edit the httpd.conf file while Apache is running... it will mess up. Make sure that you install Apache first... then turn it off, then install php afterward. It should then edit the httpd.conf file itself. This Youtube tutorial solved my problem. http://www.youtube.com/watch?v=UKbEzmMliNM Hope it helps. I got MySQL installed and working too... but had to install the .Net 4 Framework.
You need to install 'http-2.2.22-win32-x86-no-ssl.msi' instead.
For me the problem was resolved by replacing the file php5apache2_2.dll from another site, somehow the file downloaded from the php.net site was corrupt.
I had already the file php5apache2_2.dll on my wamp 2.2 and the PHP version 5.3.13 so I just copied that file into my version 5.4.35 and it worked.
I did not have to mess with the apache configuration as other people suggest.
One more thing I did was to install the Visual C++ Redistributable for Visual Studio 2008 for my x64 machine running Windows 7 Ultimate Edition. I don't think this helped since I had already the x86 version and working with my previous PHP version, but is part of the action I taken.
I had the same error. I had installed x64 version of Apache and x86 version of php. After a lof of searching I found that this doesn't work.
So I had to install x64 (threadsafe) version of PHP. After this Apache works fine . :) Hope this helps!
If your php5apache2_4.dll is missing:
My problem was the php5apache2_4.dll was not included in PHP install zip. It is included only the Thread Safe version of PHP 5.4.38
http://windows.php.net/downloads/releases/php-5.4.38-Win32-VC9-x86.zip
Category:phpViews:5Time:2011-11-24Related post
- Visual Studio 2008 not loading MFC dll symbols2008-10-23Visual Studio 2008 doesn't appear to be loading symbols for MFC dlls when I debug my application. This used to work fine in 2005 - ie. when it loaded the dll it said 'Symbols loaded' and can then debug it. In 2008 (having upgraded to MFC 9, so they a
- How loader Maps DLL in to Process Address Space2008-12-03I am curious to know How the Loader Maps DLL in to Process Address Space. How loader does that magic. Example is highly appreciated. Thanks in advance. --------------Solutions------------- What level of detail are you looking for? On the basic level,
- Unable to load C++ DLL in C# application in Vista x642008-12-04I have a DLL written in C++ that needs to be used by an application in C#. It works great under Vista x86, but under x64 it fails to load. So I build an x64 version of the DLL and I detect whether the OS is x86 or x64 and use the appropriate interop
- Delphi 2009, DbExpress with Oracle : Unable to load oci.dll2009-01-09i've setup a demo to test datasnap 2009, and i've got a problem with dbexpress. The dbexpress error message, (same at design time or runtime) : 'Cannot load oci.dll library (Error code 127). The OCI.dll library may be missing from the system path.' I
- Loading dynamic DLL fails with IOException in Windows Mobile2009-02-20I am new to Windows Mobile development and am running into a DLL issue. I am using Assembly.LoadFrom() to load a DLL on my handheld and it fails with the following: System.IO.IOException: File or assembly name 'MyCustom.dll', or one of its dependenci
- C# crash when loading C++ dll2009-04-09My program is written in C# NET 2.0,it's using external functions from a dll written in C++ using Microsoft Visual Studio 2008 SP1. If I remove the dll from the directory the program is placed,the program crashes at the moment it should use the dll.T
- dllimport unable to load the dll2009-06-04I found Stack Overflow is one among the best group for all our clarifications. I have the native dll written in C. I compiled the proj using VC++ (VS 2008), Using my C# application I called the dll functions through Dllimport. The problem is it fails
- Loading Native DLL as Debug Module in Managed C# Code for Windows CE2009-07-11I am writing a Windows CE application in C# that references a native C++ DLL (that I am also coding) using the following method: [DllImport('CImg_IP_CE.dll')] public static unsafe extern void doBlur(byte* imgData, int sigma); This actually works fine
- NUnit test runner GUI that easy can load multiple DLLs2009-07-14We have loads of DLLs with tests. I'm looking for a test runner (GUI) that either allows me to load all DLLs in a folder or that can load all tests from Visual Studio solution files. Ideas? (I would like to use it as a complement rather than a replac
- Problem loading vix.dll2009-07-30I am using the VMWare Tasks library to try and automate some VMs for testing. However when my C# program (32-bit) tries to load vix.dll it seems to fail. Running vmrun.exe from the VixCOM directory works. vmrun.exe In procmon I can see vmrun.exe try
- how to read the assembly manifest without loading the .dll2009-07-31Essentially need to read the dependencies programmatically without loading the assembly itself, as then you can't unload them --------------Solutions------------- 2 solutions come to my mind, although I think there's easier way (which I forgot or don
- Explicit Loading of DLL2009-08-10I'm trying to explicitly link with a DLL. No other resources is available except the DLL file itself and some documentation about the classes and its member functions. From the documentation, each class comes with its own member typedef example: type
- Can c++ create array of pointers to different classes dynamically loaded from dll?2009-10-16Can c++ create array of pointers to different classes dynamically loaded from dll? ps.without headers with class definations --------------Solutions------------- I think you need to have an exported function that instantiates objects of the class. Th
- C#: problem loading C++ DLL2009-11-10In my code, I can load 'MessageBoxA' from user32.dll and use it, but if I try to load and use a function from my DLL, I get a crash. My C# code: [DllImport('SimpleDLL.dll')] static extern int mymean(int a, int b, int c); [DllImport('user32.dll')] sta
- Dynamically loading a dll in C#2009-11-17I have a window to use for editing. The editor should load a dll (which I have full control of) in response to the user's selection to know how to display the information visually. (They're dll's, as a user will not necessarily want or need every sin
- Advanced topic of dynamic lazy loading of DLLs in silverlight application2009-11-26It's a common sense when you are developing a big silverlight application that break it into many small components, to make the original XAP file relatively small and dynamically load the necessary DLLs from the server side on demand. An easy way is
- Unable to load libmysql.dll2009-12-23I am trying to use dbexpress component first time to connect to mysql i got this error Failure to Connect : Unable to load libmysql.dll my delphi version : Delphi7 mysql 5.1.36 (wamp server installed on my windows). can any one help me in this thanks
- Is there a better way to load a dll in C++?2010-01-13Right now I do something like this and it seems messy if I end having a lot of functions I want to reference in my DLL. Is there a better and cleaner way of accessing the functions without having to create a typedef for each function definition so th
- Load a DLL and Its Dependencies2010-01-15How do I load a dll and its dependencies? I don't want to place each of the dependent dlls in an Assembly.Load. I'd rather just load the one dll and then the dependencies are loaded. The above dlls aren't loaded when my application launches. They are