logo
Apache Lounge
Webmasters

 


About

Forum Index Downloads Search Register Log in  RSS Apache Lounge
 



Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Apache Lounge is not sponsored.

Your donations will help to keep this site alive and well, and continuing building binaries.



Apache 2.2.2 and PHP 5.0.5
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Apache Forum Index -> Other Software



View previous topic :: View next topic  
Author Message
Ariake



Joined: 05 May 2006
Posts: 6
Location: Milwaukie, Oregon

PostPosted: Fri 05 May '06 14:31    Post subject: Apache 2.2.2 and PHP 5.0.5 Reply with quote

I am using the 5.0.5 binary from php.net. I have added the appropriate code to the httpd.conf as follows:

Code:
# For PHP 5 do something like this:
LoadModule php5_module "c:/php/php5apache2.dll"
AddType application/x-httpd-php.php

# configure the path to php.ini
PHPIniDir "C:/php"


Yet I still get the:
Quote:
Cannot load C:/PHP/php5apache2.dll into server: The specified module could not be found.
And, of course, it gave me the appropriate line number the error occurred on. I've tried changing the directory and saving copies of the file in the "modules" and "system32" folders along with changing the location the module is pointed to in the httpd.conf to no avail.

I'm currently running Apache 2.2.2 with PHP 5.0.5 and MySQL 4.1.19 on Windows XP Professional SP2. I'm running these versions to mimic the server my actual website is on, so I'm not going to upgrade, as I need these versions for now to develop on.

I've also read some of the other posts, the ones I could reasonably find, and found no helpful information regarding this specific issue.

Any help is greatly appreciated.
Back to top
Steffen
Moderator


Joined: 15 Oct 2005
Posts: 2581
Location: Hilversum, NL, EU

PostPosted: Fri 05 May '06 14:38    Post subject: Reply with quote

Did you tried the php5apache2.dll from here ?

Steffen
Back to top
Ariake



Joined: 05 May 2006
Posts: 6
Location: Milwaukie, Oregon

PostPosted: Fri 05 May '06 14:40    Post subject: Reply with quote

WIll it work with the php.net 5.0.5 version of the program? And where is the file at?
Back to top
Steffen
Moderator


Joined: 15 Oct 2005
Posts: 2581
Location: Hilversum, NL, EU

PostPosted: Fri 05 May '06 14:44    Post subject: Reply with quote

Smile

At www.apachelounge.com/download the file php5apache2.dll-php5.1.x.zip


Steffen


Last edited by Steffen on Fri 05 May '06 14:46; edited 1 time in total
Back to top
Ariake



Joined: 05 May 2006
Posts: 6
Location: Milwaukie, Oregon

PostPosted: Fri 05 May '06 14:45    Post subject: Reply with quote

Steffen wrote:
Smile

At www.apachelounge.com/download the file php5apache2.dll-php5.1.x.zip

Okay, I found it, but the readme says to only use with the 5.1.x version of PHP. I am using 5.0.5. Should I try it anyway?
Back to top
Steffen
Moderator


Joined: 15 Oct 2005
Posts: 2581
Location: Hilversum, NL, EU

PostPosted: Fri 05 May '06 14:46    Post subject: Reply with quote

Did not tested with 5.0.x , but it should work.


Steffen
Back to top
Ariake



Joined: 05 May 2006
Posts: 6
Location: Milwaukie, Oregon

PostPosted: Fri 05 May '06 14:48    Post subject: Reply with quote

Well, I tried it and got a slightly different error message. This time it says "The specified procedure could not be found."
Back to top
Steffen
Moderator


Joined: 15 Oct 2005
Posts: 2581
Location: Hilversum, NL, EU

PostPosted: Fri 05 May '06 14:56    Post subject: Reply with quote

Is that the complete error message ?

Any more info ?

I cannot build against 5.0x , the sources are not available anymore at php.net.


Steffen
Back to top
Ariake



Joined: 05 May 2006
Posts: 6
Location: Milwaukie, Oregon

PostPosted: Fri 05 May '06 14:59    Post subject: Reply with quote

I was only stating the difference in the error messages. Here is the error message in full:

Quote:
httpd.exe: Syntax error on line 487 of C:/Program Files/Apache Software Foundation/Apache2.2/conf/httpd.conf: Cannot load C:/PHP/php5apache2.dll into server: The specified procedure could not be found.
Note the errors or messages above, and press the <ESC> key to exit. 30...


EDIT:
And here is the link to the sources for 5.0.5: http://www.php.net/get/php-5.0.5.tar.gz/from/a/mirror & http://www.php.net/get/php-5.0.5.tar.bz2/from/a/mirror
Back to top
Steffen
Moderator


Joined: 15 Oct 2005
Posts: 2581
Location: Hilversum, NL, EU

PostPosted: Fri 05 May '06 15:20    Post subject: Reply with quote

Above you said:

Ariake wrote:
I'm currently running Apache 2.2.2 with PHP 5.0.5 and MySQL 4.1.19 on Windows XP Professional SP2.


So it is running.


Steffen
Back to top
Ariake



Joined: 05 May 2006
Posts: 6
Location: Milwaukie, Oregon

PostPosted: Sat 06 May '06 0:38    Post subject: Reply with quote

No.

Apache runs when the php module is not invoked... meaning the statements are removed from the file. It serves pages and everything. When using the previous statement in the httpd.conf file, it gives the previously stated error.
Back to top
Steffen
Moderator


