Jump to content

Recommended Posts

Here's what I've done:

 

I've installed apache and gotten the "It Works!" when I go to http://localhost

 

I've downloaded and unzipped PHP5 into c:/php

 

I copied C:/php/php5ts.dll into the System32 directory.

I copied C:/php/php5apache2.dll into the System32 directory.

I copied C:/php/libmysql.dll into the System32 directory.

I copied C:/php/ext/php_mysql.dll into the System32 directory.

I copied C:/php/php.ini-recommended into the WINDOWS directory, and changed it's name to php.ini

 

I added the following code to the bottom of my httpd.conf file:

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

AddType application/x-httpd-php .php

PHPIniDir "C:/Windows"

 

Saved the httpd.conf file.

Restarted the Apache service

 

Now the service won't start.  It gives the error:

 

The Apache service named  reported the following error:

>>> httpd.exe: Syntax error on line 489 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.

 

I know that the immediate thought might be that I moved that file to the system32 directory - but I did not.  I did copy and paste the files. 

 

I'm looking at the files right now; sitting in C:/php

 

Ok, another helpful bit of information is that I'm using a store bought book to do this for the first time and I can't get past the first chapter because I can't install it. 

 

OH!  And I'm using Windows Vista Ultimate Edition.

 

Please, if someone can help a lost beginner, I'd be very much appreciative!

 

Thank you,

TriZz

Link to comment
https://forums.phpfreaks.com/topic/39919-solved-php-and-apache-issue/
Share on other sites

What exact version of Apache are you using?

 

If you are using version 2.0.x then use the php5apache2.dll Apache module when loading the module. If its version 2.2.x then use php5apache2_2.dll instead. You must use the correct module for the version of Apache you have installed

 

Also don't move files that don't need to be moved. Only php5ts.dll, libmysql.dll and php.ini should be moved to the Windows folder -- unless you have added PHP to the PATH.

 

No other files need to be moved. All extensions should stay in the extension folder (C:/php/ext).

 

When enabling extensions in the php.ini make sure the extension_dir directive is set up to point to PHP's extension folder.

HAHA!  Excellent!  It was just changing the php5apache2.dll to php5apache2_2.dll!!

 

Thank you so much, I was working on that for hours last night and a bit this morning!

 

The reason I moved those specific files is because the book I'm reading said to do so.  It's explanation is such:

 

"This will ensure that the libraries necessary for PHP to work are where Windows can find them."

 

Again, I'm REALLY new to this, so I'm just going along with the book to try to learn.  What would be the negative effects of copying these files?

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.