Jump to content


Photo

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


Best Answer yshua, 23 February 2014 - 02:27 PM

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 Go to the full post


  • Please log in to reply
23 replies to this topic

#1 yshua

yshua

    Advanced Member

  • Members
  • PipPipPip
  • 123 posts

Posted 11 February 2014 - 07:31 PM


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:

 

 



#2 mac_gyver

mac_gyver

    Advanced Member

  • Administrators
  • 2,543 posts

Posted 11 February 2014 - 07:47 PM

i'm willing to bet LoadModsule should be LoadModule


multi-purpose programming fool. well written source-code should be self-documenting. well written code should be self-troubleshooting. 


#3 yshua

yshua

    Advanced Member

  • Members
  • PipPipPip
  • 123 posts

Posted 11 February 2014 - 09:44 PM

Sorry, Y'all:

 

        My typo in transcribing!   Was LoadModule in actual code....

 

Yshua



#4 Ch0cu3r

Ch0cu3r

    Advanced Member

  • Moderators
  • 2,309 posts

Posted 12 February 2014 - 08:22 AM

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.

Spoiler

Edited by Ch0cu3r, 12 February 2014 - 08:24 AM.


#5 yshua

yshua

    Advanced Member

  • Members
  • PipPipPip
  • 123 posts

Posted 12 February 2014 - 08:23 PM

Dear Spoiler:

 

        Doubtless you put me right on the trail!  Hope to get back with you as I spend the needed time to fill myself in on this....

 

Thanks tremendously,

Yshua :-*



#6 yshua

yshua

    Advanced Member

  • Members
  • PipPipPip
  • 123 posts

Posted 19 February 2014 - 10:45 PM

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:



#7 mac_gyver

mac_gyver

    Advanced Member

  • Administrators
  • 2,543 posts

Posted 20 February 2014 - 04:28 AM

are you still getting a syntax error in the httpd.conf file? if so, it's possible you copy/pasted the line(s) into that file from somewhere and they actually have something like smart/curly-quotes, which is breaking the syntax. i would retype all the quotes to make sure they are simple/straight ' or "


multi-purpose programming fool. well written source-code should be self-documenting. well written code should be self-troubleshooting. 


#8 yshua

yshua

    Advanced Member

  • Members
  • PipPipPip
  • 123 posts

Posted 20 February 2014 - 07:33 AM

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



#9 Ch0cu3r

Ch0cu3r

    Advanced Member

  • Moderators
  • 2,309 posts

Posted 20 February 2014 - 08:28 AM

When using PHP with Apache make sure you are downloading the thread safe version of php from windows.php.net/

 

 

 

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

Which video is this?


Edited by Ch0cu3r, 20 February 2014 - 08:38 AM.


#10 yshua

yshua

    Advanced Member

  • Members
  • PipPipPip
  • 123 posts

Posted 20 February 2014 - 09:30 AM

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

#11 yshua

yshua

    Advanced Member

  • Members
  • PipPipPip
  • 123 posts

Posted 20 February 2014 - 09:36 AM

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

#12 yshua

yshua

    Advanced Member

  • Members
  • PipPipPip
  • 123 posts

Posted 20 February 2014 - 10:00 AM

Oops again!  Typo in emsg should have read:

 

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.
 



#13 Ch0cu3r

Ch0cu3r

    Advanced Member

  • Moderators
  • 2,309 posts

Posted 20 February 2014 - 11:14 AM

 

 

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, 20 February 2014 - 11:19 AM.


#14 yshua

yshua

    Advanced Member

  • Members
  • PipPipPip
  • 123 posts

Posted 20 February 2014 - 02:07 PM

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

 



#15 Ch0cu3r

Ch0cu3r

    Advanced Member

  • Moderators
  • 2,309 posts

Posted 20 February 2014 - 02:31 PM

The message means the Apache service is installed. That is not an error message. You need to continue with my instructions for configuring Apache with PHP.


Edited by Ch0cu3r, 20 February 2014 - 02:32 PM.


#16 yshua

yshua

    Advanced Member

  • Members
  • PipPipPip
  • 123 posts

Posted 20 February 2014 - 04:34 PM

All right. Will do.

#17 yshua

yshua

    Advanced Member

  • Members
  • PipPipPip
  • 123 posts

Posted 20 February 2014 - 06:04 PM

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

#18 yshua

yshua

    Advanced Member

  • Members
  • PipPipPip
  • 123 posts

Posted 21 February 2014 - 01:36 AM

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

#19 mac_gyver

mac_gyver

    Advanced Member

  • Administrators
  • 2,543 posts

Posted 21 February 2014 - 01:57 AM

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.)


multi-purpose programming fool. well written source-code should be self-documenting. well written code should be self-troubleshooting. 


#20 yshua

yshua

    Advanced Member

  • Members
  • PipPipPip
  • 123 posts

Posted 21 February 2014 - 09:14 AM

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






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Cheap Linux VPS from $5
SSD Storage, 30 day Guarantee
1 TB of BW, 100% Network Uptime

AlphaBit.com