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: Problems with PHP and Apache working together
Author
Josh09



Joined: 28 Jun 2006
Posts: 4
Location: Indiana

PostPosted: Wed 28 Jun '06 17:31    Post subject: Problems with PHP and Apache working together Reply with quote

Hello, and just to clear things up this site has helped me LOADS in installing Apache, PHP, and MySQL on my local machine for testing.

Now, I have Apache 2.2.2 and PHP 5.1.4 with all Windows updates (SP2) installed and here's the error message I'm getting:

Code:

c:\apache2\bin>httpd -k start
httpd: Syntax error on line 67 of C:/apache2/conf/httpd.conf: Cannot load C:/php514/php5apache2.dll into server: The specified module cannot be found.


Just to let you know, YES I have installed Microsoft's .NET framework, twice, to make sure I didn't miss anything. I have downloaded and installed Steffen's php5apache2.dll into my php514 directory. I've read around the forums, and have seen two posts with my problem. The first guy didn't type in a '/' in the path, and the other guy didn't have .NET installed. I have both. I have triple checked the paths, installed .NET twice, read numerous documents, and now I'm stuck.

Here's what I have in my httpd.conf file:
Code:
LoadModule php5_module "c:/php514/php5apache2.dll"
AddType application/x-httpd-php .php
AddType application/x-httpd-php .php-source .phps
# configure the path to php.ini
PHPIniDir "C:/WINDOWS/"

I'm in the process of reading Pips's manual on installing Apache 2.2.2, PHP 5.1.4, and MySQL 5.0.21, and I've done everything correct thus far.

Sorry for the long post, I hope I covered everything you need to help me out...if it's something simple that I'm overlooking...sorry lol Embarassed


Last edited by Josh09 on Wed 28 Jun '06 17:46; edited 1 time in total
Back to top
Steffen
Moderator


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

PostPosted: Wed 28 Jun '06 17:35    Post subject: Reply with quote

You are using the php5apache2.dll from here, should work when you follow the instructions in the .zip.

Maybe you have some leftovers from an earlier php install.

Steffen

ps.
Please use a meaningfull and specific subject, please change it.
Back to top
Josh09



Joined: 28 Jun 2006
Posts: 4
Location: Indiana

PostPosted: Wed 28 Jun '06 17:48    Post subject: Reply with quote

That's what I don't get about this at all, I have followed all of the instructions in the .PDF from Pips, and have followed the instructions from the readme included with your php5apache2.dll. I've uninstalled all PHP products, and installed a fresh install of php 5.1.4.

PHP 5.1.4 is all that I have now, and it's still giving me the same error.

Sorry about the title... Changed it. That ok?
Back to top
Organic Angel Alexiel



Joined: 28 Jun 2006
Posts: 6
Location: TechnoCore

PostPosted: Wed 28 Jun '06 21:49    Post subject: Reply with quote

having same problem, have .NET installed and running apache 2.2.2 on WinXP Pro. PHP 5.1.4 will not load for me. Have followed several walkthroughs on how to install it, but still nothing. Also, does it matter which version of .NET you have?
Back to top
Organic Angel Alexiel



Joined: 28 Jun 2006
Posts: 6
Location: TechnoCore

PostPosted: Wed 28 Jun '06 22:11    Post subject: Reply with quote

Organic Angel Alexiel wrote:
having same problem, have .NET installed and running apache 2.2.2 on WinXP Pro. PHP 5.1.4 will not load for me. Have followed several walkthroughs on how to install it, but still nothing. Also, does it matter which version of .NET you have?


hmm... found the problem. Very undocumneted.
just install www.microsoft.com/downloads/details.aspx?familyid=32BC1BEE-A3F9-4C13-9C99-220B62A191EE&displaylang=en

That Fixed the Problem for me.
Back to top
Josh09



Joined: 28 Jun 2006
Posts: 4
Location: Indiana

PostPosted: Wed 28 Jun '06 22:42    Post subject: Reply with quote

Yeah I have the Microsoft Visual C++ Redistributable Package (x86) downloaded and installed already. I also just installed Microsoft .NET Framework 2.0 and it's still telling me there's an error with the syntax, that the path specified isn't correct. Is it possible that there are certain read/write management rights on the DLL that I can' figure out how to change? I'll look into it, but I'm sure it's not the problem. Thanks for any help you can come up with...
Back to top
Steffen
Moderator


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

PostPosted: Thu 29 Jun '06 14:20    Post subject: Reply with quote

