logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


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

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Other Software View previous topic :: View next topic
Reply to topic   Topic: Having Problems with php 5.0.0 and Apache 2.2
Author
seb_f



Joined: 10 Aug 2006
Posts: 2

PostPosted: Thu 10 Aug '06 19:31    Post subject: Having Problems with php 5.0.0 and Apache 2.2 Reply with quote

Hi Guys,

I'm sure you've all heard this same problem over and over again, but I've read instructions on how to fix this over and over again and I've not been able to fix this problem. I've tried to install Apache 2.2 with PHP 5.0.0. Apache works fine by itself, but when I try to get PHP to work with it I get the following problems.

My PHP 5 problems break down into two different problems:

1) When I install PHP 5 with Apache 2.2 through the 'Apache Module' route (followed instructions from this site, numerous other sites and then through a installation guide in a PHP & MySQL book), I get the following error :

"Cannot load C:/php/php5apache2.dll into server"

I've tried downloading the php5apache2.dll zip file (from one of the forums saying to download Steffans zip file) I've also copied the dll into the apache root, the php root (over the original) and into my windows/system32 directories.

Any other ideas for this particular problem ?

2) When I install PHP 5 through the 'CGI Binary' route I receive a

"You are not authorized to view this page - HTTP Error 403 - Forbidden" error, I've tried changing the ScriptAlias, to not include the trailing slash

e.g ScriptAlias /php "C:/php/"

But still receive the same error, so thoughts on how to resolve this error would also be useful.

I've also tried different versions of PHP to try and get round these errors such as PHP 4.4.3 and PHP 5.1.4 and still have had no luck.

The version I'm trying to use at the moment is PHP 5.0.0 (following book guide). I don't know what else to try, I'm almost contemplating using ASP and IIS.....

Let me know if you need any more information e.t.c

Thanks in Advance for your help
Back to top
pnllan



Joined: 05 Dec 2005
Posts: 221

PostPosted: Thu 10 Aug '06 19:40    Post subject: Reply with quote

First, I know you are probably frustrated as hell, but please be patient.

Did you follow the Post in the 'How to' exactly? You cannot leave out even one step:

http://www.apachelounge.com/viewtopic.php?t=570

Also, it sounds like you might be 'mixing and matching' PHP versions. Also, it sounds like you need to do some clean-up as you now have files everywhere.
Back to top
seb_f



Joined: 10 Aug 2006
Posts: 2

PostPosted: Thu 10 Aug '06 20:46    Post subject: Reply with quote

Thanks for getting back to me so soon.

Yes I followed the post in the How to section exactly, including downloading and installing the Microsoft VC++ Redistributable and changing the extension_dir = "C:\php\ext"

Currently in my httpd.Conf file I have made the following changes:

ServerRoot "C:/Apache"
DocumentRoot "C:/Apache/htdocs"

ScriptAlias /cgi-bin/ "C:/Apache/cgi-bin/"
ScriptAlias /php "C:/php"

AddType application/x-httpd-php .php
Action application/x-httpd-php "/php/php-cgi.exe"

and in my php.ini file (located in C:\Windows) I have made the following changes:

doc_root = "C:\Apache\htdocs"

extension_dir = "C:\php\ext"

extension=php_mysql.dll
extension=php_mysqli.dll


I can't see anything obviously wrong, I hoped that I had made a simple mistake but the amount of times I've installed Apache/Mysql/PHP I can pretty much do it blindfolded now. I've even done complete cleanups each time (removing all files from all locations, even ones left by uninstall)

Any other ideas ?
Back to top
Steffen
Moderator


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

PostPosted: Thu 10 Aug '06 21:43    Post subject: Reply with quote

Agree with pnnlan, it is strongly advised no to run php as CGI.
seb_f wrote:
I've tried to install Apache 2.2 with PHP 5.0.0. Apache works fine by itself, but when I try to get PHP to work with it I get the following problems.

The php5apache2.dll at the download page is not working with 5.0.0, only for 5.1.x.


Steffen
Back to top


Reply to topic   Topic: Having Problems with php 5.0.0 and Apache 2.2 View previous topic :: View next topic
Post new topic   Forum Index -> Other Software