HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Server Operation (http://www.howtoforge.com/forums/forumdisplay.php?f=5)
-   -   GLIBCXX error in php (http://www.howtoforge.com/forums/showthread.php?t=3313)

Colster 23rd March 2006 23:20

GLIBCXX error in php
 
Our webserver has been working fine for months but sunday it stopped running.

Its a rented dedicated server we use for gaming but we have a webserver running on there for stats (psychostats)

When the webserver stopped I went in using SSH and tried

service httpd restart

and I get the following error:

Starting httpd: Syntax error on line 6 of /etc/httpd/conf.d/php.conf:
Cannot load /etc/httpd/modules/libphp5.so into server: /lib/libstdc++.so.6: version `GLIBCXX_3.4.4' not found (required by /usr/lib/libaspell.so.15)
[FAILED]


I uninstalled and reinstalled httpd using yum and the webserver works again, until i install php (yum install httpd-php) then same error.

running ls -al /usr/lib/libstdc++.so.6 gets me:

lrwxrwxrwx 1 root root 18 Mar 23 20:01 /usr/lib/libstdc++.so.6 -> libstdc++.so.6.0.7*

and rpm -q --provides libstdc++ gives the following:

libstdc++.so.6
libstdc++.so.6(CXXABI_1.3)
libstdc++.so.6(CXXABI_1.3.1)
libstdc++.so.6(GLIBCXX_3.4)
libstdc++.so.6(GLIBCXX_3.4.1)
libstdc++.so.6(GLIBCXX_3.4.2)
libstdc++.so.6(GLIBCXX_3.4.3)
libstdc++.so.6(GLIBCXX_3.4.4)
libstdc++.so.6(GLIBCXX_3.4.5)
libstdc++.so.6(GLIBCXX_3.4.6)
libstdc++.so.6(GLIBCXX_3.4.7)
libstdc++34
libstdc++ = 4.0.2-8.fc4


..so it looks like the files are all there but still the error remains, I found a link on the net that suggested installing libsigc++20 which I tried but that didnt solve it, our GSP have said that they can't fix it either.

Would a reinstall of FC4 (or maybe FC5) be the only solution?

falko 24th March 2006 20:33

What's in /etc/httpd/conf.d/php.conf?
What's the output of
Code:

updatedb
locate libphp5.so

?

Colster 24th March 2006 20:46

Quote:

Originally Posted by php.conf
#
# PHP is an HTML-embedded scripting language which attempts to make it
# easy for developers to write dynamically generated webpages.
#

LoadModule php5_module modules/libphp5.so

#
# Cause the PHP interpreter to handle files with a .php extension.
#
AddHandler php5-script .php
AddType text/html .php

#
# Add index.php to the list of files that will be served as directory
# indexes.
#
DirectoryIndex index.php

#
# Uncomment the following line to allow PHP to pretty-print .phps
# files as PHP source code:
#
#AddType application/x-httpd-php-source .phps


Quote:

Originally Posted by locate libphp5.so
/usr/local/apache2/modules/libphp5.so
/downloads/php-5.0.4/.libs/libphp5.so
/downloads/php-5.0.4/libs/libphp5.so

Thanks for the help

falko 25th March 2006 14:44

Can you post the output of
Code:

httpd -V
?

(Depending on your Apache version, the command might also be
Code:

httpd2 -V
.)

Colster 25th March 2006 15:24

Thanks, I tried both v and V just in case but I guess it's the second one you want.

Quote:

Originally Posted by httpd -v
Server version: Apache/2.0.54
Server built: Jan 17 2006 06:36:00

Quote:

Originally Posted by httpd -V
Server version: Apache/2.0.54
Server built: Jan 17 2006 06:36:00
Server's Module Magic Number: 20020903:9
Architecture: 32-bit
Server compiled with....
-D APACHE_MPM_DIR="server/mpm/prefork"
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
-D APR_USE_SYSVSEM_SERIALIZE
-D APR_USE_PTHREAD_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D HTTPD_ROOT="/etc/httpd"
-D SUEXEC_BIN="/usr/sbin/suexec"
-D DEFAULT_PIDLOG="logs/httpd.pid"
-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
-D DEFAULT_LOCKFILE="logs/accept.lock"
-D DEFAULT_ERRORLOG="logs/error_log"
-D AP_TYPES_CONFIG_FILE="conf/mime.types"
-D SERVER_CONFIG_FILE="conf/httpd.conf"

Thanks,

falko 26th March 2006 11:39

Please post the output of
Code:

ls -la /etc/httpd

Colster 26th March 2006 11:41

OK, that returns:

Quote:

Originally Posted by ls -la /etc/httpd
total 52
drwxr-xr-x 4 root root 4096 Mar 23 19:12 ./
drwxr-xr-x 64 root root 12288 Mar 26 05:08 ../
drwxr-xr-x 2 root root 4096 Mar 23 19:12 conf/
drwxr-xr-x 2 root root 4096 Mar 25 14:26 conf.d/
lrwxrwxrwx 1 root root 19 Mar 23 19:12 logs -> ../../var/log/httpd/
lrwxrwxrwx 1 root root 27 Mar 23 19:12 modules -> ../../usr/lib/httpd/modules/
lrwxrwxrwx 1 root root 13 Mar 23 19:12 run -> ../../var/run/


falko 26th March 2006 21:12

Code:

lrwxrwxrwx 1 root root 27 Mar 23 19:12 modules -> ../../usr/lib/httpd/modules/
Your Apache expects the modules in /usr/lib/httpd/modules/, but you have libphp5.so here:
/usr/local/apache2/modules/libphp5.so
/downloads/php-5.0.4/.libs/libphp5.so
/downloads/php-5.0.4/libs/libphp5.so

You can try to copy one of them to /usr/lib/httpd/modules/, e.g.:
Code:

cp /usr/local/apache2/modules/libphp5.so /usr/lib/httpd/modules/
Restart Apache afterwards.

Colster 26th March 2006 21:44

OK tried this and it said did i want to overwrite existing so there was one there, I did this and started httpd and no error but php pages would not display or I got message saying Version 5.0.4 didnt have mysql support installed.

Although I had done yum install php-mysql

Uninstalled and reinstalled php and the error returns.

If I try copying the file again it again gives the overwrite warning

falko 27th March 2006 14:41

Quote:

Originally Posted by Colster
OK tried this and it said did i want to overwrite existing so there was one there, I did this and started httpd and no error but php pages would not display or I got message saying Version 5.0.4 didnt have mysql support installed.

Did you enable the MySQL extension in your php.ini?


All times are GMT +2. The time now is 03:37.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.