Re: Apache not finding PHP Module

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



No it's a valid problem and it's not clutter. Someone else might have a similar problem like this, and find the answer here.

Thans for taking the time to post the solution to your problem.

Kind Regards,

Keith

-----------------------------------------------------------------
Websites:
http://www.karsites.net
http://www.php-debuggers.net

All email addresses are challenge-response protected with
TMDA [http://tmda.net]
-----------------------------------------------------------------

On Wed, 7 Apr 2010, bluekid239@xxxxxxx wrote:

To: Lester Caine <lester@xxxxxxxxxxx>, php-install@xxxxxxxxxxxxx
From: bluekid239@xxxxxxx
Subject: Re:  Apache not finding PHP Module

OH! As it turns out, I looked at the manual install instructions more carefully and discovered that php5apache2_2.dll is not included in the non-thread-safe version, so instead of downloading
VC6x86 Non Thread Safe
I downloaded
VC6x86 Thread Safe

It compiles correctly now. Apparently you can't just copy and paste php5apache2_2.dll from the Thread Safe version into your Non Thread Safe version and expect it to work. It also appears that Apache 2.2.x does not like the Non Thread Safe version of PHP 5.3. Go figure.

So, in conclusion, this is what works for me:
Install the V6 THREAD SAFE version of PHP 5.3
add the following in the specified locations of httpd.conf, replacing %phpdir% with the directory to your installation of PHP:

#At the end of the LoadModule section----
Loadfile %phpdir%/php5ts.dll
LoadModule php5_module %phpdir%/php5apache2_2.dll
PHPIniDir %phpdir%

#Inside the <IfModule mod_mime.c>----
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

#At the end of the file:
AddHandler application/x-httpd-php .php
AddHandler application/x-httpd-php-source .phps

#If you want the handler to only handle files that END in .php, add this to the end:
<FilesMatch \.php$>
  SetHandler application/x-httpd-php
</FilesMatch>

I suppose that it might work if you appended all of this (in the order they appear in the list) to the end of the file, it might work as well, but it works for me now and I'm not going to mess it up. I apologize for cluttering the mailing-list, if you consider this clutter.

--------------------------------------------------
From: <bluekid239@xxxxxxx>
Sent: Wednesday, April 07, 2010 5:10 PM
To: "Lester Caine" <lester@xxxxxxxxxxx>; <php-install@xxxxxxxxxxxxx>
Subject: Re:  Apache not finding PHP Module

This is the full path to the PHP module (assuming that the flash drive is read as the F:/ drive):
F:/Apache/PHP/
I manually installed PHP in this directory. I'm going to reinstall PHP again, just to make sure I did everything right.
This is what I am downloading:
PHP 5.3 (5.3.2)
VC6 x86 Non Thread Safe (2010-Mar-04 20:11:06)
found at: <http://windows.php.net/downloads/releases/php-5.3.2-nts-Win32-VC6-x86.zip>

I am extracting it to F:/Apache/PHP/

--------------------------------------------------
From: "Lester Caine" <lester@xxxxxxxxxxx>
Sent: Wednesday, April 07, 2010 1:45 AM
To: <php-install@xxxxxxxxxxxxx>
Subject: Re:  Apache not finding PHP Module

Jonny Dahm wrote:
Hello! I've been working with HTML and PHP for a few weeks now.  For the
times leading up to now, I've been working at home on my Windows 7
computer and IIS. I had PHP up and running on my laptop perfectly fine,
but I wanted to work with PHP at school, too. I decided the best way to
do that is have the server on my flashdrive, and that Apache was the
best choice. I got it working and portable (amazingly), but when I
attempted to add a PHP handler, it wouldn't run. This is the error
message I get:

httpd.exe: Syntax error on line 500 of F:/Apache/conf/httpd.conf: Cannot
load F:/Apache/PHP/php5apache2_2.dll into server: The specified module
could not be found.

This is exactly what I added to httpd.conf:
# PHP 5
Loadfile "PHP/php5.dll"

# Load the module
LoadModule php5_module "PHP/php5apache2_2.dll"

# configure the path to php.ini
PHPIniDir "PHP/"

So where IS PHP?
The above settings do assume it is in F:/Apache/PHP, but obviously it is somewhere else - and I would guess F:/PHP if all you have done is installed using the defaults. So just need the F:/ adding ...

--
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php




[Index of Archives]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [Postgresql]     [PHP Books]     [PHP Databases]     [PHP SOAP]
  Powered by Linux