Joined: 15 Oct 2005
Posts: 2581
Location: Hilversum, NL, EU

PostPosted: Sat 06 May '06 15:51    Post subject: Reply with quote

Not sure it is a module issue or an issue in your config.

I build a handler against php 5.0.5

Please give it a try:

www.apachelounge.com/download/

and follow the instructions in the readme


Steffen
Back to top
Mr. E



Joined: 07 May 2006
Posts: 1

PostPosted: Mon 08 May '06 18:13    Post subject: Thank you Steffen! Reply with quote

I found this site while trying to fix the same problem as Ariake. Your fix worked great and I wanted to thank you for it.

Thank you again,

Mr. E
Back to top
arcteryx



Joined: 20 May 2006
Posts: 1

PostPosted: Sat 20 May '06 0:29    Post subject: Reply with quote

I have the exact same problem, though now I get the messege (when starting apache):

C:\Apache\bin\httpd.exe
This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem.


I did as you said in the reademe-file.
Quote:
- Copy php5apache2.dll to your php folder (eg. c:/php)

- Copy httpd.exe.manifest to apache2/bin

# Add to your httpd.conf

LoadModule php5_module "c:/php/php5apache2.dll"
AddType application/x-httpd-php .php

# configure the path to php.ini
PHPIniDir "C:/php"


Using Apache 2.2, PHP 5.1.4, Windows 2003 Server


Edit: Forgot to download and install the Visuall c++ thing, It runs perfect now!

yeahyeah, call me noob then :P


/Arc'
Back to top
Kelley



Joined: 21 May 2006
Posts: 3

PostPosted: Sun 21 May '06 7:25    Post subject: Having the same issue... Reply with quote

I followed the steps outlined above:

Quote:


- Copy php5apache2.dll to your php folder (eg. c:/php)

- Copy httpd.exe.manifest to apache2/bin

# Add to your httpd.conf

LoadModule php5_module "c:/php/php5apache2.dll"
AddType application/x-httpd-php .php

# configure the path to php.ini
PHPIniDir "C:/php"


And it still doesn't work. Similar to Ariake, It is specifically this line, that when included in the httpd conf file, causes the start-up to fail:

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

If I remove that line, I can make it work.

I'm running XP SP2, using PHP 5.1.2 and Apache 2.2.2. Any help would be greatly appreciated.
Back to top
pnllan



Joined: 05 Dec 2005
Posts: 221

PostPosted: Sun 21 May '06 9:10    Post subject: Reply with quote

.
Try installing the VC++ redistributable - past that - so that this topic CAN be closed - We will need to see your CONF file.
.
Back to top
Kelley



Joined: 21 May 2006
Posts: 3

PostPosted: Sun 21 May '06 9:25    Post subject: Might have it solved Reply with quote

I read this article http://www.sitepoint.com/article/php-amp-mysql-1-installation/2
and he pointed out that frequently this problem is caused by a mis-match of PHP to Apache versions.

I researched some more, and realised I had not correctly noted which version of PHP I was running (I had incorrectly noted in my last post I was running PHP 5.1.2, when, in fact, when I got IIS back up & running to double check, I was running 5.0.5). So I uninstalled Apache 2.2.2 and installed Apache 2.0.58. Then I added the lines to the httpd.conf file:

Quote:

# For PHP 5 do something like this:
LoadModule php5_module "c:/php/php5apache2.dll"
AddType application/x-httpd-php .php

# configure the path to php.ini
PHPIniDir "C:/php/"


And it worked like a champ.

It appears this whole issue with people getting the error of "cannot load php5apache2.dll" is an issue of mis-matched versions of Apache & PHP. Apparently PHP 5.0.5 will run with Apache 2.0.58, but not Apache 2.2.2 -- or at least that is what this experience has taught me.

Thanks for your help.
Back to top
Steffen
Moderator


Joined: 15 Oct 2005
Posts: 2581
Location: Hilversum, NL, EU

PostPosted: Sun 21 May '06 11:48    Post subject: Reply with quote

php 5.0.5 is running with 2.2.2 , reade above, you have to use :

Removed

Steffen
Back to top
grindlay



Joined: 25 May 2006
Posts: 2
Location: Edinburgh

PostPosted: Thu 25 May '06 13:34    Post subject: Apache 2.2.2 PHP 5.1.4 Reply with quote

I wanted to confirm that Apache 2.2.2 and PHP 5.1.4 have a compatibility problem on Windows (XP).
When Apache 2.2 tries to load php5apache2.dll, the error is:

"The Apache service named reported the following error:
>>> httpd.exe: Syntax error on line 487 of C:/Program Files/Apache Software Foundation/Apache2.2/conf/httpd.conf: Cannot load C:/php/php5apache2.dll into server: The specified module could not be found. "

Rolling back to Apache 2.0.58 fixed the problem.
Grindlay.

Admin note:
This topic is about php 5.0.5 with Apache 2.2.2 and not php 5.1.4.
Please stay on topic and make a new topic.
Back to top
Kelley



Joined: 21 May 2006
Posts: 3

PostPosted: Thu 25 May '06 17:14    Post subject: Reply with quote

I can't confirm any issues with Apache + PHP versions, but what I found to be true on my XP Pro system is that I finally got Apache 2.0.58 installed, with PHP 5.0.5, without having to do anything other than add the required calls in Apache's httpd.conf file.
Back to top


Post new topic   Reply to topic    Apache Forum Index -> Other Software Goto page 1, 2  Next
Page 1 of 2