DeveloperSide.NET Forums
December 09, 2018, 11:35:44 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1] 2
  Print  
Author Topic: Apache 2.2 w/ PHP 5.1 or 4.4 -- Cannot load php5apache2.dll  (Read 68956 times)
0 Members and 1 Guest are viewing this topic.
admin
Administrator
Master of All Subjects
*****
Posts: 3272


View Profile WWW Email
« on: May 29, 2006, 08:11:53 PM »

For PHP 5.1...
Quote

httpd.exe: Syntax error on line # of .../conf/httpd.conf: Cannot load
.../php5apache2.dll into server: Cannot find the module.


For PHP 4.4
Quote

httpd.exe: Syntax error on line # of .../conf/httpd.conf: Cannot load
.../php4apache2.dll into server: Cannot find the module.


The official releases of PHP 5.1 and 4.4 are built/compiled against the Apache 2.0 codebase, not Apache 2.2 -- and this is the problem...

http://www.apache.org/dist/httpd/Announcement2.2.html
Quote

This release has been through extensive testing, including live at some of the world's busiest sites, and is now considered stable. This means that modules and applications developed for Apache 2.2.2 will be both source- and binary-compatible with future 2.2.x releases. This release builds on and extends the Apache 2.0 API. Modules written for Apache 2.0 will need to be recompiled in order to run with Apache 2.2, but no substantial reworking should be necessary.


There are three ways around this problem for PHP 5.1...

1) Build PHP 5.1.x yourself against Apache 2.2 codebase.

http://www.php.net/manual/en/install.windows.building.php

2) Use PHP 5.2 (or 5.2-dev until 5.2 comes out) which includes php5apache2_2.dll...

Download php5.2-win32-latest.zip from http://snaps.php.net/
Use...
Code:
LoadModule php5_module .../php5/php5apache2_2.dll


3) You can also just copy php5apache2_2.dll from snapshot PHP5.2 to your PHP5.1 directory -- instead of using the unreleased PHP5.2 canidate.

The only way around this problem for PHP 4.4 is to compile PHP 4.4 against Apache 2.2 yourself or to get someone to do it for you.

Update: DeveloperSide.NET now provides Apache 2.2 apache2handler DLLS for PHP 5.1 and PHP 4.4 -- read the post below and check the download page.
Logged

DeveloperSide.NET
Advanced PHP and MySQL Solutions for your Web Design and Development needs with Web.Developer Server Suite.
bohush
Member
*
Posts: 2


View Profile
« Reply #1 on: June 05, 2006, 04:02:36 PM »

Both ways are may be OK to use, but unfortunately you cannot use DBG debugger (unless you want to buil it too). We have to wait!
Logged
admin
Administrator
Master of All Subjects
*****
Posts: 3272


View Profile WWW Email
« Reply #2 on: June 06, 2006, 01:36:10 AM »

DBG debugger?
Logged

DeveloperSide.NET
Advanced PHP and MySQL Solutions for your Web Design and Development needs with Web.Developer Server Suite.
bohush
Member
*
Posts: 2


View Profile
« Reply #3 on: June 06, 2006, 12:28:49 PM »

DBG is standard debugger in PHPEclipse environment.
Logged
admin
Administrator
Master of All Subjects
*****
Posts: 3272


View Profile WWW Email
« Reply #4 on: August 14, 2006, 10:47:28 PM »

Here is somthing I have posted to http://www.php.net/manual/en/install.windows.apache2.php

Quote
The included 'apache2handler' dlls that ship with PHP v5.1 and PHP v4.4 -- 'php4apache2.dll' and 'php5apache2.dll' -- will not work with Apache 2.2.

The Apache2 handlers provided with the above versions of PHP have been compiled and linked against Apache 2.0 libs (libapr.lib, libaprutil.lib, libhttpd.lib) and header files (...\include) -- utilizing the Apache 2.0 API, which has changed under Apache 2.2.

The error displayed when a user starts Apache 2.2 with an apache2handler built for Apache 2.0 is...
"Cannot load ...php/php5apache2.dll [or php4apache2.dll] into server: The specified module could not be found."

A new Apache 2.2 handler will not be provided until the release of PHP 5.2. Nor will new Apache 2.2 handlers make it into PHP versions 5.1 or 4.4.

You can download the following apache2handlers that have been compiled [under the same compiler (VC++ 6.0) that official win32 php.net binaries are built with] and linked against Apache 2.2 libs and header files.

PHP 5.1 (php5apache2_2.dll) and PHP 4.4 (php4apache2_2.dll) Apache 2.2 handlers...

* http://www.devside.net/web/server/free/download
Logged

DeveloperSide.NET
Advanced PHP and MySQL Solutions for your Web Design and Development needs with Web.Developer Server Suite.
admin
Administrator
Master of All Subjects
*****
Posts: 3272


View Profile WWW Email
« Reply #5 on: August 15, 2006, 12:18:11 AM »

Well, that php.net manual note has already been deleted. Yet on the same page you have 3 notes -- one posted right after the other all within the same week -- linking back to the same exact site. None provide any useful information over the other posts and are just simple repeats.

The php.net manual provides the most inaccurate, outdated, and incomplete information on all things PHP. Have you ever tried to build PHP or install PHP using the manual? I have, and its one of the reasons I started DeveloperSide.NET.
Logged

DeveloperSide.NET
Advanced PHP and MySQL Solutions for your Web Design and Development needs with Web.Developer Server Suite.
Histtin
Member
*
Posts: 2


