p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Beginning PHP (http://p2p.wrox.com/forumdisplay.php?f=95)
-   -   PHP 5.0.4 configure problem (http://p2p.wrox.com/showthread.php?t=32213)

mjjanis August 5th, 2005 05:21 PM

PHP 5.0.4 configure problem
I'm trying to configure php 5.0.4 and having problems. I've listed what I have done during the config process.

tar -xvzf php-5.0.4.tar.gz
httpd -l
Compiled in modules:
Ran rpm -q on the following:

Run ./configure --with-mysql --with-apxs2 in the php-5.0.4 directory as root and I get the following messages:

checking for AOLserver support... no
checking for Apache 1.x module support via DSO through APXS... no
checking for Apache 1.x module support... no
checking for mod_charset compatibility option... no
checking for Apache 2.0 filter-module support via DSO through APXS... no
checking for Apache 2.0 handler-module support via DSO through APXS...

Sorry, I cannot run apxs. Possible reasons follow:

1. Perl is not installed
2. apxs was not found. Try to pass the path using --with-apxs2=/path/to/apxs
3. Apache was not built using --enable-so (the apxs usage page is displayed)

Any help is welcome. Thanks.


mjjanis August 9th, 2005 01:39 PM

I had to do some digging to find out why ./configure --with-mysql --with-apxs2 stopped with the error.

What I had to do to resolve it: Install the httpd-devel rpm.
Note: this requires the apr-util-devel.rpm and apr-devel.rpm packages be pre-installed.

Got past the initial problem, but encountered another in the MySQL section.

I had to install the mysql-devel rpm.

The ./configure --with-mysql --with-apxs2 finally completed.
I was able to run make & make install for php 5.0.4.

One querk I ran into:

I modified the /etc/httpd/conf/httpd.conf file by adding the lines
 LoadModule php5_module /usr/lib/httpd/modules/libphp5.so
 AddType application/x-httpd-php .php

I tested Apache with http://localhost in a browser
- so far so good
I tested (as a .htm) with:
  <html><head><title>Web Page</title></head>
  <body>The text here displays in my browser window</body></html>
- that worked
Next I tested (as a .php):
  echo "Hey it worked";
-- but it didn't work!
I re-checked the settings in the httpd.conf file, restarted httpd ...

... here's the quirk
I found the file /etc/httpd/conf.d/php.conf had the line:
  LoadModule php4_module modules/libphp4.so
  - so I commented the line and added the following line:
  LoadModule php5_module /usr/lib/httpd/modules/libphp5.so

I restarted httpd and the .php code works! I have tested and retested by alternating the LoadModule lines in the /etc/httpd/conf.d/php.conf file.


All times are GMT -4. The time now is 04:43 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.