View Full Version : GLIBCXX error in php
Colster
24th March 2006, 00:20
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, 21:33
What's in /etc/httpd/conf.d/php.conf?
What's the output of updatedb
locate libphp5.so?
Colster
24th March 2006, 21:46
#
# 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
/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, 15:44
Can you post the output of httpd -V?
(Depending on your Apache version, the command might also be
httpd2 -V.)
Colster
25th March 2006, 16:24
Thanks, I tried both v and V just in case but I guess it's the second one you want.
Server version: Apache/2.0.54
Server built: Jan 17 2006 06:36:00
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, 12:39
Please post the output of ls -la /etc/httpd
Colster
26th March 2006, 12:41
OK, that returns:
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, 22:12
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.:
cp /usr/local/apache2/modules/libphp5.so /usr/lib/httpd/modules/
Restart Apache afterwards.
Colster
26th March 2006, 22: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, 15:41
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?
Colster
27th March 2006, 19:42
Did you enable the MySQL extension in your php.ini?
IIRC That version of php has it enabled by default
Note that MySQL and ODBC support is now built in
falko
28th March 2006, 12:03
Please create this file:
<?php
phpinfo();
?>
and put it in a PHP-enabled web on your server and access it with your browser. Is MySQL mentioned anywhere in the output?
Colster
28th March 2006, 22:09
Thats the problem, as soon as I enable php on the webserver it won't start.
If I try what u suggest it just displays the code, if i copy the module from apache2 i don't get the error but only because php doesnt load then anyway
I think the error is more linked to /lib/libstdc++.so.6: version `GLIBCXX_3.4.4' not found than php itself
falko
29th March 2006, 15:04
Have you tried /downloads/php-5.0.4/libs/libphp5.so (i.e. copy it to /usr/lib/httpd/modules/ and restart Apache).
Colster
29th March 2006, 23:59
Yes, it gives the same problem, httpd starts ok but basically php doesnt work.
the phpinfo test page just downloads, opens wordpad and shows
<?php
phpinfo();
?>
falko
30th March 2006, 16:59
Does your server do automatic updates, or has it been hacked? It's strange that this error occurred from one day to the other...
Which distribution do you use?
Colster
30th March 2006, 19:36
Its fedora core 4, i suppose hacking is possible, rkhunter doesn't find anything tho apart from the error already mentioned coming up in its logs too.
Also tried reinstalling aspell but no change
falko
31st March 2006, 12:38
Can you find a cron job that does automatic updates?
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.