Jump to content

Put php5apache2_2.dll in folders, but error says otherwise....


Go to solution Solved by yshua,

Recommended Posts


PHPIniDir "C:/PHP/"

LoadModsule php5_module "C:/PHP/php5apache2_2.dll"
AddType application/x-httpd-php .php

Dear Readers:

 

       Have PHP5.3.8, MySQL5.1, Win8.1, Apache2.2, and put the above code at the bottom of httpd.conf file.

Actual error message was,

 

"httpd: Syntax error on line 499 of C:/Program Files (x86)/Apache Software Foundation/Apache2.2/conf/httpd.conf: Cannot load C:/PHP/php5apache2_2.dll into server: The specified module could not be found."

 

Line 499 was about the blank line in the code above.  And php5apache2_2.dll was put in the PHP folder, and in the htdocs folder, just to be sure.  So this error is puzzling!

 

Help, please,

Yshua :confused:

 

 

Link to comment
Share on other sites

Where did you download Apache from httpd.apache.org or apachelounge.com

 

If you got Apache from apache.org then you need to download Apache2.2 from apachelounge.com instead. The PHP distributions from windows.php.net/download are compiled with VC9 or VC11. The Apache binaries from apache.org are only compiled with VC6, making it incompatible with the PHP binaries from windows.php.net.

 

Quote from php.net

 

 

Which version do I choose?

 

Apache

Please use the Apache builds provided by Apache Lounge. They also provide VC11 builds of Apache for x86 and x64. We use their binaries to build the Apache SAPIs.

If you are using PHP with Apache 1 or Apache2 from apache.org (not recommended) you need to use the older VC6 versions of PHP compiled with the legacy Visual Studio 6 compiler. Do NOT use VC9+ versions of PHP with the apache.org binaries.

 

You may also need to download the VC9 or VC11 runtime from Microsoft too.

 

 

 

 

VC9 and VC11

More recent versions of PHP are built with VC9 or VC11 (Visual Studio 2008 and 2012 compiler respectively) and include improvements in performance and stability.

The VC9 builds require you to have the Visual C++ Redistributable for Visual Studio 2008 SP1 x86 or x64 installed.

The VC11 builds require to have the Visual C++ Redistributable for Visual Studio 2012 x86 or x64 installed.

 

 

Edited by Ch0cu3r
Link to comment
Share on other sites

OK, folks, am back again:

 

         Thanks for the advice, but am still up a creek, so to speak.  Fully intend to try Apachelounge VC9 version of Apache and PHP 5.4.25, VC9 x86 nts.  But this supposedly requires the dll, php5apache2_4.dll, which am unable to find.  Is php5apache2_4.dll the right dll to have in PHP folder, and, if so, where can it be found? 

 

Yshua :sweat:

Link to comment
Share on other sites

Dear mac_gyver:

 

        I REALLY appreciate you all hanging in there with me!  Am willing to try ANYTHING you all can think of....

 

        Still am unable to find php5apache2_4.dll, which it showed in a video install procedure for Windows 8 was needed!!!

 

Apache2.4 option:        Will quickly review all things attempted. Retyped all questionable quotes in httpd.conf file and now have php5.dll where php5apache2_2.dll used to be for lack of php5apache2_4.dll.  Unsurprisingly, am still receiving the error:  httpd syntax error on line 176 of C:/Apache24/conf/httpd.conf :  Can't locate API module structure 'php5_module' in file C:/php/php5.dll: No error. 

 

         Oh, and even changed all occurrences of PHP to php, in compliance with video.  Obtained VC9 version from Apachelounge.com.  Am running exclusively the version without ssl for now.  Tried to download Windows Server 2012 R2 from Microsoft but am unsure how the install "took."

 

Apache 2.0 option:        Am also "psyched" to try from scratch with Apache 2.0.26 and then installing dll's to comply with php5apache2_2.dll in conf file.  In this case, am unsure how to download legacy Visual Studio 6 compiler....

 

Thanks for your patience,

Yshua

Link to comment
Share on other sites

Dear Ch0cu3r:

 

Thanks for your great advice. Can you please explain why thread safe version of php is needed?

 

Am currently running MySQL 5.1.65, php-5.3.8-nts-Win32-VC9-x86 along with same php src. Used the .msi installer, but was unsure how to combine the source code with rest of installed php code. Must confess: Found myself arbitrarily copying code into php folder. Also, all voluminous php code from previous Windows 7 server was using currently installed MySQL 5.1.65, which installed fine on current pc. So am now using windows 8, soon to update to 8.1.

 

