LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-21-2013, 07:01 AM   #1
ashokingole
LQ Newbie
 
Registered: Apr 2012
Posts: 22

Rep: Reputation: Disabled
Question apache not started


[root@localhost etc]# /etc/rc.d/init.d/apache start
httpd: Syntax error on line 145 of /usr/local/apache/conf/httpd.conf: Cannot load modules/libphp4.so
into server: /usr/local/apache/modules/libphp4.so: undefined symbol: ap_get_server_version
 
Old 01-21-2013, 07:21 AM   #2
shivaa
Senior Member
 
Registered: Jul 2012
Location: Grenoble, Fr.
Distribution: Sun Solaris, RHEL, Ubuntu, Debian 6.0
Posts: 1,800
Blog Entries: 4

Rep: Reputation: 286Reputation: 286Reputation: 286
Which distro? Have you added the script for first time or it was running and now not starting?
Did you make any changes in your system before reboot (I guess)? Provide some more details about issue.

Last edited by shivaa; 01-21-2013 at 07:23 AM. Reason: Typo
 
Old 01-21-2013, 08:14 AM   #3
kirukan
Senior Member
 
Registered: Jun 2008
Location: Eelam
Distribution: Redhat, Solaris, Suse
Posts: 1,278

Rep: Reputation: 148Reputation: 148
Quote:
Originally Posted by ashokingole View Post
[root@localhost etc]# /etc/rc.d/init.d/apache start
httpd: Syntax error on line 145 of /usr/local/apache/conf/httpd.conf: Cannot load modules/libphp4.so
into server: /usr/local/apache/modules/libphp4.so: undefined symbol: ap_get_server_version
First make sure the module is exit in the module directory if exist just past the httpd.conf line how you load the module in apache?
 
Old 01-21-2013, 01:33 PM   #4
sneakyimp
Senior Member
 
Registered: Dec 2004
Posts: 1,056

Rep: Reputation: 78
php 4 is *really old*. I wouldn't be surprised if the old shared object (libphp4.so) is not compatible with apache.
 
Old 01-22-2013, 01:54 AM   #5
ashokingole
LQ Newbie
 
Registered: Apr 2012
Posts: 22

Original Poster
Rep: Reputation: Disabled
Please see the few line of my /etc/httpd.conf file

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
[root@localhost ~]# vi /etc/httpd.conf
LoadModule alias_module modules/mod_alias.so
#LoadModule rewrite_module modules/mod_rewrite.so
LoadModule php4_module /usr/local/apache/modules/libphp4.so
LoadModule php4_module modules/libphp4.so
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

And the libphp4.so present in this below location

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
/etc/rc.d/init.d/apache start
httpd: Syntax error on line 145 of /usr/local/apache/conf/httpd.conf: Cannot load /usr/local/apache/modules/libphp4.so into server: /usr/local/apache/modules/libphp4.so: undefined symbol: ap_get_server_version
[root@localhost ~]# find / -name libphp4.so
/usr/local/src/php-4.4.6/libs/libphp4.so
/usr/local/src/php-4.4.6/.libs/libphp4.so
/usr/local/apache/modules/libphp4.so
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


What can i do to start apache server?
 
Old 01-22-2013, 02:01 AM   #6
ashokingole
LQ Newbie
 
Registered: Apr 2012
Posts: 22

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by shivaa View Post
Which distro? Have you added the script for first time or it was running and now not starting?
Did you make any changes in your system before reboot (I guess)? Provide some more details about issue.
i took below step to install apache & php

[root@localhost apache_1.3.0]#./configure \
--prefix=/usr/local/apache \
--enable-shared=max \
--enable-module=rewrite \
--enable-module=so

make && make install

[root@localhost php-4.4.6]#./configure \
--with-apxs2=/usr/local/apache/bin/apxs \
--disable-debug \
--enable-ftp \
--enable-inline-optimization \
--enable-magic-quotes \
--enable-mbstring \
--enable-mm=shared \
--enable-safe-mode \
--enable-track-vars \
--enable-trans-sid \
--enable-wddx=shared \
--enable-xml \
--with-dom \
--with-gd \
--with-gettext \
--with-mysql=/usr/local/mysql \
--with-regex=system \
--with-xml \
--with-zlib-dir=/usr/lib