I never changed any file permissions. Standard windows grants read/write access.

Steffen
Back to top
pnllan



Joined: 05 Dec 2005
Posts: 221

PostPosted: Thu 29 Jun '06 18:25    Post subject: Reply with quote

Josh,

You may find this a pain, but I suggest using Pips PDF to reverse what you have done so far - EVERYTHING but MySQL - yes I mean Remove|Uninstall everything but MySQL.

I have not tested ASF MSI installation applications lately, but the last time I tested the MSI FAILED to remove to some things that can cause problems later on. BEFORE you UN-INSTALL the MSI file, open a command prompt and navigate to the BIN folder of Apache. Now, uninstall the service:

httpd -k uninstall

Now that the service is removed, uninstall Apache and remove ALL PHP entries (files that you copied from where ever to where ever). Leave the VC++ Redistributable and the .Net Framework.

Download : Removed

Unzip his ZIP file in a new folder called something like C:\Apache2. Then, read the file named Read Me First !!.txt. It will tell you how to setup the service for Apache. If you want or need ApacheMonitor you can create shortcuts however you like. Before installing ANYTHING else, ensure Apache will start. After you validate that Apache starts, stop it before proceding.

If you are still with me, now download PHP 5.1.4 from PHP.net you want this file: php-5.1.4-Win32.zip

Extract the contents of this file and move the contents to where you intend to use PHP. I noticed that you are using C:\PHP514...that's ok. Overwrite the php5apache2.dll with Steffen's version.

Add the folder that you put the PHP files into in the PATH ENVIRONMENT (System Properties | Advanced | Environment Variables | System variables | Path). Example:

Variable name: Path
Variable value: C:\php514;%SystemRoot%\system32;.....

DO NOT WORRY with coping files over to the Windows folders, the reason for this to begin with is because Windows folder is already in the Path. Since you have added the PHP folder to the Path you do not need to copy or move files to the Windows folder. This will make upgrading PHP simpler as well and allows you to keep PHP all together.

Finally, this should be the last step, edit the Apache CONF file with:

LoadModule php5_module "c:/php514/php5apache2.dll"
AddType application/x-httpd-php .php
AddType application/x-httpd-php .php-source .phps
# configure the path to php.ini
PHPIniDir "c:/php514"

If you left VC++ Redistr installed and followed Steffen's readMe's, everything should be fine. This is how I put together WAMP, and I do it often (web application tester). I hoped this helped.
..
.
Back to top
Josh09



Joined: 28 Jun 2006
Posts: 4
Location: Indiana

PostPosted: Thu 29 Jun '06 20:49    Post subject: Reply with quote

I think that's what it was, I created a new path in environment variables instead of editing the old one with the name "Path." Once I did that, it worked Smile Thank you so much pnllan!!! I appreciate it. Thanks for the new php5apache2.dll Steffen, I love the site!

-Josh
Back to top
pnllan



Joined: 05 Dec 2005
Posts: 221

PostPosted: Thu 29 Jun '06 20:56    Post subject: Reply with quote

Josh,

Glad to help out.
.
..
Back to top
Steffen
Moderator


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

PostPosted: Thu 29 Jun '06 22:15    Post subject: Reply with quote

All the thanks to pnllan for the very good guide above. Maybe you can place it too in the forum How-to's & Documentation & Tips .


Steffen
Back to top
N-GAGE



Joined: 29 Jun 2006
Posts: 10

PostPosted: Thu 29 Jun '06 22:58    Post subject: Reply with quote

Steffen ... I have the same problem with the module .. where can i find the zip and solve the problem Confused?



Steffen wrote:
You are using the php5apache2.dll from here, should work when you follow the instructions in the .zip.

Maybe you have some leftovers from an earlier php install.

Steffen

ps.
Please use a meaningfull and specific subject, please change it.
Back to top
Steffen
Moderator


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

PostPosted: Thu 29 Jun '06 23:01    Post subject: Reply with quote

At www.apachelounge.com/download

Steffen
Back to top
N-GAGE



Joined: 29 Jun 2006
Posts: 10

PostPosted: Fri 30 Jun '06 12:18    Post subject: Reply with quote

Thank you Steffen for your help

Steffen wrote:
At www.apachelounge.com/download

Steffen
Back to top


Reply to topic   Topic: Problems with PHP and Apache working together View previous topic :: View next topic
Post new topic   Forum Index -> Other Software