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 |
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. |
Quote:
|
php 4 is *really old*. I wouldn't be surprised if the old shared object (libphp4.so) is not compatible with apache.
|
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? |
Quote:
[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 |
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]# |
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, |
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 |
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] 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 |
All times are GMT -5. The time now is 11:38 AM. |