Error loading PHP module in Apache 2

aschaef
aschaef used Ask the Experts™
on
I have compiled and installed both the newest versions of Apache and PHP with support for modules so I can use PHP with Apache.  When I try to start the Apache server I get an error which reads.

Syntax error on line 230 of /usr/local/apache2/conf/httpd.conf:
Cannot load /usr/local/apache2/modules/libphp4.so into server: /usr/local/apache2/modules/libphp4.so: undefined symbol: __dn_expand

I have no idea why it is doing this.  Please, any help would be much appreciated.  Thank you.

Andrew
 
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
PHP4 Apache2 Module is still in the experimental stage and is not included with standard distribution (seems to be in the experimental directory with recent release).

Structure of Apache's Calls to modules have been changed in Version 2 so you may not be able to use the standard modules. Try using the experimental module from PHP and hope it works fine on your system.

Author

Commented:
How can I use the experimental module?  Is it included in the PHP 4.3 release.  I am looking for a beta of PHP but don't see anything.  Can you please give me more detailed instructions on how to use the experimental module.  Thanks.
Which platform are you using? Try the following:

Try using PHP&Apache2 right with CVS version from http://snaps.php.net

checkout
http://bugs.php.net/bug.php?id=18129

Windows:

You need to use the Apache filter from the php/experimental directory rather than the php4apache.dll.  It's apache2filter.dll. Can't use the php4apache.dll

Place this filter in your php/sapi directory and point LoadModule to it.

Your apache httpd.conf should have this, then:

LoadModule php4_module "C:/php/sapi/apache2filter.dll"
AddType application/x-httpd-php .php .phtml
AddType application/x-httpd-php-source .phps

JavaScript Best Practices

Save hours in development time and avoid common mistakes by learning the best practices to use for JavaScript.

Author

Commented:
I'm using RedHat 8.0
Here is something from the news groups you may be interested.

FACT:
1) Apache 2.0.35 does not work with PHP 4.2.0RC3 or less
2) Apache2 is GA release (it means almost stable I guess), but
    PHP's Apache2 support is EXPERIMENTAL. Do not complain even
    if it does not work well or at all.
3) You must use "--with-apxs2" to build with Apache2.
4) You must read ./confiugre --help and sapi/apache2filter/README.


If you see "Apahce2 does not compile with PHP 4.1.2/4.2.0RC2"
like post, please let them know, they are suppose to search archive.

BTW, Apache2 support may not available in PHP 4.2.0 release. Since
too many people will not read RELEASE notes and will not notice
Apache2filter SAPI is *EXPERIMENTAL*

Author

Commented:
Thanks, I was able to use PHP 4.3.0RC4 and it worked just fine.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial