Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > Beginning PHP
| Search | Today's Posts | Mark Forums Read
Beginning PHP Beginning-level PHP discussions. More advanced coders should post to the Pro PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning PHP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old August 5th, 2005, 05:21 PM
Registered User
 
Join Date: Jul 2005
Location: Garfield Heights, Ohio, USA.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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:
  core.c
  prefork.c
  http_core.c
  mod_so.c
Ran rpm -q on the following:
zlib-1.2.0.7-2
libpng-1.2.2-17
libjpeg-6b-29
gd-2.0.15-1
gd-devel-2.0.15-1
httpd-2.0.47-10
perl-5.8.1-92

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.





MJJ
  #2 (permalink)  
Old August 9th, 2005, 01:39 PM
Registered User
 
Join Date: Jul 2005
Location: Garfield Heights, Ohio, USA.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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):
  <?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.


MJJ


Similar Threads
Thread Thread Starter Forum Replies Last Post
Configure PHP/Apache nalla Beginning PHP 2 August 9th, 2007 06:53 AM
configure gauravchhabra9111 JSP Basics 0 January 19th, 2005 07:48 AM
how we configure tomcat? vipul Apache Tomcat 1 February 24th, 2004 09:27 AM
oracle management server configure problem mateenmohd Oracle 1 October 13th, 2003 05:11 PM





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