Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > Beginning PHP
Password Reminder
| FAQ | Members List | Calendar | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #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:
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.

Reply With Quote
  #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

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.

Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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

All times are GMT -4. The time now is 01:34 PM.

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