make && make install
 
Old 01-22-2013, 02:43 AM   #7
ashokingole
LQ Newbie
 
Registered: Apr 2012
Posts: 22

Original Poster
Rep: Reputation: Disabled
see the version my apache & php


[root@localhost apache_1.3.0]# /etc/rc.d/init.d/apache -v
Server version: Apache/2.4.3 (Unix)
Server built: Jan 21 2013 10:36:30
[root@localhost apache_1.3.0]# php -v
PHP 4.4.6 (cli) (built: Jan 21 2013 11:42:56)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
[root@localhost apache_1.3.0]#
 
Old 01-22-2013, 08:40 AM   #8
sneakyimp
Senior Member
 
Registered: Dec 2004
Posts: 1,056

Rep: Reputation: 78
You should give up on PHP 4 and think about php 5.4 or 5.5 instead. Like I said, I wouldn't be surprised if php 4 and apache 2.4.3 were completely incompatible.

Or, you could try a much earlier version of apache -- and probably get your server hacked from all the old bugs,
 
Old 01-22-2013, 08:54 PM   #9
ashokingole
LQ Newbie
 
Registered: Apr 2012
Posts: 22

Original Poster
Rep: Reputation: Disabled
Pleas suggest me to uninstall PHP 4.4.6 which is build and installed in given step, so that i can proceed with php 5.4 or 5.5.

cd /usr/local/src/php-4.4.6

./configure \
--with-apxs2=/usr/local/apache/bin/apxs \
--disable-debug \
--enable-ftp \
--enable-inline-optimization \
--enable-magic-quotes \
--enable-mbstring \
--enable-mm=shared \
--enable-safe-mode \
--enable-track-vars \
--enable-trans-sid \
--enable-wddx=shared \
--enable-xml \
--with-dom \
--with-gd \
--with-gettext \
--with-mysql=/usr/local/mysql \
--with-regex=system \
--with-xml \
--with-zlib-dir=/usr/lib

make && make install

cp php.ini-dist /usr/local/lib/php.ini

---------- Post added 01-23-13 at 08:24 AM ----------

Pleas suggest me to uninstall PHP 4.4.6 which is build and installed in given step, so that i can proceed with php 5.4 or 5.5.

cd /usr/local/src/php-4.4.6

./configure \
--with-apxs2=/usr/local/apache/bin/apxs \
--disable-debug \
--enable-ftp \
--enable-inline-optimization \
--enable-magic-quotes \
--enable-mbstring \
--enable-mm=shared \
--enable-safe-mode \
--enable-track-vars \
--enable-trans-sid \
--enable-wddx=shared \
--enable-xml \
--with-dom \
--with-gd \
--with-gettext \
--with-mysql=/usr/local/mysql \
--with-regex=system \
--with-xml \
--with-zlib-dir=/usr/lib

make && make install

cp php.ini-dist /usr/local/lib/php.ini
 
Old 01-24-2013, 04:38 PM   #10
sneakyimp
Senior Member
 
Registered: Dec 2004
Posts: 1,056

Rep: Reputation: 78
I'm not entirely sure how to uninstall if you are compiling from source, you might try:
Code:
cd /usr/local/src/php-4.4.6p]
make uninstall
However, the PHP authors may not have provided an uninstall version.

It may be enough to simply download the source code of PHP 5.4 into a different directory and try the same configure/make/make install commands there.

On the other hand, compiling from source is sometimes tricky if you don't know what configure command to use. If you are using linux, you can use a package manager to auto-install such things.

On a debian-based system, you could do something like this:
Code:
apt-get install php5 php5-xmlrpc php5-gd php5-mysql
If you're on a red hat based system (e.g., Fedora or CentOS) then the command would be yum instead of apt-get and the package names would be different.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Apache not started KaRt Linux - Newbie 4 08-02-2012 07:36 AM
Apache cannot be started Azzath Linux - Server 9 08-06-2007 10:19 AM
Started Apache, but not working coolrock Slackware 7 10-02-2006 12:10 PM
Getting started with Apache shazam75 Linux - Software 4 09-26-2005 09:48 PM
Apache 1.3 started but not working ? Devboy *BSD 0 08-16-2004 07:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:25 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