Apt-get broke Apache2


Results 1 to 4 of 4

Thread: Apt-get broke Apache2

  1. #1
    Join Date
    Jul 2002
    Location
    New Orleans, LA USA
    Posts
    986

    [Solved] Apt-get broke Apache2

    I have a pseudo test server that I irresponsibly let both a need for develop and running of Sid (unstable) version of Debian.

    The long story short of it is I was playing around with functions that needed newer versions of software than was available in the stable release so upgraded. That was a done deal and has been working fine for many months. I then needed to upgrade a particular file for an unrelated service and did the dumb move of a full apt-get upgrade. Well in the 800 or so files it updated, one of them has broken Apache.

    Apache will start from the command line (/etc/init.d/apache2 start) without any errors, but when I try to navigate to any page it serves I get "500 Internal Server Error".

    Looking at the error log I see:
    Code:
    [Wed Sep 23 11:02:28 2009] [notice] Apache/2.2.13 (Debian) DAV/2 PHP/5.2.11-1 with Suhosin-Patch mod_ssl/2.2.13 OpenSSL/0.9.8k configured -- resuming normal operations
    [Wed Sep 23 11:02:31 2009] [error] [client 192.168.1.1] SoftException in Application.cpp:221: File "/Forum//index.php" is not in document root of Vhost "/var/www/phpBB3"
    [Wed Sep 23 11:02:31 2009] [error] [client 192.168.1.1] Premature end of script headers: index.php
    [Wed Sep 23 11:02:32 2009] [error] mod_log_sql: insufficient configuration info to establish database link
    [Wed Sep 23 11:02:32 2009] [error] mod_log_sql: child spawned but unable to open database link
    The particular page I tried to load for the above example does reference a mysql database. I double checked and mysql seems to have all its dependencies and is up and running. I also double checked that no dependencies for Apache were removed.

    Code:
    Debian-Server:/# apt-get build-dep mysql-common
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
    Debian-Server:/# apt-get build-dep apache2
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
    Debian-Server:/# /etc/init.d/mysql restart
    Stopping MySQL database server: mysqld.
    Starting MySQL database server: mysqld.
    Checking for corrupt, not cleanly closed and upgrade needing tables..
    Debian-Server:/# /etc/init.d/apache2 restart
    Restarting web server: apache2
    Debian-Server:/# apt-get -f install
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
    Debian-Server:/#
    Any ideas would be greatly appreciated.

    EDIT => Updated Apache log to include from a restart to error in case I missed anything.
    Last edited by trilarian; 09-28-2009 at 05:49 PM.
    "Whenever you find yourself on the side of the majority, it's time to pause and reflect."

    -Mark Twain

  2. #2
    Join Date
    Aug 2001
    Location
    Somewhere, Texas
    Posts
    9,627
    Stab in the dark but did you check the php.ini to make sure the mysql modules are still being loaded? It's possible the update rewrote the configs or even better using different configs! (I love when that happens)

    Run a phpinfo to verify the modules are there

    if you don't have a phpinfo page, save this code on the server as phpinfo.php and open it with a web browser. Hopefully at least this works
    Code:
    <?
    php phpinfo();
    ?>

  3. #3
    Join Date
    Jul 2002
    Location
    New Orleans, LA USA
    Posts
    986
    Ok, I moved index.php to a backup, and made a new index.php with the above mentioned code. Then I restarted apache and tried to access the page - same 500 error. Here is the log (xxx out the address for posting)...


    Code:
    [Thu Sep 24 12:04:43 2009] [notice] caught SIGTERM, shutting down
    [Thu Sep 24 12:04:44 2009] [warn] RSA server certificate CommonName (CN) `xxxx' does NOT match server name!?
    [Thu Sep 24 12:04:44 2009] [warn] Init: Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC 4366)
    [Thu Sep 24 12:04:44 2009] [notice] Digest: generating secret for digest authentication ...
    [Thu Sep 24 12:04:44 2009] [notice] Digest: done
    [Thu Sep 24 12:04:45 2009] [warn] RSA server certificate CommonName (CN) `xxxx' does NOT match server name!?
    [Thu Sep 24 12:04:45 2009] [warn] Init: Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC 4366)
    [Thu Sep 24 12:04:45 2009] [error] mod_log_sql: insufficient configuration info to establish database link
    [Thu Sep 24 12:04:45 2009] [error] mod_log_sql: child spawned but unable to open database link
    [Thu Sep 24 12:04:45 2009] [error] mod_log_sql: insufficient configuration info to establish database link
    [Thu Sep 24 12:04:45 2009] [error] mod_log_sql: child spawned but unable to open database link
    [Thu Sep 24 12:04:45 2009] [error] mod_log_sql: insufficient configuration info to establish database link
    [Thu Sep 24 12:04:45 2009] [error] mod_log_sql: child spawned but unable to open database link
    [Thu Sep 24 12:04:45 2009] [error] mod_log_sql: insufficient configuration info to establish database link
    [Thu Sep 24 12:04:45 2009] [error] mod_log_sql: child spawned but unable to open database link
    [Thu Sep 24 12:04:45 2009] [error] mod_log_sql: insufficient configuration info to establish database link
    [Thu Sep 24 12:04:45 2009] [error] mod_log_sql: child spawned but unable to open database link
    [Thu Sep 24 12:04:45 2009] [notice] Apache/2.2.13 (Debian) DAV/2 PHP/5.2.11-1 with Suhosin-Patch mod_ssl/2.2.13 OpenSSL/0.9.8k configured -- resuming normal operations
    [Thu Sep 24 12:04:51 2009] [error] mod_log_sql: insufficient configuration info to establish database link
    [Thu Sep 24 12:04:51 2009] [error] mod_log_sql: child spawned but unable to open database link
    [Thu Sep 24 12:04:56 2009] [error] [client 192.168.1.100] SoftException in Application.cpp:221: File "/Forum//index.php" is not in document root of Vhost "/var/www/phpBB3"
    [Thu Sep 24 12:04:56 2009] [error] [client 192.168.1.100] Premature end of script headers: index.php
    EDIT => Also, you can ignore the /Forum//index.php error. Again, this is a test server... I ran out of room on my /var directory so I have a symbolic link from /var/www/x to /some/path/y so I wouldn't have to redo the partitions for the extra space. This fires a soft warning every boot in the log but has never giving me any errors on the front end. Additionally, if I try to access another site that is in /var/www I still get the same 500 error.

    EDIT2 => If this helps, I connected directly to /var/www/test.php from a browser locally after a fresh restart of apache and here is the log.

    test.php
    Code:
    <?php phpinfo(); ?>
    Log:
    Code:
    [Thu Sep 24 12:23:59 2009] [notice] caught SIGTERM, shutting down
    [Thu Sep 24 12:24:00 2009] [warn] RSA server certificate CommonName (CN) `xxxx' does NOT match server name!?
    [Thu Sep 24 12:24:00 2009] [warn] Init: Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC 4366)
    [Thu Sep 24 12:24:00 2009] [notice] Digest: generating secret for digest authentication ...
    [Thu Sep 24 12:24:00 2009] [notice] Digest: done
    [Thu Sep 24 12:24:00 2009] [warn] RSA server certificate CommonName (CN) `xxxx' does NOT match server name!?
    [Thu Sep 24 12:24:00 2009] [warn] Init: Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC 4366)
    [Thu Sep 24 12:24:00 2009] [error] mod_log_sql: insufficient configuration info to establish database link
    [Thu Sep 24 12:24:00 2009] [error] mod_log_sql: child spawned but unable to open database link
    [Thu Sep 24 12:24:00 2009] [error] mod_log_sql: insufficient configuration info to establish database link
    [Thu Sep 24 12:24:00 2009] [error] mod_log_sql: child spawned but unable to open database link
    [Thu Sep 24 12:24:00 2009] [error] mod_log_sql: insufficient configuration info to establish database link
    [Thu Sep 24 12:24:00 2009] [error] mod_log_sql: child spawned but unable to open database link
    [Thu Sep 24 12:24:00 2009] [error] mod_log_sql: insufficient configuration info to establish database link
    [Thu Sep 24 12:24:00 2009] [error] mod_log_sql: child spawned but unable to open database link
    [Thu Sep 24 12:24:00 2009] [error] mod_log_sql: insufficient configuration info to establish database link
    [Thu Sep 24 12:24:00 2009] [error] mod_log_sql: child spawned but unable to open database link
    [Thu Sep 24 12:24:00 2009] [notice] Apache/2.2.13 (Debian) DAV/2 PHP/5.2.11-1 with Suhosin-Patch mod_ssl/2.2.13 OpenSSL/0.9.8k configured -- resuming normal operations
    [Thu Sep 24 12:24:04 2009] [error] [client 192.168.1.100] SoftException in Application.cpp:350: UID of script "/var/www/test.php" is smaller than min_uid
    [Thu Sep 24 12:24:04 2009] [error] [client 192.168.1.100] Premature end of script headers: test.php
    Last edited by trilarian; 09-29-2009 at 10:24 AM.
    "Whenever you find yourself on the side of the majority, it's time to pause and reflect."

    -Mark Twain

  4. #4
    Join Date
    Jul 2002
    Location
    New Orleans, LA USA
    Posts
    986
    Fixed...


    This line was key.

    Code:
    [Thu Sep 24 12:24:04 2009] [error] [client 192.168.1.100] SoftException in Application.cpp:350: UID of script "/var/www/test.php" is smaller than min_uid
    Apparently suphp was installed/reconfigured in the update and user www-data has a UID of 33 which was lower than the min set at 100. Lowered the number to 33 and all is good again.
    Last edited by trilarian; 09-28-2009 at 09:17 PM.
    "Whenever you find yourself on the side of the majority, it's time to pause and reflect."

    -Mark Twain

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •