xp apache2 php5 installation - dll error

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
User avatar
raghavan20
DevNet Resident
Posts: 1451
Joined: Sat Jun 11, 2005 6:57 am
Location: London, UK
Contact:

xp apache2 php5 installation - dll error

Post by raghavan20 »

LoadModule php5_module c:/www/php/php5apache2.dll

when i add this line in the top of the modules list and try to run apache, it exactly reports error in this line. i have seen the dll file exists in this path. can you tell me why it is not be able to read this file and as a result php pages are not executed eventhough i have the AddType statement for .php files.

I have one more common doubt:
AddType application/x-httpd-php .php

I do not see any application directory in Apache root folder and what exactly is happening, is it like x-httpd-php gets the php file and forwards it to php5apache2.dll and the dll file executes it or can anybody explain the role of these two files?

Thanks to all
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Post by Weirdan »

application/x-httpd-php is a MIME type, not a file.
when i add this line in the top of the modules list and try to run apache, it exactly reports error in this line.
What is exact error message?
User avatar
raghavan20
DevNet Resident
Posts: 1451
Joined: Sat Jun 11, 2005 6:57 am
Location: London, UK
Contact:

Post by raghavan20 »

Weirdan wrote:application/x-httpd-php is a MIME type, not a file.
when i add this line in the top of the modules list and try to run apache, it exactly reports error in this line.
What is exact error message?

Code: Select all

C:\www\Apache\bin>httpd
httpd: Syntax error on line 69 of C:/www/Apache/conf/httpd.conf: Cannot load C:/
www/php/php5apache2.dll into server: The specified module could not be found.

C:\www\Apache\bin>

which points to the same line that tries to use the php5apache2.dll file
User avatar
raghavan20
DevNet Resident
Posts: 1451
Joined: Sat Jun 11, 2005 6:57 am
Location: London, UK
Contact:

Post by raghavan20 »

2. i have another doubt

Code: Select all

LoadModule php5_module c:/www/Apache/php5apache2.dll

LoadModule actions_module modules/mod_actions.so
LoadModule alias_module modules/mod_alias.so
LoadModule asis_module modules/mod_asis.so
LoadModule auth_basic_module modules/mod_auth_basic.so
#LoadModule auth_digest_module modules/mod_auth_digest.so
#LoadModule authn_anon_module modules/mod_authn_anon.so
#LoadModule authn_dbm_module modules/mod_authn_dbm.so
LoadModule authn_default_module modules/mod_authn_default.so
in these lines some of the modules use the files with extension .so; i thought .so is only for running in Linux if they are meant to run only in Linux how can Apache load these modules?

I have tried putting the php5apache2.dll everywhere with relative path changes in the httpd.conf but it does not seem to read the file. do any of you think that this php5apache2.dll requires someother file as dependency?
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

Afaik php5.1 does not support apache2.2 yet.. So make sure that you're using apache2.0...

Here are the relevant lines from my http.conf file (notice that c:/program files/php-5.1.6-Win32 is in my PATH variable)
LoadModule php5_module "C:/Program Files/php-5.1.6-Win32/php5apache2.dll"

PHPIniDir "C:/Program Files/php-5.1.6-Win32"

DirectoryIndex index.php index.html index.html.var

AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
User avatar
MarK (CZ)
Forum Contributor
Posts: 239
Joined: Tue Apr 13, 2004 12:51 am
Location: Prague (CZ) / Vienna (A)
Contact:

Post by MarK (CZ) »

I had exactly the same problem yesterday. To fix it, go to php snaps, download the latest stable zip, get the php5apache2_2.dll file and use that one instead. Move it to your php folder, update the httpd.conf:

Code: Select all

LoadModule php5_module php/php5apache2_2.dll
There ya go.
User avatar
raghavan20
DevNet Resident
Posts: 1451
Joined: Sat Jun 11, 2005 6:57 am
Location: London, UK
Contact:

Post by raghavan20 »

MarK (CZ) wrote:I had exactly the same problem yesterday. To fix it, go to php snaps, download the latest stable zip, get the php5apache2_2.dll file and use that one instead. Move it to your php folder, update the httpd.conf:

Code: Select all

LoadModule php5_module php/php5apache2_2.dll
There ya go.
excellent mark, that worked!
I cannot understand why then php.net has different version of php in download page without the dll file for the recent apache 2.2 :?
User avatar
MarK (CZ)
Forum Contributor
Posts: 239
Joined: Tue Apr 13, 2004 12:51 am
Location: Prague (CZ) / Vienna (A)
Contact:

Post by MarK (CZ) »

They're working on it, that's why it's just in the snaps zone. Should be included in the next offic. release I guess.

I more don't understand why my mysql ain't working :(
Post Reply