View Profile
« Reply #6 on: August 17, 2006, 12:48:40 AM »

I've got apache server 2.2 and php 5.1.  I moved the dll and lib (from developerSide.net) files into my php5 directory, and this is what I have my .conf file saying:

Code:
#---------------------
LoadFile "C:/Utilities/Apache Server 2.2/php5/php5ts.dll"
LoadModule php5_module "C:/Utilities/Apache Server 2.2/php5/php5apache2_2.dll"

<IfModule php5_module>

<Location />
PHPIniDir "C:/Utilities/Apache Server 2.2/php5/php.ini"

AddType text/html .php .phps
AddHandler application/x-httpd-php .php
AddHandler application/x-httpd-php-source .phps
</Location>

</IfModule>
#-------------------


My php5 directory is in the root apache server folder.  Also, with the Windows XP version of php5, i renamed the "php.ini-recommended" to just plain "php.ini".  When I go to start the Apache Server, here is the message I get:

Quote
Syntax error on line 126 of C:/Utilities/Apache Server 2.2/conf/httpd.conf: PHPINIDir not allowed here


I'm sure there's a quick fix for this... Please help.
Logged
admin
Administrator
Master of All Subjects
*****
Posts: 3272


View Profile WWW Email
« Reply #7 on: August 17, 2006, 03:10:42 AM »

Quote

#---------------------
LoadFile "C:/Utilities/Apache Server 2.2/php5/php5ts.dll"
LoadModule php5_module "C:/Utilities/Apache Server 2.2/php5/php5apache2_2.dll"

<IfModule php5_module>

   <Location />
      PHPIniDir "C:/Utilities/Apache Server 2.2/php5/php.ini"

      AddType text/html .php .phps
      AddHandler application/x-httpd-php .php
      AddHandler application/x-httpd-php-source .phps  
   </Location>

</IfModule>
#-------------------



Code:

#---------------------
LoadFile "C:/Utilities/Apache Server 2.2/php5/php5ts.dll"
LoadModule php5_module "C:/Utilities/Apache Server 2.2/php5/php5apache2_2.dll"

<IfModule php5_module>
PHPIniDir "C:/Utilities/Apache Server 2.2/php5"

   <Location />
      AddType text/html .php .phps
      AddHandler application/x-httpd-php .php
      AddHandler application/x-httpd-php-source .phps  
   </Location>

</IfModule>
#-------------------


Just as the error msg said, you need to place it outside of the Location block. Also, you specify the path to the directory and not to the actual php.ini file itself.
Logged

DeveloperSide.NET
Advanced PHP and MySQL Solutions for your Web Design and Development needs with Web.Developer Server Suite.
Histtin
Member
*
Posts: 2


View Profile
« Reply #8 on: August 17, 2006, 04:16:21 AM »

Thank you so much, the php works perfectly now.  I'd spent hours tweaking both the php.ini and server config.  Again, thanks.
Logged
neozeus
Member
*
Posts: 1


View Profile
« Reply #9 on: September 14, 2006, 01:28:08 PM »

Hi there,

Im using right now Apache 2.2 and PHP 5.2.x dev, but i cant make them work together. Ive used the code above, and the server is restarting properly, but nothing is displayed on the webbrowers("phpinfo"). The Apache log is returning such a massage:
File does not exist: D:/WWW/Apache2.2/Projects/Public_UPNP_gatedesc.xml

I would be very gratefull if you could help me out with this. Im a newbe with this stuff, so pls, trade me gentle :P (sorry for my english, if i wrote something wrong).
Logged

f you feel, you are yourself, then ask yourself, what does it means to be yoursefl. :)
admin
Administrator
Master of All Subjects
*****
Posts: 3272


View Profile WWW Email
« Reply #10 on: September 14, 2006, 01:52:17 PM »

Sounds like its all setup properly. Probably just a script or location issue. What is your webroot/documentroot? Have you configured php properly? Added php.ini and edited the proper fields?
Logged

DeveloperSide.NET
Advanced PHP and MySQL Solutions for your Web Design and Development needs with Web.Developer Server Suite.
howeijie
Member
*
Posts: 1


View Profile
« Reply #11 on: September 17, 2006, 04:33:15 AM »

I try to follow this method, but it seem doesn't work. I am new bie with this type softwares, because my lecturer require us to setup the thing.

Apache, PHP and Mysql.

Any Pro there can help me solve my problem or not ?
I need step by step guided example.


Thank you.
Logged
admin
Administrator
Master of All Subjects
*****
Posts: 3272


View Profile WWW Email
« Reply #12 on: September 17, 2006, 12:00:35 PM »

Download the needed php[4,5]apache2_2.dll handler here and follow the readme...
http://www.devside.net/server/downloads
Logged

DeveloperSide.NET
Advanced PHP and MySQL Solutions for your Web Design and Development needs with Web.Developer Server Suite.
kjmeath
Member
*
Posts: 8


View Profile Email
« Reply #13 on: May 16, 2007, 03:51:26 AM »

when using windows with apache 2.2 and php 5.2, does the php.ini file need to in the windows folder?
Logged
admin
Administrator
Master of All Subjects
*****
Posts: 3272


View Profile WWW Email
« Reply #14 on: May 16, 2007, 01:42:24 PM »

No, but its good to keep it there.
Logged

DeveloperSide.NET
Advanced PHP and MySQL Solutions for your Web Design and Development needs with Web.Developer Server Suite.
Pages: [1] 2
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.9 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!