GLIBCXX error in php

Discussion in 'Server Operation' started by Colster, Mar 23, 2006.

  1. Colster

    Colster New Member

    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/ into server: /lib/ version `GLIBCXX_3.4.4' not found (required by /usr/lib/

    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/ gets me:

    lrwxrwxrwx 1 root root 18 Mar 23 20:01 /usr/lib/ ->*

    and rpm -q --provides libstdc++ gives the following:
    libstdc++ = 4.0.2-8.fc4 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?
  2. falko

    falko Super Moderator Howtoforge Staff

    What's in /etc/httpd/conf.d/php.conf?
    What's the output of
  3. Colster

    Colster New Member

    Thanks for the help
  4. falko

    falko Super Moderator Howtoforge Staff

    Can you post the output of
    httpd -V

    (Depending on your Apache version, the command might also be
    httpd2 -V
  5. Colster

    Colster New Member

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

  6. falko

    falko Super Moderator Howtoforge Staff

    Please post the output of
    ls -la /etc/httpd
  7. Colster

    Colster New Member

    OK, that returns:

  8. falko

    falko Super Moderator Howtoforge Staff

    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 here:

    You can try to copy one of them to /usr/lib/httpd/modules/, e.g.:
    cp /usr/local/apache2/modules/ /usr/lib/httpd/modules/
    Restart Apache afterwards.
  9. Colster

    Colster New Member

    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
  10. falko

    falko Super Moderator Howtoforge Staff

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

    Colster New Member

    IIRC That version of php has it enabled by default

  12. falko

    falko Super Moderator Howtoforge Staff

    Please create this file:
    and put it in a PHP-enabled web on your server and access it with your browser. Is MySQL mentioned anywhere in the output?
  13. Colster

    Colster New Member

    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/ version `GLIBCXX_3.4.4' not found than php itself
  14. falko

    falko Super Moderator Howtoforge Staff

    Have you tried /downloads/php-5.0.4/libs/ (i.e. copy it to /usr/lib/httpd/modules/ and restart Apache).
  15. Colster

    Colster New Member

    Yes, it gives the same problem, httpd starts ok but basically php doesnt work.

    the phpinfo test page just downloads, opens wordpad and shows

  16. falko

    falko Super Moderator Howtoforge Staff

    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?
  17. Colster

    Colster New Member

    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
  18. falko

    falko Super Moderator Howtoforge Staff

    Can you find a cron job that does automatic updates?

Share This Page