LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-28-2006, 10:05 AM   #16
megaspaz
Senior Member
 
Registered: Nov 2002
Location: Silly Con Valley
Distribution: Red Hat 7.3, Red Hat 9.0
Posts: 2,054

Rep: Reputation: 46

Quote:
I don't know if it's a compatability issue with php and apache 2.2.0 or not
It's most certainly not. I am running apache 2.2.0 with php 5.1.12 and it most certainly works.

The configure statement used for both:
Code:
./configure --prefix=/usr/local/Apache2.2.X \
--enable-so --enable-mods-shared=all --enable-ssl \
--enable-proxy --enable-proxy-connect \
--enable-proxy-ftp --enable-proxy-http \
--enable-proxy-ajp --enable-proxy-balancer \
--enable-ldap --enable-authnz-ldap --with-ssl \
--with-ldap
Code:
./configure --with-apxs2=/usr/local/Apache2.2.X/bin/apxs \
--with-mysql --prefix=/usr --with-config-file-path=/etc \
--enable-force-cgi-redirect --disable-cgi --with-zlib \
--with-gettext --with-gdbm --with-openssl \
--with-unixODBC=/usr --with-imap=/usr --with-ldap \
--with-dom --with-dom-xslt --with-dom-exslt \
--with-kerberos --with-imap-ssl --enable-ucd-snmp-hack
 
Old 01-28-2006, 05:09 PM   #17
blueAlien
Member
 
Registered: May 2005
Location: Seattle, WA
Distribution: Slackware 13
Posts: 88

Original Poster
Rep: Reputation: 15
Apache = ./configure --enable-so
PHP = ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local/mysql
MySQL does not have configure command

Install dirs(case sensative)
Apache 2.2 = /usr/local/apache2
PHP 5.1.2 = /usr/local/bin
MySQL 5.0.18 = /usr/local/mysql-5.0.18

Ok, I have everything install, and configured. My only problem now is that apache won't start

Code:
httpd: Could not reliable determine the server's fully qualified domain name, using 127.0.0.1 for ServerName no listening sockets available, shutting down Unable to open logs
It acts the same way if I start it with rc.httpd or apachectl.
 
Old 01-29-2006, 03:49 AM   #18
megaspaz
Senior Member
 
Registered: Nov 2002
Location: Silly Con Valley
Distribution: Red Hat 7.3, Red Hat 9.0
Posts: 2,054

Rep: Reputation: 46
Couple of questions.

Before, I asked if you are using any of your apache 1.3 configuration in apache2's configuration. Are you?

Also, the error says it can't open the logs, which makes it a pain to diagnose why apache isn't starting. So can you post your httpd.conf file for apache2?

Also, what user are you trying to run apache as? There's an error regarding available ports so it could be apache isn't starting as root to open up the default port of 80. You can try to edit your httpd.conf file and change the listen directive to a port higher than 1000 - for example use a listen port of 8000 and see if apache will start.

Last edited by megaspaz; 01-29-2006 at 03:52 AM.
 
Old 01-29-2006, 04:09 AM   #19
ahelis
LQ Newbie
 
Registered: Dec 2005
Location: Taipei, Taiwan
Distribution: Redhat 7.0 & WS3,4
Posts: 18

Rep: Reputation: 0
Ok, some progress you are not getting that undefined symbol error.

Let's confirm your /usr/local/apache2/conf/httpd.conf file settings. Some of your settings will be different.

Code:
ServerRoot "/usr/local/apache2"

<IfModule !mpm_netware.c>
 PidFile logs/httpd.pid
</IfModule>

Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15

Most of the next section probably are not used, and I have deleted them all from my installation. This might be wrong but I have not noticed any difference for development purposes.

<IfModule prefork.c>
 StartServers 5
 MinSpareServers 5
 MaxSpareServers 10
 MaxClients 150
 MaxRequestsPerChild 50
</IfModule>

<IfModule worker.c>
 StartServers 2
 MaxClients 150
 MinSpareThreads 25
 MaxSpareThreads 75
 ThreadsPerChild 25
 MaxRequestsPerChild 50
</IfModule>

