Click to See Complete Forum and Search --> : Apache 2.2.2 php 5.1.4


Wisest Guy
05-16-2006, 02:32 PM
I am setting up a server and am using Apche 2.2.2 and php 5.1.4 and I cannot get them to work together.
Can someone help me?

NogDog
05-16-2006, 03:04 PM
What OS/platform?

rbyt3
05-16-2006, 10:36 PM
what is the problem?

rbyt3
05-16-2006, 10:41 PM
what is the problem?
i mean what error did you get?

Wisest Guy
05-17-2006, 02:22 PM
I forgot to say it's Windows.
The error is that is says it can't load the dll:
LoadModule php5_module "C:/PHP/php5apache2.dll"

chazzy
05-17-2006, 03:25 PM
and have you verified that the dll is there?

Wisest Guy
05-18-2006, 02:29 PM
Of course, PHP is uzipped in the PHP folder and php5apche2.dll is there.

chazzy
05-18-2006, 02:47 PM
now i remember what the problem is.

go here
http://www.apachelounge.com/
read the info in the article:
PHP 5.1.4 Apache 2.2 handler released

Wisest Guy
05-19-2006, 02:27 PM
I downloaded and unzipped the file but I don't know how to do the last step.
What do I do?
Or can someone who has gotten it to work give me the updated files?

chazzy
05-19-2006, 02:58 PM
it requires .net 2.0 framework, you download it from here
http://www.microsoft.com/downloads/details.aspx?familyid=32BC1BEE-A3F9-4C13-9C99-220B62A191EE&displaylang=en
and just install it. then restart apache and it should work.

or is it a different last step?

Wisest Guy
05-22-2006, 02:24 PM
Can somebody send me a zip containing only the updated files?
Or does the install path matter?

chazzy
05-22-2006, 02:27 PM
updated file for what? the problem is that the apache dll that they provide is incorrect, the steps i sent you fix it.

i'm not sure why or how you're having so many problems, i did the install on my machine it took me an extra 5 minutes to get it done.

Wisest Guy
05-22-2006, 02:31 PM
The file(s) that changed when you did the last step.

chazzy
05-22-2006, 02:40 PM
which last step?

in your httpd.conf you need to load the module, like this

# 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"

where c:/php is the path your php directory.

as for the changed files by .net, i can't give you those. why don't you just run the patch that gives you?

Wisest Guy
05-23-2006, 02:28 PM
The last step in the read me first text file.
As for just running the patch myself, how big would a zip file containing the updated files be compared to a 22.4 MB file.

ChiefNX
05-24-2006, 10:51 AM
I've been trying to get this to work as well.

My Apache Server (2.2.2) is working but it won't read php files. I have installed php5 (5.1.4) and used the configuration settings in the 'install' readme. I have also installed the handler that you mentioned from apachelounge and already have the microsoft .NET framework.

I get no error messages and as far as I can work out, it ought to read php files, but it doesn't.

Any ideas?

chazzy
05-24-2006, 11:44 AM
what do these error messsages say?

ChiefNX
05-25-2006, 02:27 AM
No, as I said, I don't get any error messages - just ran the 'test configuration' utility and Apache is working fine apart from the fact that it wont read php.

chazzy
05-25-2006, 05:50 AM
show me the section of your httpd.conf that relates to php.

ChiefNX
05-25-2006, 06:36 AM
It's alright, I've managed to get it working now (this is one of the main reasons I hate posting my bugs on forums).

Thanks for your time.

LeeU
05-25-2006, 08:41 AM
In the future, just for the record, I found a great place to download a package that will handle it all. It's called XAMPP (http://www.apachefriends.org/en/index.html). They have a package for Windows, Linux, Mac, and Solaris SPARC. The package includes Apache, MySQL, PHP and Perl.

I also was having problems getting the Apache/PHP to work together, installed as separate packages. Then I download the XAMPP package and was up and running in ten minutes.

It's also FREE.

ChiefNX
05-25-2006, 09:14 AM
And you don't need to configure manually?

That's great! You should make it into a sticky topic - a lot of people would find that really useful.

LeeU
05-25-2006, 09:29 AM
Great idea. I am testing it now and will write a review for WebReference.com when I'm finished. I'll also add it to the stickies when I'm finished testing.

rcroxyosox
05-30-2006, 02:24 AM
Chazzy,

I am having the same trouble as wisest guy. When you say to add the module -

# 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"

can this be placed anywhere on the conf file? Please advise. I have been trying for weeks to get this going. Thank you.

ChiefNX
05-30-2006, 02:32 AM
Put them where the other modules are loaded. That's at about line 70, anyway, you can't miss them because there's so many.

It should say something like this above them:

# Example:
# LoadModule foo_module modules/mod_foo.so

bokeh
05-30-2006, 03:33 AM
# LoadModule foo_module modules/mod_foo.soI've never heard of mod_foo and I can't find it at http://apache.org/ ! What does it do?

chazzy
05-30-2006, 06:26 AM
Chazzy,

I am having the same trouble as wisest guy. When you say to add the module -

# 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"

can this be placed anywhere on the conf file? Please advise. I have been trying for weeks to get this going. Thank you.

if you're having the same issue, you need the same solution. the main issue is that the php4/5 for apache 2.2.x is incorrect and needs to be updated. you need to follow the directions in the link i sent.

location doesn't matter, but make sure it's in the same order.

as for using XAMPP, I wouldn't recommend it. we just installed it on a linux server at work, and it seems to override a lot of the individual tasks that we might want to do. it also corrupted the RPM database - have to reimage the box now.

ChiefNX
05-30-2006, 08:40 AM
I've never heard of mod_foo and I can't find it at http://apache.org/ ! What does it do?

Yeah, you kind of missed the point...I probably didn't explain well enough.

Location does not matter, but I think it's useful to have it where all the other modules are loaded.

Like Chazzy said, go to http://www.apachelounge.com/download/ and download 'apache2handler php5apache2.dll for Apache 2.2.x and PHP 5.1.x'

It's about half way down the page.

chazzy
05-30-2006, 11:44 AM
Like Chazzy said, go to http://www.apachelounge.com/download/ and download 'apache2handler php5apache2.dll for Apache 2.2.x and PHP 5.1.x'

It's about half way down the page.

and the key point here is that it works. the person who started this topic would rather come on here asking for someone to send him the changed files rather than just download the .NET framework piece needed.

secure_alex
06-10-2006, 09:20 AM
Thanks for all the supports of guys here and over the net. I tried the hacks here, but it seems Apache 2.2.2 and Php 5.1.4 still can't work together, not them self, but my blog server Drupal can't work on these pair. So I have to restore my environment back to Apache 2.0 and php 5.0.

Besides, I don't know why I still can't make wordpress running on either above environment. Apache tells exception that some memory is read only when I'm trying to configure Wordpress with its script, I suspect that's a problem when Wordpress calls some functions of Php it causes exception thown by Apache. That's really awful, why these popular application don't test their integrations a little more before their release ! Are they really mature enough for critical application? I really suspect that.