Following your advice, found php5apache2_4.dll from apachelounge.com, from subset php version 4.3, in case php version 4.25 needs to be installed instead of current php5.3.8. New emsg reads:

 

Httpd: Syntax error: Syntax error on line 176 of C:/Apache24/conf/httpd.conf: Cannot load C:\\php\\php5apache2_4.dll into server: The specified module could not be found.

 

Would surely swap out php versions to help.

 

Thanks,

Yshua

Link to comment
Share on other sites

Dear Ch0cu3r:

 

Noting the \\'s in last emsg, switched coded \'s to /'s in php load module statement, and emsg is now as follows:

 

Httpd: Syntax error: Syntax error on line 176 of C:/Apache24/conf/httpd.conf: Cannot load C:/\php/php5apache2_4.dll into server: The specified module could not be found.

 

Thanks again,

Yshua

Link to comment
Share on other sites

 

 

Can you please explain why thread safe version of php is needed?

because that is the version that works with apache. windows.php.net/download clearly states which is Thread Safe and  Non Thread Safe.

 

 

 

Am currently running MySQL 5.1.65, php-5.3.8-nts-Win32-VC9-x86 along with same php src.

The non thread safe version (the one you have downloaded/installed) is for IIS, this could be why you keep getting the error message. And why the PHP src? That is only needed if you want to compile your own version, or extensions

 

 

 

Used the .msi installer, but was unsure how to combine the source code with rest of installed php code.

Uninstall PHP and do not use the installer it is not needed at all.

 

 

 

Following your advice, found php5apache2_4.dll from apachelounge.com, from subset php version 4.3, in case php version 4.25 needs to be installed instead of current php5.3.8.

?? PHP4 is outdated. You should be using atleast PHP5.3 minimum.

 

 

 

Noting the \\'s in last emsg, switched coded \'s to /'s in php load module statement, and emsg is now as follows:

It doesn't matter if you use \\ or / in your file paths. I always use / in my file paths.

 

 

Right lets start from the beginning. Uninstall Apache/PHP completely and delete any fils/folders leftover files from this process.

 

Download a version of PHP5.x from windows.php.net/, making sure to chose the package that is labelled Thread Safe and is in zip format (stay clear of the installer). Take a mental note of the compile version you have downloaded (whether its VC9 or VC11)

Once downloaded extract its contents to C:/php.

Next head over to Apachelounge.com/download/. On the left, click of the VC version of PHP you just downloaded, now download the .zip file for Apache2.4.7. Once downloaded extract its contents to C:/apache

 

Now open a command prompt with Administrative Privileges and run the following command

C:/apache/bin/httdpd.exe -k install

Now open windows exploder and navigate to C:/apache/bin/ApacheMonitor.exe and run it. (You might want to create a shortcut to the desktop for this as it a useful tool for controlling Apache). And click the Start button. This should load Apache with its default config state and should be running when you goto http://localhost.

 

Now to configure it with PHP. Open the httpd.conf and add the following at the bottom of the file

PHPIniDir "C:/PHP/"
LoadModsule php5_module "C:/PHP/php5apache2_4.dll"
AddType application/x-httpd-php .php

Save the http.conf. Now using ApacheMonitor, click Restart and hopefully apache should now of loaded with PHP. You should be able to confirm this by creating a info.php file in C:/apache/htdocs, and then add the following code to it  <?php phpinof(); ?>   and then running http://localhost/info.php. You should see a page generated about PHP's configuration state and operating environment.

 

A step I recommend you to take would be to add PHP to the Windows PATH Environment Variable. You do this by going to 

Start -> All Apps -> Control panel -> System -> Advanced System Settings -> Advanced -> Environment variables.

On the window that pops up, select the Path from the System Variables list. Click Edit followed by pressing the End key on your keyboard. Now type C:\php;  Click Ok to all windows, and then restart windows.

 

Next rename C:/php/php.ini-recommended to C:/php/php.ini, and configure it use whatever extensions you require. Restart Apache after you have made any changes.

Edited by Ch0cu3r
Link to comment
Share on other sites

Dear Ch0cu3r:

 

       New emsg:

 

C:\Apache24\bin>httpd.exe -k install

Installing the Apache2.4 service

The Apache2.4 service is succussfully installed.

Testing httpd.conf....

Errors reported here must be corrected before the service can be started.

 

All else, mission accomplished,

Yshua

 

Link to comment
Share on other sites

Dear Ch0cu3r:

 

OK, time to confess again.... Put the pc back to factory settings to make sure of a "clean" start. Had everything back and running as of now, 2 hours later.

 

However, this of course got rid of the Visual Server 2012 R2, in whatever former state. In the melee of restarting apps, remembered the Apache 2.4.7 may have been from Apache.org as well! So, am now uninstalling Apache with "httpd -k uninstall." Will once again repeat my attempt to download VS 2012 R2, then reinstall proper Apache2.4.7. Will let you know what happens.

 

Thanks very much,

Yshua

Link to comment
Share on other sites

Dear Ch0cu3r:

 

Here is the update: Am unsure whether the Visual Server 2012 /R2 needs to be installed yet. Tried to find out how without success yet. At any rate, whether the "ssl" or regular Apache 2.4.7 from Apachelounge.com is used, am unable to get, "It works." Do you need more info from me?

 

Sincerely,

Yshua

Link to comment
Share on other sites

the Visual Server has nothing to do with apache/php.

 

you need to slow way down and start with what operating system you are going to be doing this on and how many concurrent users you are going to support (the non-server and non-pro versions of MS operating systems limit the number of concurrent tcp/ip connections.). if you are using higher than winXP, you should be using the latest of everything, which would be the VC11 versions of apache and php along with the VC11 version of the Visual C++ Redistributable package (which as mentioned in the reply in your other thread, is free.)

Link to comment
Share on other sites

Dear mac_gyver:

 

         Am using Windows 8/8.1.  Am currently downloading Redistributable C++ files for Visual Server 2012. Will likely only have about five users at a time on one server.  But will be employing MySQL 5.1 at this time as well.  These are the 2012 applications run...:

 

wdexpress_full application

VS2012_WebExp_enu disk image file

VS2012_WDX_ENU disk image file

VS2012.4 application

vs_ultimate_download application

vs_ultimate application

vs_professional application

vns_full application

TypeScriptSetup.0.9.5 HTM file

TypeScriptSetup.0.9.5 application

PowerPivot_for_Excel_x86 Windows Installer

patch_KB2781514 update

vs_professional_download application

 

Hope these are sufficient,

Yshua

Link to comment
Share on other sites

that list of applications has nothing to do with apache/php, the subject of the recent threads you have started on this forum. are you sure you even need apache/php and if you do, you need to stick to one subject and one problem at a time when asking for help in a forum.

Edited by mac_gyver
Link to comment
Share on other sites

  • Solution

Dear mac_gyver and Ch0cu3r:

 

 

 

OK, will comply 100%, even for dumping the package (compiler) my programs are written in!!!! Now installed MySQL 5.5.36, latest reliable offered on MySQL site, along with the latest V11 Apache 2.4.7 and PHP5.5.9 VC11. MySQL and Apache are fine with all the above mentioned 2012 R2 30 day trial version packages above uninstalled and only vcredist_x64.exe and vcredist_x86.exe of Microsoft Visual C++ 2012 Redistributable files installed. Here some other files from those redistributable ones might need installing as well. do you think??

 

 

 

At any rate, Apache returns "It Works!" but when the php5apache2_4.dll logic is included, "Waiting for localhost," goes on on the websbrowser tab indefinitely.... Would more Visual C++ Redistributable package files downloaded do the trick?

 

Ready for the bare truth,

Yshua

Link to comment
Share on other sites

Dear mac_gyver and Ch0cu3r:

 

 

 

OK, will comply 100%, even for dumping the package (compiler) my programs are written in!!!! Now installed MySQL 5.5.36, latest reliable offered on MySQL site, along with the latest V11 Apache 2.4.7 and PHP5.5.9 VC11. MySQL and Apache are fine with all the above mentioned 2012 R2 30 day trial version packages above uninstalled and only vcredist_x64.exe and vcredist_x86.exe of Microsoft Visual C++ 2012 Redistributable files installed. Here some other files from those redistributable ones might need installing as well. do you think??

 

 

 

At any rate, Apache returns "It Works!" but when the php5apache2_4.dll logic is included, "Waiting for localhost," goes on on the websbrowser tab indefinitely.... Would more Visual C++ Redistributable package files downloaded do the trick?

 

Ready for the bare truth,

Yshua

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.