<IfModule perchild.c>
 NumServers 5
 StartThreads 5
 MinSpareThreads 5
 MaxSpareThreads 10
 MaxThreadsPerChild 20
 MaxRequestsPerChild 0
</IfModule>

<IfModule mpm_winnt.c>
 ThreadsPerChild 250
 MaxRequestsPerChild 0
</IfModule>

<IfModule beos.c>
 StartThreads 10
 MaxClients 50
 MaxRequestsPerChild 10000
</IfModule>

<IfModule mpm_netware.c>
 ThreadStackSize 65536
 StartThreads 250
 MinSpareThreads 25
 MaxSpareThreads 250
 MaxThreads 1000
 MaxRequestsPerChild 0
 MaxMemFree 100
</IfModule>

Listen 80

LoadModule php5_module modules/libphp5.so

User apache
Group apache

======== Main Server Configuration =================

ServerAdmin your@emailaddress.com

ServerName www.hayward.server 
(if you are not using dns, then use the IP address or 127.0.0.1 or localhost, normally the IP address works just fine, example 192.168.2.13:80)

UseCanonicalName On

DocumentRoot "/pub3/source/www" (change to your file location)

<Directory />
 Options FollowSymLinks
 AllowOverride None
 Order deny,allow
 Deny from all
</Directory>

<Directory "/pub3/source/www">
 Options Indexes FollowSymLinks
 AllowOverride None
 Order allow,deny
 Allow from all
</Directory>

<IfModule dir_module>
    DirectoryIndex index.html index.php
</IfModule>
                                                                                
<FilesMatch "^\.ht">
    Order allow,deny
    Deny from all
</FilesMatch>

LogLevel warn
                                                                                
<IfModule log_config_module>
 LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
 LogFormat "%h %l %u %t \"%r\" %>s %b" common
                                                                                
 <IfModule logio_module>
 LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
 </IfModule>

 CustomLog logs/access_log common
</IfModule>

<IfModule alias_module>
 ScriptAlias /cgi-bin/ "/usr/local/apache2/cgi-bin/"                                                                             
</IfModule>

<Directory "/usr/local/apache2/cgi-bin">
 AllowOverride None
 Options None
 Order allow,deny
 Allow from all
</Directory>

DefaultType text/plain

<IfModule mime_module>
 TypesConfig conf/mime.types
 AddType application/x-compress .Z
 AddType application/x-gzip .gz .tgz
 AddType application/x-httpd-php .php .phtml .phpm
 AddType application/x-httpd-php-source .phps
</IfModule>

<IfModule ssl_module>
 SSLRandomSeed startup builtin
 SSLRandomSeed connect builtin
</IfModule>
I would pay attention to the location of your log files, they should be /usr/local/apache2/logs and the contents of this directory should be similar to:

Code:
access_log
error_log
hayward-access_log (your host name will prepended here, hayward is my host name)
hayward-error_log
httpd.pid
Mine are all -rw-r--r-- owned:root group:root
 
Old 01-29-2006, 11:06 PM   #20
blueAlien
Member
 
Registered: May 2005
Location: Seattle, WA
Distribution: Slackware 13
Posts: 88

Original Poster
Rep: Reputation: 15
All is good now.

I went back to look at my httpd.conf file, and after the standard install the Listen setting was commented out, so I uncommented it and restarted Apache and everything worked. Thanks for all the help with getting PHP and Apache to work.
 
Old 01-29-2006, 11:58 PM   #21
ahelis
LQ Newbie
 
Registered: Dec 2005
Location: Taipei, Taiwan
Distribution: Redhat 7.0 & WS3,4
Posts: 18

Rep: Reputation: 0
Glad we could help you out.
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Slackware guide for AMP Apache MySQL & PHP xushi Slackware 35 05-11-2006 11:18 AM
ISS & ASP/.NET or Apache & PHP fuelinjection General 3 12-06-2005 07:41 AM
Apache & php & mod_dav Byenary Linux - Software 1 07-09-2005 01:26 PM
From RedHat9 to FreeBSD (Apache 2 & Mysql & PHP 4) guardian653 *BSD 5 12-11-2003 05:31 PM
Apache & PHP & RH8 hammerstein02 Linux - Software 3 02-07-2003 04:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:00 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration